This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25260] [4.0/4.1/4.2 Regression] Forward explicit intantiation declaration doesn't mix well with static integral member
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Dec 2005 17:23:18 -0000
- Subject: [Bug c++/25260] [4.0/4.1/4.2 Regression] Forward explicit intantiation declaration doesn't mix well with static integral member
- References: <bug-25260-11057@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from gdr at integrable-solutions dot net 2005-12-20 17:23 -------
Subject: Re: [4.0/4.1/4.2 Regression] Forward explicit intantiation
declaration doesn't mix well with static integral member
"fang at csl dot cornell dot edu" <gcc-bugzilla@gcc.gnu.org> writes:
| Subject: Re: [4.0/4.1/4.2 Regression] Forward explicit
| intantiation declaration doesn't mix well with static integral member
|
| > ------- Comment #3 from nicos at maunakeatech dot com 2005-12-20 09:20
-------
| > I was under the belief that out of class definitions of const static
integral
| > members was optional for gcc and that static const N = k; was equivalent to
| > enum { N = k};, was I wrong ?
|
| in-class definitions of static const integral types are *permitted* in
| lieu of out-of-class definitions -- but you need one or the other. Also
| enums are never allocated memory in object files (data section), as per
| W.B.'s remark.
For me, this discussion is yet another evidence for the remark
"that is a misfeature" (about the whole in-class initialization for
const integral business) that could be found in earlier printings of TC++PL3.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25260