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++/50785] [C++0x] static constexpr double undefined reference


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

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-10-19 16:58:05 UTC ---
(In reply to comment #11)
> it will be possible to add better waring/error in this case?

Not easily, the error you get is from the linker.  This has been discussed MANY
times in other bugzilla reports, search for PRs with status=RESOLVED and the
words "static const undefined reference"

> maybe some info when you try take ref from const static objects?

No, because there is nothing wrong with doing that as long as you have a
definition for the member.  I do not want the compiler to complain when I write
correct code just to remind people who write incorrect code not to forget
something.


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