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]
Other format: [Raw text]

Re: Anonymous types and [basic.link] for nonlocal variables


In message <C7CF55E0-76EF-11D8-B0DE-003065A77310@apple.com>, Mike Stump writes:
 >On Tuesday, March 9, 2004, at 02:47 PM, Joe Buck wrote:
 >> On Tue, Mar 09, 2004 at 02:29:43PM -0800, Matt Austern wrote:
 >>> Among other things, this patch enforces the rule that variables with
 >>> linkage may not be defined in terms of names with no linkage.
 >
 >>> This is one of those annoying problems where in one sense this is
 >>> clearly a correct change: it brings us into closer conformance with 
 >>> the
 >>> language standard that we claim to implement.  On the other hand, it
 >>> breaks the QT build.  I bet QT isn't alone.
 >>
 >> In my view, anything that breaks QT is a regression, no matter how
 >> many standards documents we can point to as justification.  Certainly
 >> -pedantic should object to such usage, and perhaps future QT versions
 >> should avoid such usage if possible, but we need to build QT.
 >
 >QT is just one build package.  gcc regularly breaks tens of them in a 
 >typical OS build.  :-)  I don't see much advantage in having a compiler 
 >that supports one specific package over the others.
 >
 >Having said that, this is what pedwarn and/or permissive are for.  The 
 >original patch had pedwarns in it, so I'm wondering how exactly things 
 >broke.  Does QT use -Werror?  If so, they should not in released 
 >versions.  In development versions, it seems fine to use -Werror, but 
 >we should not worry about breaking dev builds.
Well, having just walked through building Fedora Core 2 with a compiler
with this code, it's not terribly bad.  Yes, you get various breakage
in Qt, KDE and various other packages but nothing that can't be fixed
in a couple seconds.  And ultimately, fixing this trivial issues results
in more portable code -- I suspect the authors are actually happy to 
deal with these issues.

What's been *far* more annoying and far more common is problems caused by
removal of the cast-as-lvalue extension. 

jeff




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