This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why is this code accepted?
- To: gcc at gcc dot gnu dot org, nbecker at fred dot net
- Subject: Re: Why is this code accepted?
- From: Mike Stump <mrs at windriver dot com>
- Date: Mon, 16 Apr 2001 14:58:30 -0700 (PDT)
> To: gcc@gcc.gnu.org
> From: nbecker@fred.net
> Date: 16 Apr 2001 16:27:42 -0400
> This code compiles without complaint both on gcc-2.96 and on a
> recent gcc-3 snapshot, but doesn't link. I suspect the
> initialization of the static "a" is invalid (I don't have a good
> reference handy), but isn't gcc behaviour wrong?
There was a g++ feature that allowed this to work, a while ago.
Someone broke that feature, and didn't remove the feature from all
places in the compiler that supported the feature. As I recall, the
standard doesn't support this feature.