Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

expression must have pointer-to-object type

$
0
0

Following compiles with gcc but fails with Intel compiler, any idea?

typedef float __attribute__ ( ( vector_size( 4*sizeof(float) ) ) ) Vec4F;
float x(Vec4F const & v){return  v[0];}
>icpc -v
icpc version 15.0.0 (gcc version 4.8.1 compatibility)>icpc -c foo.cc
Y/src/foo.cc(2): error: expression must have pointer-to-object type
  float x(Vec4F const & v){return  v[0];}
                                   ^

compilation aborted for foo.cc (code 2)

Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>