This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/26264] New: Extraneous warning with __builtin_stdarg_start and optimization


The testcase from PR 18828 produces the improper diagnostic

18828.c: In function ?foo?:
18828.c:11: warning: second parameter of ?va_start? not last named argument

with 4.0 and above if the use of __builtin_va_start() is replaced with
__builtin_stdarg_start().  According to the ChangeLog below
__builtin_stdarg_start was renamed to __builtin_va_start, but I could find no
information about __builtin_stdarg_start() being deprecated or removed.

2002-07-15  Zack Weinberg  <zack@codesourcery.com>
        * ginclude/varargs.h: Replace with stub which issues #error.
        * ginclude/stdarg.h: __builtin_stdarg_start is renamed
        __builtin_va_start.
[...]

3.4 does not produce the extraneous warning, so something introduced it after
the renaming of __builtin_stdarg_start to __builtin_va_start.

Testcase:

typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;

extern void abort (void);

void foo (int size, ...)
{
  va_list ap;
  if (size != 21)
    abort ();
  __builtin_stdarg_start(ap,size);
  __builtin_va_end(ap);
}


-- 
           Summary: Extraneous warning with __builtin_stdarg_start and
                    optimization
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: James dot Juran at baesystems dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26264


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]