rfc: __builtin_syntax_error

Richard Henderson rth@redhat.com
Mon Jan 14 13:33:00 GMT 2002


On Mon, Jan 14, 2002 at 11:00:58AM -0800, Aldy Hernandez wrote:
>   __builtin_choose_expr (__builtin_types_compatible (typeof(a), char),
> 			 something_char(a),
> 			 check for int.... something_int(a)
> 			 check for float.. something_float(a)
> 			 default: 
> 			   __builtin_syntax_error("invalid type", __LINE__)

How about (void)0 as the last entry?  What would prevent the
result from being used.  If the "function" is already a void,
you could try (0 = 0) or something.

It wouldn't be the best error message, but it would be something.


r~



More information about the Gcc mailing list