diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-20 17:36:15 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-20 17:36:15 +0000 |
commit | 166b4e81a1a7f2df4f8f7c3fad2269e53290f01e (patch) | |
tree | d094eb673873c0d25db471c45eb2369dad1ab79c /fixincludes/inclhack.def | |
parent | 312c31e30fcb7ed9f5eab5af48546c942d538a76 (diff) | |
download | gcc-166b4e81a1a7f2df4f8f7c3fad2269e53290f01e.tar.gz |
fixincludes:
PR c++/46024
* inclhack.def (solaris_sys_va_list): New fix.
* fixincl.x: Regenerate.
* tests/base/sys/va_list.h: New test.
gcc/testsuite:
PR c++/46024
* g++.dg/warn/miss-format-1.C: Enclose dg-error target list in braces.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 28 |
1 files changed, 28 insertions, 0 deletions
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 = { |