public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/26264]  New: Extraneous warning with __builtin_stdarg_start and optimization
@ 2006-02-13 18:51 James dot Juran at baesystems dot com
  2006-02-13 18:54 ` [Bug tree-optimization/26264] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: James dot Juran at baesystems dot com @ 2006-02-13 18:51 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-02-26 14:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 18:51 [Bug tree-optimization/26264] New: Extraneous warning with __builtin_stdarg_start and optimization James dot Juran at baesystems dot com
2006-02-13 18:54 ` [Bug tree-optimization/26264] " pinskia at gcc dot gnu dot org
2006-02-13 18:59 ` pinskia at gcc dot gnu dot org
2006-02-13 19:02 ` pinskia at gcc dot gnu dot org
2006-02-13 19:04 ` pinskia at gcc dot gnu dot org
2006-02-13 19:06 ` James dot Juran at baesystems dot com
2006-02-13 19:08   ` Andrew Pinski
2006-02-13 19:08 ` pinskia at physics dot uc dot edu
2006-02-13 19:15 ` James dot Juran at baesystems dot com
2007-01-23 14:29 ` manu at gcc dot gnu dot org
2007-01-24 17:22 ` James dot Juran at baesystems dot com
2007-10-28 23:43 ` manu at gcc dot gnu dot org
2007-11-01 22:47 ` manu at gcc dot gnu dot org
2007-11-10  3:48 ` patchapp at dberlin dot org
2008-02-26 14:17 ` manu at gcc dot gnu dot org
2008-02-26 14:46 ` manu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).