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: clobber all call-saved registers


> On Wed, Jan 09, 2002 at 10:56:06AM +0000, Richard Earnshaw wrote:
> > Rather than creating loads of builtins that do lots of randomly different 
> > things, how about a __builtin_diagnostic(type,...) that can be used for a 
> > whole slew of these.
> 
> I don't see the difference.
> 
> 
> r~

__builtin_clobber_call_regs  requires docuementation that says don't use 
it.
__builtin_test_someting_else requires docuementation that says don't use 
it.
...

Plus someone will then think "But that's what I want to make the compiler 
do, and the name clearly implies that, so I'll use it anyway" and we will 
end up with fights again as to whether we should continue to support it 
*in the way in which the user was relying upon it*.  People have misused 
several of our builtins in the past, and then wondered why the code wasn't 
portable to another machine or another release of the compiler.


If we have

__builtin_diagnostic(53)

Then externally we can say "__builtin_diagnostic is used for internal 
testing of the compiler, there are many sub-codes that affect the 
behaviour of this command, but they are not documented here, since they 
must not be used outside of testing the compiler".

Of course, we still have to have a table explaining what the sub-codes 
are, but it doesn't have to appear in the using and porting manual.

R.


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