summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fixincludes/ChangeLog7
-rw-r--r--fixincludes/fixincl.x61
-rw-r--r--fixincludes/inclhack.def28
-rw-r--r--fixincludes/tests/base/sys/va_list.h22
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/warn/miss-format-1.C2
6 files changed, 119 insertions, 6 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 60c76dd678d..ec55fb55caf 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR c++/46024
+ * inclhack.def (solaris_sys_va_list): New fix.
+ * fixincl.x: Regenerate.
+ * tests/base/sys/va_list.h: New test.
+
2010-09-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* inclhack.def (hpux_htonl): Allow trailing whitespace in select.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index dd493bb6254..6c3172df158 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Tuesday September 7, 2010 at 10:44:48 AM EDT
+ * It has been AutoGen-ed Monday October 18, 2010 at 11:11:18 PM MEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Sep 7 10:44:48 EDT 2010
+/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Oct 18 23:11:18 MEST 2010
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 208 fixup descriptions.
+ * This file contains 209 fixup descriptions.
*
* See README for more information.
*
@@ -6973,6 +6973,51 @@ static const char* apzSolaris_Stdio_TagPatch[] = { sed_cmd_z,
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Solaris_Sys_Va_List fix
+ */
+tSCC zSolaris_Sys_Va_ListName[] =
+ "solaris_sys_va_list";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSolaris_Sys_Va_ListList[] =
+ "sys/va_list.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzSolaris_Sys_Va_ListMachs[] = {
+ "*-*-solaris2.[89]",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSolaris_Sys_Va_ListSelect0[] =
+ "#if.*__STDC__.*\n\
+typedef void \\*__va_list;\n\
+#else\n\
+typedef char \\*__va_list;\n\
+#endif";
+
+#define SOLARIS_SYS_VA_LIST_TEST_CT 1
+static tTestDesc aSolaris_Sys_Va_ListTests[] = {
+ { TT_EGREP, zSolaris_Sys_Va_ListSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Solaris_Sys_Va_List
+ */
+static const char* apzSolaris_Sys_Va_ListPatch[] = {
+ "format",
+ "#ifdef __GNUC__\n\
+typedef __builtin_va_list __va_list;\n\
+#else\n\
+%0\n\
+#endif",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Statsswtch fix
*/
tSCC zStatsswtchName[] =
@@ -8470,9 +8515,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 247
+#define REGEX_COUNT 248
#define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT 208
+#define FIX_COUNT 209
/*
* Enumerate the fixes
@@ -8649,6 +8694,7 @@ typedef enum {
SOLARIS_INT_LIMITS_3_FIXIDX,
SOLARIS_INT_TYPES_FIXIDX,
SOLARIS_STDIO_TAG_FIXIDX,
+ SOLARIS_SYS_VA_LIST_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
STDIO_VA_LIST_FIXIDX,
@@ -9544,6 +9590,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
aSolaris_Stdio_TagTests, apzSolaris_Stdio_TagPatch, 0 },
+ { zSolaris_Sys_Va_ListName, zSolaris_Sys_Va_ListList,
+ apzSolaris_Sys_Va_ListMachs,
+ SOLARIS_SYS_VA_LIST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSolaris_Sys_Va_ListTests, apzSolaris_Sys_Va_ListPatch, 0 },
+
{ zStatsswtchName, zStatsswtchList,
apzStatsswtchMachs,
STATSSWTCH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index ef4f167b66a..9257ffa1134 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3694,6 +3694,34 @@ fix = {
/*
+ * On Solaris 8 and 9, __va_list needs to become a typedef for
+ * __builtin_va_list to make -Wmissing-format-attribute work.
+ */
+fix = {
+ hackname = solaris_sys_va_list;
+ files = sys/va_list.h;
+ mach = '*-*-solaris2.[89]';
+ select = "#if.*__STDC__.*\n"
+ "typedef void \\*__va_list;\n"
+ "#else\n"
+ "typedef char \\*__va_list;\n"
+ "#endif";
+
+ c_fix = format;
+ c_fix_arg = "#ifdef __GNUC__\n"
+ "typedef __builtin_va_list __va_list;\n"
+ "#else\n"
+ "%0\n"
+ "#endif";
+ test_text = "#if defined(__STDC__) && !defined(__ia64)\n"
+ "typedef void *__va_list;\n"
+ "#else\n"
+ "typedef char *__va_list;\n"
+ "#endif";
+};
+
+
+/*
* a missing semi-colon at the end of the statsswtch structure definition.
*/
fix = {
diff --git a/fixincludes/tests/base/sys/va_list.h b/fixincludes/tests/base/sys/va_list.h
new file mode 100644
index 00000000000..8c69e2d574b
--- /dev/null
+++ b/fixincludes/tests/base/sys/va_list.h
@@ -0,0 +1,22 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/sys/va_list.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SOLARIS_SYS_VA_LIST_CHECK )
+#ifdef __GNUC__
+typedef __builtin_va_list __va_list;
+#else
+#if defined(__STDC__) && !defined(__ia64)
+typedef void *__va_list;
+#else
+typedef char *__va_list;
+#endif
+#endif
+#endif /* SOLARIS_SYS_VA_LIST_CHECK */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2811af57d87..9d9c5437c43 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR c++/46024
+ * g++.dg/warn/miss-format-1.C: Enclose dg-error target list in braces.
+
2010-10-20 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
PR c++/46056
diff --git a/gcc/testsuite/g++.dg/warn/miss-format-1.C b/gcc/testsuite/g++.dg/warn/miss-format-1.C
index eff22cc2c72..d850504edd9 100644
--- a/gcc/testsuite/g++.dg/warn/miss-format-1.C
+++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C
@@ -4,7 +4,7 @@
/* { dg-options "-Wmissing-format-attribute" } */
/* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */
/* VxWorks does not provide vscanf, either in kernel or RTP mode. */
-/* { dg-error "not declared" "" { target *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf5* } 26 } */
+/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf5* } } 26 } */
#include <stdio.h>
#include <stdarg.h>