+2003-05-22 Zack Weinberg <zack@codesourcery.com>
+
+ PR other/2873
+ * fixinc/inclhack.def (avoid_wchar_t_type): Add bypass
+ expressions to prevent triggering on recent curses.h,
+ linux/nls.h, or X11/Xlib.h.
+ (stdio_va_list): Add _G_va_list to bypass pattern.
+ (strict_ansi_not): Add bypass pattern for __SCO_VERSION__.
+ * fixinc/fixincl.x: Regenerate.
+
2003-05-22 Rekha Bhintade <rekhad@kpitcummins.com>
* gcc/config/sh/sh.h (TARGET_SWITCHES): Display all the target
- switches when --target-help option is specified.
+ switches when --target-help option is specified.
2003-05-22 Eric Botcazou <ebotcazou@libertysurf.fr>
2003-05-19 Seth Arnold <sarnold@wirex.com>
Aldy Hernandez <aldyh@redhat.com>
- * config/rs6000/rs6000.c (rs6000_stack_info): Do not add
- vrsave_size twice.
+ * config/rs6000/rs6000.c (rs6000_stack_info): Do not add
+ vrsave_size twice.
2003-05-19 Aldy Hernandez <aldyh@redhat.com>
- * doc/tm.texi (function_arg): Fix typo.
+ * doc/tm.texi (function_arg): Fix typo.
2003-05-19 Matt Austern <austern@apple.com>
* doc/invoke.texi: Document -Winvalid-offsetof.
* testsuite/g++.dg/other/offsetof3.C: New.
* testsuite/g++.dg/other/offsetof4.C: New.
-
+
2003-05-19 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
- David Edelsohn <edelsohn@gnu.org>
+ David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_alignment_string,
rs6000_alignment_flags): New variables.
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Saturday May 3, 2003 at 03:55:13 PM PDT
+ * It has been AutoGen-ed Thursday May 22, 2003 at 10:03:21 AM PDT
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Sat May 3 15:55:13 PDT 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu May 22 10:03:21 PDT 2003
*
* You must regenerate it. Use the ./genfixes script.
*
files = sys/varargs.h;\n\
replace = \"/* This file was generated by fixincludes. */\\n\"\n\
\"#ifndef _SYS_VARARGS_H\\n\"\n\
- \"#define _SYS_VARARGS_H\\n\\n\"\n\
- \n\
+ \"#define _SYS_VARARGS_H\\n\\n\"\n\n\
\"#ifdef __STDC__\\n\"\n\
\"#include <stdarg.h>\\n\"\n\
\"#else\\n\"\n\
\"#include <varargs.h>\\n\"\n\
- \"#endif\\n\\n\"\n\
- \n\
+ \"#endif\\n\\n\"\n\n\
\"#endif /* _SYS_VARARGS_H */\\n\";\n\
};\n\
#endif\n\n\n\
tSCC zAvoid_Wchar_T_TypeSelect0[] =
"^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
-#define AVOID_WCHAR_T_TYPE_TEST_CT 1
+/*
+ * content bypass pattern - skip fix if pattern found
+ */
+tSCC zAvoid_Wchar_T_TypeBypass0[] =
+ "we must use the C\\+\\+ compiler's type";
+tSCC zAvoid_Wchar_T_TypeBypass1[] =
+ "_LINUX_NLS_H";
+tSCC zAvoid_Wchar_T_TypeBypass2[] =
+ "XFree86: xc/lib/X11/Xlib\\.h";
+
+#define AVOID_WCHAR_T_TYPE_TEST_CT 4
static tTestDesc aAvoid_Wchar_T_TypeTests[] = {
+ { TT_NEGREP, zAvoid_Wchar_T_TypeBypass0, (regex_t*)NULL },
+ { TT_NEGREP, zAvoid_Wchar_T_TypeBypass1, (regex_t*)NULL },
+ { TT_NEGREP, zAvoid_Wchar_T_TypeBypass2, (regex_t*)NULL },
{ TT_EGREP, zAvoid_Wchar_T_TypeSelect0, (regex_t*)NULL }, };
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zStdio_Va_ListBypass0[] =
- "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list";
+ "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list";
#define STDIO_VA_LIST_TEST_CT 1
static tTestDesc aStdio_Va_ListTests[] = {
*/
tSCC zStrict_Ansi_NotBypass0[] =
"GNU and MIPS C compilers define __STDC__ differently";
+tSCC zStrict_Ansi_NotBypass1[] =
+ "__SCO_VERSION__.*__STDC__ != 1";
/*
* perform the C function call test
*/
tSCC zStrict_Ansi_NotFTst0[] = "stdc_0_in_system_headers";
-#define STRICT_ANSI_NOT_TEST_CT 3
+#define STRICT_ANSI_NOT_TEST_CT 4
static tTestDesc aStrict_Ansi_NotTests[] = {
{ TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ },
{ TT_NEGREP, zStrict_Ansi_NotBypass0, (regex_t*)NULL },
+ { TT_NEGREP, zStrict_Ansi_NotBypass1, (regex_t*)NULL },
{ TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, };
/*
*
* List of all fixes
*/
-#define REGEX_COUNT 164
+#define REGEX_COUNT 168
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 152
/*
* For C++, avoid any typedef definition of wchar_t,
* and use the built in type instead.
+ * Don't do this for headers that are smart enough to do the right
+ * thing (recent [n]curses.h and Xlib.h).
+ * Don't do it for <linux/nls.h> which is never used from C++ anyway,
+ * and will be broken by the edit.
*/
fix = {
hackname = avoid_wchar_t_type;
select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
+ bypass = "we must use the C\\+\\+ compiler's type";
+ bypass = "_LINUX_NLS_H";
+ bypass = "XFree86: xc/lib/X11/Xlib\\.h";
c_fix = format;
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
/*
* Don't use or define the name va_list in stdio.h.
- * This is for ANSI and also to interoperate properly with gcc's varargs.h.
- * Note _BSD_VA_LIST_ is dealt with elsewhere.
+ * This is for ANSI and also to interoperate properly with gcc's
+ * varargs.h. Note _BSD_VA_LIST_ is dealt with elsewhere. The
+ * presence of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken
+ * to indicate that the header knows what it's doing -- under SUSv2,
+ * stdio.h is required to define va_list, and we shouldn't break that.
*/
fix = {
hackname = stdio_va_list;
files = stdio.h;
- bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list';
+ bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
/*
* Use __gnuc_va_list in arg types in place of va_list.
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
/* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */
bypass = 'GNU and MIPS C compilers define __STDC__ differently';
+ /* GNU gmp.h uses "__STDC__ != 1" only if __SCO_VERSION__, which
+ is not defined by GCC, so it is safe. */
+ bypass = '__SCO_VERSION__.*__STDC__ != 1';
c_test = stdc_0_in_system_headers;
c_fix = format;