This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fw: quesitons about gcc 4.4.1
- From: Ian Lance Taylor <iant at google dot com>
- To: lin li <helloworld_lilin at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 21 May 2010 10:06:46 -0700
- Subject: Re: Fw: quesitons about gcc 4.4.1
- References: <954323.45863.qm@web54305.mail.re2.yahoo.com>
lin li <helloworld_lilin@yahoo.com> writes:
> I have some questions about GCC/G++ 4.4.1. The first questions is
> that we find that the gcc compiler support some C99 extensions by
> default. For example, the gcc 4.4 document says "New character data
> types, per TR 19769: New character types in C, are now supported for
> the C compiler in -std=gnu99 mode, as __CHAR16_TYPE__ and
> __CHAR32_TYPE__". However, the new __CHAR16_TYPE__ and
> __CHAR32_TYPE__ are recognized by the compiler by default. And it
> seems the -ansi and other -std options do not work. Do you aware
> this bug?
>
> Another thing is that I am reading the document about porting to gcc 4.4 here:
> http://gcc.gnu.org/gcc-4.4/porting_to.html
>
> I am interested in the 'Header dependency changes' section. It means
> our legacy codes need to be change for this. Could you tell me why
> you made this change?
Please do not send e-mail to both gcc@gcc.gnu.org and
gcc-help@gcc.gnu.org. This message is appropriate for gcc-help.
Please take any followups there. Thanks.
Names that begin with a double underscore, like __CHAR16_TYPE__, are
reserved for use by the compiler. In c90 mode we try to be careful to
compile any program which conforms to the ISO C90 standard. Such a
program can not use a name like __CHAR16_TYPE__. So it's not clear to
me that defining these types in c90 mode is a bug. I wouldn't
personally be opposed to changing it, but I would want to see a reason
to make the change. The fact that the C90 standard does not define
__CHAR16_TYPE__ is not, as far as I can see, a reason that gcc should
not define it in c90 mode.
I believe that the header dependency changes were made to speed up C++
compilations.
Ian