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]

Re: GCC's statement expression extension


> 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.

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