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] | |
Hi,
I am expecting a error (redefinition of "a") from following piece of code. But gcc (3.4.2) doesnot give any error. ///////////////// int a; char b; int a;
void foo(void) { return; } ///////////////// Instead, if we try initialising "a" at BOTH the places, then it gives error. VC++ gives this error anyway.
VC++ is a C++ compiler, where the above is an error gcc is a C compiler, where the above is not an error
-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |