Commit Graph

7 Commits

Author SHA1 Message Date
Bernardo Innocenti 5557e16d2a libiberty.h (ASTRDUP): Add casts required for stricter type conversion rules of C++.
* libiberty.h (ASTRDUP): Add casts required for stricter
	type conversion rules of C++.
	* obstack.h (obstack_free): Likewise.

From-SVN: r84642
2004-07-13 22:54:38 +02:00
Joseph Myers dc70e81d6e obstack.h: Merge the following change from gnulib...
include:
	* obstack.h: Merge the following change from gnulib:
	2003-10-21  Paul Eggert  <eggert@twinsun.com>
	* obstack.h (obstack_1grow_fast): Properly parenthesize arg.
	(obstack_ptr_grow_fast, obstack_int_grow_fast):
	Don't use lvalue casts, as GCC plans to remove support for them
	in GCC 3.5.  Reported by Joseph S. Myers.  This bug
	was also present in the non-GCC version, indicating that this
	code had always been buggy and had never been widely used.
	(obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
	Use the fast variant of each macro, rather than copying the
	definiens of the fast variant; that way, we'll be more likely to
	catch future bugs in the fast variants.

gcc:
	* c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of
	deprecation of casts as lvalues.
	* fixinc/inclhack.def (obstack_lvalue_cast): New fix.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/obstack.h: New test.

gcc/testsuite:
	* gcc.dg/cast-lvalue-1.c: New test.

From-SVN: r72826
2003-10-22 23:28:39 +01:00
Nick Clifton 01f537aba0 Fix copyright dates
From-SVN: r40469
2001-03-14 19:44:38 +00:00
Rodney Brown 0b749da1b8 * getopt.h obstack.h: Standarize copyright statement.
From-SVN: r38086
2000-12-06 18:54:13 -07:00
Kaveh R. Ghazi 98c3e05ded Avoids false positives with -Wcast-qual:
* obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
	in calls to `_obstack_memcpy' from here ...

	(_obstack_memcpy): ... to here, except in the __STDC__ case which
	doesn't need it.

From-SVN: r29028
1999-09-01 14:44:56 +00:00
Jeffrey A Law 7539f38d47 * getopt.h, obstack.h: Updated from gcc.
From-SVN: r22260
1998-09-05 06:25:19 -06:00
Jason Merrill 6599da043e Initial revision
From-SVN: r14877
1997-08-21 18:57:35 -04:00