public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27108] New: syntax error with same-name typedef and local variable using va_arg
@ 2006-04-11 0:37 jesuswaffle at gmail dot com
2006-04-11 1:06 ` [Bug c/27108] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jesuswaffle at gmail dot com @ 2006-04-11 0:37 UTC (permalink / raw)
To: gcc-bugs
When compiling this (after cpp):
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "test.c"
# 1 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 1 3 4
# 43 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 "/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 2 "test.c" 2
typedef int foo;
pathological(int a, ...) {
int foo;
va_list ap;
__builtin_va_arg(ap,foo);
}
I get this error:
test.c: In function `pathological':
test.c:9: error: parse error before "foo"
Removing the 'int foo' declaration in 'pathological' fixes the error. I'm not
sure what to make of this; however, I would suspect that the variable named foo
is preventing gcc from seeing the typedef named foo.
--
Summary: syntax error with same-name typedef and local variable
using va_arg
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jesuswaffle at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27108
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-11 1:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-11 0:37 [Bug c/27108] New: syntax error with same-name typedef and local variable using va_arg jesuswaffle at gmail dot com
2006-04-11 1:06 ` [Bug c/27108] " pinskia 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).