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: statement expressions


   So, perhaps I should suggest a) deprecating the feature in C++, and b)
   removing usage of the feature from the glibc and kernel headers
   instead.  I have a feeling that won't make you any happier,
   though. :-) And, it's unfortunate to have GNU C be less a subset of
   GNU C++ than ISO C is of ISO C++.

While I have sympathy for your standpoint from a maintenance
standpoint I don't think it's feasable to do this on the short term.
All previously released versions of GCC have too many problems with
inline functions, especially in C++.  There are still quite a few
people out there using gcc 2.7.2, even on Linux.  Even if inlines in
GCC 3.0 are improved such that we can do all the nifty things done in
the glibc headers, we won't be able to dump the statement expressions
until GCC 3.0 is the dominant compiler used on the systems that use
glibc as their C library.  That might take a while.  Even a year after
its initial release I believe GCC 2.95 is not the most widely used
GCC version.  Unfortunately, one of the reasons why people hesitate to
use GCC 2.95 is the problems it has compiling old code because "the
language was cleaned up".

Removing/deprecating statement expressions will delay the acceptence
of GCC 3.0 as the compiler of choice for many people.

       Linus> So if you want to clean up the language, why not deprecate
       Linus> and eventually get rid of nested functions instead 

   You'll get only agreement from me.  But, I don't find these things
   mutually exclusive: I'd be more than happy to deprecate *both*
   features. :-)

We make quite heavy use of nested functions in the Hurd (both in glibc
and the Hurd itself).  I think they're quite an elegant way to
organize the code.  I don't care about C++, but *please* don't remove
nested functions from GNU C compiler.

Mark

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