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]

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


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?

I get "warning: ISO C forbids zero-size array 'i0'" with -pedantic.

-- 
Joseph S. Myers
joseph@codesourcery.com


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