This is the mail archive of the gcc-patches@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: PATCH c++/19628 (take 2)


On Sun, 30 Jan 2005, Matt Austern wrote:
> There may be other builtins that we want to allow in constant
> expressions.  If so, this patch will make it easy to add them
> as desired.

One distinction that may be useful in this respect, might be something
like builtin.c's CALLED_AS_BUILT_IN macro.  This can be used to
distinguish built-in functions called as __builtin_foo from those
called as foo (or std::foo).  By using this, the C++ front-end
maintainers could choose to allow __builtin_fabs(0.0) to be a
compile-time constant, whilst retaining the usual semantics of
fabs(0.0).  __builtin_constant_p would then be just a special case.


This isn't a request for Matt to tweak this patch, which is best
left for the C++ front-end maintainers to review, just a suggestion
of a potential implementation of Matt's new builtin_is_constant_p.

Roger
--


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