[Bug c++/12807] [tree-ssa] ICE on variable sized array in class
reichelt at igpm dot rwth-aachen dot de
gcc-bugzilla@gcc.gnu.org
Tue Oct 28 10:48:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12807
------- Additional Comments From reichelt at igpm dot rwth-aachen dot de 2003-10-28 10:45 -------
Subject: Re: [tree-ssa] ICE on variable sized array in class
On 28 Oct, falk dot hueffner at student dot uni-tuebingen dot de wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12807
>
>
>
> ------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de 2003-10-28 10:31 -------
> Subject: Re: [tree-ssa] ICE on variable sized array in class
>
> "reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>
>> Oops, the code seems to be valid.
>
> No, since the static member is not initialized with a const
> expression. Otherwise, gcc wouldn't know sizeof() of the class.
Well, I think it's an instance of the variable sized array extension.
You just have a pointer there, as far as I understand it. The memory is
allocated in a different location at runtime. So there should be no
problem to compute sizeof().
Btw, all versions since 3.0 accept the code - and since 3.3.1 they
reject it if -pedantic is specified.
------- Additional Comments From reichelt at igpm dot rwth-aachen dot de 2003-10-28 10:45 -------
Subject: Re: [tree-ssa] ICE on variable sized array in class
On 28 Oct, falk dot hueffner at student dot uni-tuebingen dot de wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12807
>
>
>
> ------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de 2003-10-28 10:31 -------
> Subject: Re: [tree-ssa] ICE on variable sized array in class
>
> "reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>
>> Oops, the code seems to be valid.
>
> No, since the static member is not initialized with a const
> expression. Otherwise, gcc wouldn't know sizeof() of the class.
Well, I think it's an instance of the variable sized array extension.
You just have a pointer there, as far as I understand it. The memory is
allocated in a different location at runtime. So there should be no
problem to compute sizeof().
Btw, all versions since 3.0 accept the code - and since 3.3.1 they
reject it if -pedantic is specified.
------- Additional Comments From reichelt at igpm dot rwth-aachen dot de 2003-10-28 10:45 -------
Subject: Re: [tree-ssa] ICE on variable sized array in class
On 28 Oct, falk dot hueffner at student dot uni-tuebingen dot de wrote:
> ------- Additional Comments From falk dot hueffner at student dot uni-tuebingen dot de 2003-10-28 10:31 -------
> Subject: Re: [tree-ssa] ICE on variable sized array in class
>
> "reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>
>> Oops, the code seems to be valid.
>
> No, since the static member is not initialized with a const
> expression. Otherwise, gcc wouldn't know sizeof() of the class.
Well, I think it's an instance of the variable sized array extension.
You just have a pointer there, as far as I understand it. The memory is
allocated in a different location at runtime. So there should be no
problem to compute sizeof().
Btw, all versions since 3.0 accept the code - and since 3.3.1 they
reject it if -pedantic is specified.
More information about the Gcc-bugs
mailing list