This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ [RFC] taking address of a static const data member
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Fariborz Jahanian <fjahanian at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Mar 2005 14:25:23 -0500
- Subject: Re: C++ [RFC] taking address of a static const data member
- References: <20450ED5-9262-11D9-8A6B-000393B9ED88@apple.com>
On Mar 11, 2005, at 2:16 PM, Fariborz Jahanian wrote:
So, is g++ correct in rejecting this seemingly good user code?
Yes you need a place to store the data.
So for an example in your original testcase, you need:
const int Foo::foo;
Which fixes the problem and yes 9.4.2 explains this (I cannot find it
right
now but I know there has been multiple bugs about this in the past).
-- Pinski