This is the mail archive of the gcc@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]

Re: rfc: __builtin_syntax_error


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~


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