This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC's statement expression extension
- To: Mark Mitchell <mark at codesourcery dot com>
- Subject: Re: GCC's statement expression extension
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 27 Jul 2000 12:33:39 +0100 (BST)
- cc: rth at cygnus dot com, law at cygnus dot com, gcc at gcc dot gnu dot org
On Wed, 26 Jul 2000, Mark Mitchell wrote:
> (Actually, I bet you can write those functions with only __typeof__
> and not statement-expressions:
>
> # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
Actually I've concluded on examining the specification of the <tgmath.h>
macros that glibc's versions are broken and the GCC's current facilities
don't seem to be sufficient to implement them anyway. More on this later.
(Quite how the standards committee thought the type-generic macros fitted
in with the spirit of C, I don't know.)
> Does that do the trick? The __typeof__ extension is far less
> problematic than statement-expressions -- although even __typeof__ has
> serious issues in C++, where the type of an expression can depend on
> its context.)
Perhaps these facilities can be deprecated / removed first in the C++
compiler.
--
Joseph S. Myers
jsm28@cam.ac.uk