fixincludes:
Backport from mainline: 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. gcc/testsuite: Backport from mainline: 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-08-04 Daniel Gutson <dgutson@codesourcery.com> * g++.dg/warn/miss-format-1.C: Update line number. 2010-05-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * g++.dg/warn/miss-format-1.C (bar): xfail dg-warning on alpha*-dec-osf*. From-SVN: r165783
This commit is contained in:
parent
8e534d0eed
commit
93e3c9fb53
|
@ -1,3 +1,13 @@
|
|||
2010-10-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
Backport from mainline:
|
||||
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-10-01 Release Manager
|
||||
|
||||
* GCC 4.4.5 released.
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Wednesday July 14, 2010 at 11:12:51 AM MEST
|
||||
* It has been AutoGen-ed Wednesday October 20, 2010 at 07:49:38 PM MEST
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Jul 14 11:12:52 MEST 2010
|
||||
/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Oct 20 19:49:38 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 183 fixup descriptions.
|
||||
* This file contains 184 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
|
@ -5925,6 +5925,51 @@ static const char* apzSolaris_Stdio_TagPatch[] = { sed_cmd_z,
|
|||
"-e", "s/defined(__cplusplus) && (__cplusplus < 54321L)/0/",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* 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
|
||||
|
@ -7424,9 +7469,9 @@ static const char* apzX11_SprintfPatch[] = {
|
|||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 229
|
||||
#define REGEX_COUNT 230
|
||||
#define MACH_LIST_SIZE_LIMIT 181
|
||||
#define FIX_COUNT 183
|
||||
#define FIX_COUNT 184
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
|
@ -7578,6 +7623,7 @@ typedef enum {
|
|||
SOLARIS_ONCE_INIT_1_FIXIDX,
|
||||
SOLARIS_ONCE_INIT_2_FIXIDX,
|
||||
SOLARIS_STDIO_TAG_FIXIDX,
|
||||
SOLARIS_SYS_VA_LIST_FIXIDX,
|
||||
STATSSWTCH_FIXIDX,
|
||||
STDIO_STDARG_H_FIXIDX,
|
||||
STDIO_VA_LIST_FIXIDX,
|
||||
|
@ -8348,6 +8394,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,
|
||||
|
|
|
@ -3142,6 +3142,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.
|
||||
*/
|
||||
|
|
|
@ -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 */
|
|
@ -1,3 +1,20 @@
|
|||
2010-10-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
Backport from mainline:
|
||||
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-08-04 Daniel Gutson <dgutson@codesourcery.com>
|
||||
|
||||
* g++.dg/warn/miss-format-1.C: Update line number.
|
||||
|
||||
2010-05-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* g++.dg/warn/miss-format-1.C (bar): xfail dg-warning on
|
||||
alpha*-dec-osf*.
|
||||
|
||||
2010-10-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/46019
|
||||
|
|
|
@ -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.[7-8] *-*-vxworks* } 25 } */
|
||||
/* { dg-error "not declared" "" { target { *-*-solaris2.[7-8] *-*-vxworks* alpha*-dec-osf* } } 26 } */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
@ -23,7 +23,7 @@ bar (const char *fmt, ...)
|
|||
{
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.[7-8] *-*-vxworks* } } */
|
||||
vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.[7-8] *-*-vxworks* alpha*-dec-osf* } } */
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue