This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53094] constexpr vector subscripting
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 03 Dec 2012 14:29:54 +0000
- Subject: [Bug c++/53094] constexpr vector subscripting
- Auto-submitted: auto-generated
- References: <bug-53094-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53094
--- Comment #7 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-12-03 14:29:54 UTC ---
a bit of cross posting with PR55573] sorry
this
typedef float __attribute__( ( vector_size( 4*sizeof(float) ) ) ) V4;
constexpr V4 build(float x,float y, float z) { return (V4){x,y,z,0};}
constexpr V4 x = build(1,0,0);
produces
c++ -std=c++11 -Ofast -c ceVec.cc
ceVec.cc:3:29: error: â(const V4)V4{1.0e+0f, 0.0f, 0.0f, 0.0f}â is not a
constant expression
constexpr V4 x = build(1,0,0);