This is the mail archive of the gcc@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] | |
This pre-DR is for the question Jakub raised in
<http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02802.html> of the validity
of using arrays of va_list (which cause an ICE on some platforms; bug
17716) and structures containing va_list. It's clear what the semantics
should be for the use of any lvalue for an object of type va_list, and as
a quality of implementation matter we should accept uses with any such
expression and compile them correctly without ICE, but it isn't clear
whether they are strictly valid (though if not I think that is more likely
an oversight in the standard than a deliberate decision).
struct { int x; } x;
int y[10];x.x = 3; y[3] = 3;
6. Structure containing va_list.
#include <stdarg.h>
void f (int a, ...) { struct { int a; va_list b; } aps; va_start(aps.b, a); // ... va_end(aps.b); }
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |