This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52036] C++11 allows template parameters to have internal linkage
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 17:28:14 +0000
- Subject: [Bug c++/52036] C++11 allows template parameters to have internal linkage
- Auto-submitted: auto-generated
- References: <bug-52036-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52036
--- Comment #4 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-01-29 17:28:14 UTC ---
(In reply to comment #3)
> However compilation still fails if pi is given internal linkage by declaring it > static, i.e.
>
> int main()
> {
> static constexpr float pi = 3.14;
>
> Or even:
>
> namespace {
> static constexpr float pi = 3.14;
> }
I agree that both examples should work and that the lack of that is a bug when
compiled in C++11 mode. Paolo, this bug should be reopened.