Community
cancel
Showing results for 
Search instead for 
Did you mean: 
salas__daniel
Beginner
69 Views

__builtin_choose_expr internal error

I have the following internal error when I try to use the C11 __builtin_choose_expr with a compound literal as follow: 

internal error: assertion failed at: "shared/cfe/edgcpfe/expr.c", line 259
  union utype {__typeof__(__builtin_choose_expr (0, (short) {0}, (double) {0})) u00_m;};


Another internal error arise when I use a block form :

internal error: bad pointer
  union utype {__typeof__(__builtin_choose_expr (0, ({short p00_val = {0}; p00_val;}),  ({double p00_val = {0}; p00_val;}))) u01_m;};

Do you have any work around to make this work ?

Thank you

Tags (1)
0 Kudos
2 Replies
TimP
Black Belt
69 Views

This forum may not bring attention to the issue. If it is ignored on c++ forum you may need a full ips problem report. The construct appears to be needed for compatibility with gcc 4.7 and newer so ought to work with icc 7.0.1.
salas__daniel
Beginner
69 Views

Thank you Tim for your answer. I've find a way to pass through the problem.
Here is the Jens Gustedt's method :

union utype {__typeof__(__builtin_choose_expr (0, *(short*)0, *(double*)0)) u00_m;};

With this casting form the compiler doesn't complain anymore !
 

Reply