Hi,

I still had 2.95 on my machine (Debian). Results are:

[EMAIL PROTECTED]:~$ gcc-2.95 --version
2.95.4

[EMAIL PROTECTED]:~$ gcc-2.95 --std=c99 -pedantic -Wall -W -ofoo foo.c
cc1: unknown C standard `c99'
foo.c:5: field `b' has incomplete type
foo.c: In function `main':
foo.c:20: warning: unknown conversion type character `z' in format
foo.c:20: warning: unknown conversion type character `z' in format
foo.c:20: warning: unknown conversion type character `z' in format
foo.c:20: warning: too many arguments for format

Kind regards,
Martijn

Linus Torvalds wrote:

On Sun, 28 Aug 2005, Antti-Juhani Kaijanaho wrote:
This is not true under C99.  If an array[] is the last member of a
struct (which is what we are, AFAIK, talking about), then sizeof that
struct is defined and gives the size of that struct as if the array's
size were zero (but the struct cannot be used in an automatic context).

Ahh, thanks. Mea culpa, I thought it was illegal in general. In that case,
the only reason not to use [] is that older gcc's don't like it, but even
that version cut-off may be old enough to not matter.

Anybody know? gcc-2.95 is still considered production at least for the
kernel. I don't have it available to test whether it understands []
though.

                Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to