Re: What does zero-length array mean at file scope?

2009-05-23 Thread Dave Korn
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

Re: What does zero-length array mean at file scope?

2009-05-23 Thread Dave Korn
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

What does zero-length array mean at file scope?

2009-05-23 Thread Dave Korn
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

ICE during build of libobjc

2009-05-23 Thread NightStrike
/bin/sh ./libtool --mode=compile /home/nightstrike/a/build/gcc/obj/./gcc/xgcc -B/home/nightstrike/a/build/gcc/obj/./gcc/ -L/home/nightstrike/a/build/gcc/obj/x86_64-w64-mingw32/winsup/mingw -L/home/nightstrike/a/build/gcc/obj/x86_64-w64-mingw32/winsup/w32api/lib -isystem /home/nightstrike/a/build/gc

Re: Seeking suggestion

2009-05-23 Thread Jamie Prescott
> From: Georg-Johann Lay > To: Jamie Prescott > Cc: Ian Lance Taylor ; gcc@gcc.gnu.org > Sent: Saturday, May 23, 2009 12:05:09 AM > Subject: Re: Seeking suggestion > > Jamie Prescott schrieb: > > > Is the implementation I posted the only one, or there are shorter/better > > ones? > > You cou

Re: [RFA] Fix documentation of snprintf and vsnprintf

2009-05-23 Thread Dave Korn
Eli Zaretskii wrote: > The current documentation of these two functions is misleading, and can > easily cause off-by-one bugs, if one follows it to the letter and > doesn't double-check with what the source actually does. > > I tried to be more accurate in the patch below. > > OK? I think it's

[RFA] Fix documentation of snprintf and vsnprintf

2009-05-23 Thread Eli Zaretskii
The current documentation of these two functions is misleading, and can easily cause off-by-one bugs, if one follows it to the letter and doesn't double-check with what the source actually does. I tried to be more accurate in the patch below. OK? 2009-05-23 Eli Zaretskii * snprintf.c

Re: Seeking suggestion

2009-05-23 Thread Georg-Johann Lay
Jamie Prescott schrieb: Is the implementation I posted the only one, or there are shorter/better ones? You could use insn attribute to express insns' effects on cc_status. Have a look at the avr backend. Georg-Johann