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 07:08:48PM +0000, Joseph S. Myers wrote:
> On Mon, 14 Jan 2002, Aldy Hernandez wrote:
> 
> > #define some_c_overloaded_fun(a)
> >   __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__)
> 
> If this is to be a syntax error only when that part of the expression is
> chosen, we'll need the support that isn't yet there on the mainline for
> suppressing errors in parts of an expression, and make
> __builtin_choose_expr use it.  I think that the tentative diagnostics
> support on cp-parser-branch is sufficient; hopefully after 3.1 branches

yeah, but i need this for now.

i guess i can do an target specific builtin.  all i want the builtin to do
is error(whatever_the_builtin_got_fed).

aldy


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