This is the mail archive of the gcc-bugs@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]

should "char T[0];" compile?


I think I found a bug(didn't find it in the known bug section) in gcc
ver 2.95 compiled for solaris (sparc) or else I misinterpret the c++
standard (8.3.4) that says that size of array should be greater than
zero.


This program should not compile:

int main(void){
   char T[0];    //  <- array size should be positive > 0 (C++ std
8.3.4)
   T[0] = 1;
   return T[0];
} ;

the full output of  "gcc -v --save-temps -Wall cta.cpp" are in the
attachement

TestFiles.tar

S/MIME Cryptographic Signature


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