Joseph S. Myers wrote:
> On Sun, 24 May 2009, Andrew Haley wrote:
>
>> Of course we have to fix the assembler output. For [any] two declarations
>> a and b, &a != &b, even when a is a zero-length array. So, you have to
>> allocate at least one byte.
>
> I don't think this is necessarily part of
Joseph S. Myers wrote:
> On Sun, 24 May 2009, Dave Korn wrote:
>
>> So, is the testcase invalid, and should the compiler be warning about this
>> declaration? I couldn't get any complaint out of it even with "-W -Wall
>> -Wextra -pedantic -std=c89"? Or should the linker be allocating some spac
Joseph S. Myers wrote:
> On Sun, 24 May 2009, Andrew Haley wrote:
>
>> Of course we have to fix the assembler output. For ant two declarations
>> a and b, &a != &b, even when a is a zero-length array. So, you have to
>> allocate at least one byte.
>
> I don't think this is necessarily part of t
On Sun, 24 May 2009, Andrew Haley wrote:
> Of course we have to fix the assembler output. For ant two declarations
> a and b, &a != &b, even when a is a zero-length array. So, you have to
> allocate at least one byte.
I don't think this is necessarily part of the semantics for the GNU
extensio
On Sun, 24 May 2009, Dave Korn wrote:
> So, is the testcase invalid, and should the compiler be warning about this
> declaration? I couldn't get any complaint out of it even with "-W -Wall
> -Wextra -pedantic -std=c89"? Or should the linker be allocating some space
> for this zero-sized common
Andrew Haley wrote:
>>> Obviously I can't see for looking; can you please point me to the precise
>>> chapter/page/paragraph/line that I should have found earlier?
>
> "Zero-length arrays are allowed in GNU C. They are very useful as the
> last element of a structure ..."
>
> That doesn't in
Dave Korn wrote:
> Dave Korn wrote:
>> Dave Korn wrote:
>>> I've read http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html about six
>>> times and can't see anywhere it even hints that you can use this syntax
>>> anywhere except as the trailing member of a struct.
>> Andrew Haley wrote:
>>> But zero-
Dave Korn wrote:
> Dave Korn wrote:
>> I've read http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html about six
>> times and can't see anywhere it even hints that you can use this syntax
>> anywhere except as the trailing member of a struct.
>
> Andrew Haley wrote:
>> But zero-length arrays are a gc
Dave Korn wrote:
> I've read http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html about six
> times and can't see anywhere it even hints that you can use this syntax
> anywhere except as the trailing member of a struct.
Andrew Haley wrote:
> But zero-length arrays are a gcc extension. There's nothi
Dave Korn wrote:
> Andrew Haley wrote:
>> Dave Korn wrote:
>>> Dave Korn wrote:
Dave Korn wrote:
> ELF GAS/LD seem happy enough when presented with a ".comm foo,0"
> directive, but PE does rather literally what you asked, and gives you
> no data object, leading to i0 in the ab
Andrew Haley wrote:
> Dave Korn wrote:
>> Dave Korn wrote:
>>> Dave Korn wrote:
>>>
ELF GAS/LD seem happy enough when presented with a ".comm foo,0"
directive, but PE does rather literally what you asked, and gives you
no data object, leading to i0 in the above being an undefined
>>
Dave Korn wrote:
> Dave Korn wrote:
>> Dave Korn wrote:
>>
>>> ELF GAS/LD seem happy enough when presented with a ".comm foo,0"
>>> directive,
>>> but PE does rather literally what you asked, and gives you no data object,
>>> leading to i0 in the above being an undefined reference at link time.
Hello!
I found something rather odd in testcase gcc.c-torture/execute/20030811-1.c:
> /* Origin: PR target/11535 from H. J. Lu */
>
> void vararg (int i, ...)
> {
> (void) i;
> }
>
> int i0[0], i1;
Huh?
> void test1 (void)
> {
> int a = (int) (long long) __builtin_return_address
Dave Korn wrote:
> Dave Korn wrote:
>
>> ELF GAS/LD seem happy enough when presented with a ".comm foo,0" directive,
>> but PE does rather literally what you asked, and gives you no data object,
>> leading to i0 in the above being an undefined reference at link time.
>
> After a bit further d
Dave Korn wrote:
> ELF GAS/LD seem happy enough when presented with a ".comm foo,0" directive,
> but PE does rather literally what you asked, and gives you no data object,
> leading to i0 in the above being an undefined reference at link time.
After a bit further digging, it turns out that th
Hi everyone,
I found something rather odd in testcase gcc.c-torture/execute/20030811-1.c:
> /* Origin: PR target/11535 from H. J. Lu */
>
> void vararg (int i, ...)
> {
> (void) i;
> }
>
> int i0[0], i1;
Huh?
> void test1 (void)
> {
> int a = (int) (long long) __builtin_return_a
16 matches
Mail list logo