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


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.


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