This is the mail archive of the 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: [PATCH] Repair __builtin_setjmp/__builtin_longjmp

> I think that, for each builtin function, either:
> (a) we should document it in the manual as something users can use (if
> there are reasonable use cases), or
> (b) make it an error to call it from user code (if it doesn't make any
> sense for users to use the function).
> I was guessing that your new functions were in the (b) category.

I've changed my mind. :-)  I don't see any real reasons why the builtins 
should not be exposed like all the other GCC builtins, they are not more 
exotic than them.  All are hooks into the compiler and you're supposed to 
know what you're doing if you call them directly.

So (a) would seem more appropriate.  But documenting them would be sort of a 
commitment to maintaining their interface, which would IMHO be a gratuitous 
burden on our shoulders.

So, in the end, I think I'd do

 (c) document briefly how they work in the sources of the compiler

which happens to have already been done in gimple-low.c :-)

Eric Botcazou

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