This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C Code mutilation by using gcc-3.3.x
- From: "Robert M. Stockmann" <stock at stokkie dot net>
- To: Marc Espie <espie at quatramaran dot ens dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 11 Feb 2004 01:45:01 +0100 (CET)
- Subject: Re: C Code mutilation by using gcc-3.3.x
On Wed, 11 Feb 2004, Marc Espie wrote:
> In article <Pine.LNX.4.44.0402042222180.23859-100000@hubble.stokkie.net> you write:
> >BTW. inside the Linux kernel source the Changes file explicitly states :
> >
> >"The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it
> >should be used when you need absolute stability. You may use gcc 3.0.x
> >instead if you wish, although it may cause problems. Later versions of gcc
> >have not received much testing for Linux kernel compilation, and there are
> >almost certainly bugs (mainly, but not exclusively, in the kernel) that
> >will need to be fixed in order to use these compilers. In any case, using
> >pgcc instead of egcs or plain gcc is just asking for trouble."
>
>
> >Network Engineer - UNIX/Linux Specialist
>
> if you are indeed a Linux specialist, you should know better than to
> trust what's written in the Linux kernel source. The people writing this
> have been known, time and again, to use undocumented features specific to
> one set of gcc versions, and then complain fiercely when it broke with
> another version.
>
> Hum... come to think of it, sounds like a linux specialist.
>
> Except for the part where you complain that an older compiler does not
> compile code that uses a standard that was mostly written *after* the
> compiler reached its end of life. That's a new twist. Congratulations.
>
gcc-3.3.x allows the use of unnamed/annonymous structs and unions inside
C header files. As an example of that :
#ifndef _sample_frontend_h
#define _sample_frontend_h
#define gcc_mailing_list { \
next: NULL, \
previous: NULL, \
name: "ignorant_moderator", \
detect: gcc3_bug, \
release: gcc3_release, \
info: NULL, \
command: NULL, \
abort: gcc3_abort, \
reset: gcc3_reset, \
emulated: 0,
}
#endif /*_sample_frontend_h */
gcc-3.3.x allows the above style of header files. My suggestion is,
to not hand over compiler versions to software vendors which allow
this. gcc-2.95.3 explicit does not allow the above header style.
Giving 3rd party software vendors not only the possibility to offer binary
only kernel driver modules, but also handing them over gcc compiler versions
which allow the possibility of interfacing with unnamed and anonymous structs
and unions inside header files, is asking for trouble, in a project which has
Open Source
as its main goal.
Regards,
Robert
--
Robert M. Stockmann - RHCE
Network Engineer - UNIX/Linux Specialist
crashrecovery.org stock@stokkie.net