On 12/7/05, Tommy Vercetti <[EMAIL PROTECTED]> wrote:
> Hi there
>
> We had funny issue here lately. Someone wanted to create table that
> had 0 elements in C++, for instance this code:

This is a gcc extension.  Try g++ -pedantic

Richard.

> int main()
> {
>          char a[0];
>          char b[0];
>
>          a[0] = 1;
>          b[0] = 2;
>
>          return a[0] + b[0];
> }
>
> is perfectly ok for g++, it isn't for other compilers.
> I would say this should cause fatal error. Even without any -W flags on.
> -pedantic works fine, but this should be an error always, not just
> when -pedantic is used.
>
>
> Thanks.
>
> --
> TV
>
> "If we knew what we were doing, it wouldn't be called Research, would
> it?" - AE
>
>
>
>
>

Reply via email to