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]

C++ chokes on static char foo[]={"bar"};


Hi!

C++ dies with initializer-string for array of chars is too long
even if the size of array is not specified:

static const char foo[] = {"bar"};

This works just fine in C and used to work with older C++ as well.
c-typeck.c digest_init allows this because it checks whether either
TYPE_DOMAIN is NULL_TREE in comptypes, but for C++ it seems like TYPE_DOMAIN
is always NULL, so I'm not sure how to fix this...

	Jakub

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