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++/53094] constexpr vector subscripting


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);


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