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]

Fwd: c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char);


Reply to this email is how to add to the bug.


Thanks, Andrew Pinski

Begin forwarded message:

From: sbiallas@online-club.de
Date: Fri May 9, 2003 16:56:59 US/Eastern
To: Andrew Pinski <pinskia@physics.uc.edu>
Subject: Re: c/10719: invalid code generated (x86, "int $5") with __builtin_va_arg(va, char);



va_arg(va, char) is not valid code so it could
produce anything, gcc
use `int $5' on x86 to make sure you know it is
not valid.


So you said it is not valid, it gives you a
warning also so that is the

correct behavior aka not a bug.

IF this is really invalid, gcc should give me an error not a warning.

The warning is:
cuda.i:8: warning: `char' is promoted to `int'
when passed through `...'
cuda.i:8: warning: (so you should pass `int' not
`char' to `va_arg')

Since it promotes char to int, I believe
everything works fine (with warnings, though).

btw this used to work in older versions.

I dont know how to add this reply to the bug,
therefore reply by email.




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