This is the mail archive of the gcc-help@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: Is this a bug in gcc??


Hi Name lastlong,

>But don't you think that C compiler (gcc) also output this error?

It's not an error in C, therefore a C compiler would be non-compliant to the C standard if it produced an error. (And it would break a lot of correct code.)

>My observation is gcc outputs error only if we try to initialise both instant of "a".

In C, there is only one instance of "a".

Stroustrup talks about C/C++ incompatibility in his C++ Programming Language (3rd and Special editions) on B.2.2.

HTH,
--Eljay


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