This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Invalid code in <limits>
- From: Michael Matz <matz at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>,"rth at redhat dot com" <rth at redhat dot com>
- Date: Wed, 29 Jan 2003 17:54:19 +0100 (CET)
- Subject: Re: Invalid code in <limits>
Hi,
On Wed, 29 Jan 2003, Mark Mitchell wrote:
> > We alreay do the same thing for static_cast<>, dynamic_casst<>,
> > reinterpret_cast<> and such. There is no additional inherent complexity.
>
> Well, I did write the code and I have spent a fair amount of time thinking
> about it, and I beg to differ. :-)
>
> You're suggesting treating bulitin functions as keywords, not as functions.
> (That's your analogy with static_cast and sizeof. Those constructs are
> not parsed as function calls at all.)
>
> If we do that, things will work -- but then we might as well have
> builtin *values* -- rather than builtin *functions*.
>
> That's what I'm suggesting.
Well, functions are obviously more usefull than values, because values are
the subset of constant functions. We already have builtin functions
taking arguments. I.e. mapping them to values can't be done. If you have
to regard them as keywords in the same sense as sizeof() to make it work,
well, then this is the way to go. I can't think of reasons why those
builtins should be treated as full-flavored functions (with all the
lookup rules, and whatnot) instead of keywords.
Ciao,
Michael.