On 07/14/2014 04:36 AM, Jan Hubicka wrote:
FAIL: g++.dg/cpp0x/static_assert9.C -std=c++11 (test for excess errors)
Excess errors:
/daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1:
error: non-constant condition for static assertion
/daten/aranym/gcc/gcc-20140714/gcc/testsuite/g++.dg/cpp0x/static_assert9.C:5:1:
error: '(f != 0u)' is not a constant expression
Ah, sorry, missed this one. I think the error is correct (based on earlier
discussion we can
not really expect addresses of symbols to be non-NULL), so I would just update
the testcase?
Hmm. I think the C++ standard says this is constant, and of course
whether an expression is constant is more significant in C++ because of
templates and constexpr. clang doesn't give this error, EDG does.
For C++, my inclination would be to say that if a symbol is declared
weak, it needs to be declared weak before the first use, just like
inline functions.
Jason