This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20484] No proper linkage created for in class initialized static const


------- Additional Comments From dopheide at fmf dot nl  2005-03-15 18:46 -------
You are correct. I was wrong.

I thought, because of consistency reasons, that
1) both should link, or
2) both shouldn't link.
(And I choose 1) for the "bug"-report.)

As I now understand it, the "static int const A = 1;" will be seen as an
"integral constant expression". If, OTOH, a reference has to be taken, it is
seen as a "normal int", thus requiring an actual definition. (It is in 9.4.2 of
the standard.)

See also bugs 14404, 13259, 15244, 17673.

(I search the bugs database before filing, but could not find it.)

It stills /looks/ inconsistent though.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20484


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]