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 at codesourcery dot com
- Subject: Re: GCC's statement expression extension
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 2 Aug 2000 13:43:57 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org, per at bothner dot com
> To: mrs@windriver.com
> Cc: per@bothner.com, gcc@gcc.gnu.org
> From: Mark Mitchell <mark@codesourcery.com>
> Date: Tue, 01 Aug 2000 21:52:07 -0700
> Since this does not work correctly in C++, can we agree that this
> usage should be removed from glibc when compiling C++?
Yes.
> Also, can we add a note to the documentation section on
> statement-expressions in C++ giving this example, and explaining how
> it can surprise C++ users, so that people who go read about this
> extension in C will at least be aware that there are issues with
> this extension in C++?
Sure.
printf("%s", bad_c_marco((a+b).c_str()));
would be the canonical example, but I don't know of a libc function to
put here that uses SEs.