Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change in template class handling?



On 4/25/06, Chris Espinosa <email@hidden> wrote:
>
> I'd always start by preprocessing my source and seeing if some
> "helpful" header file was defining 'len" as a macro or global
> constant.  One never knows.

I try to avoid looking at preprocessed source as much as possible. 
One of our third-party libraries makes some...creative...use of the
preprocessor, so that, depending on the selection of preprocessor
defines, the same codebase can compile as valid K&R C, valid ANSI C,
or valid class-based C++.  Makes for some rather messy results after
the preprocessor is finished with it.

> the general answer to your question is that yes, gcc 4.x has stricter
> adherence to the C++ standard, which often makes loosely-written code
> break.  If you are correct in saying that this shouldn't compile, and
> it doesn't, then gcc 4 is behaving correctly, right?

It's behaving correctly, yes, but it's rather annoying to have code
that's worked for the past six years suddenly stop doing so.

--
Mark Wagner
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Change in template class handling? (From: "Mark Wagner" <email@hidden>)
 >Re: Change in template class handling? (From: Chris Espinosa <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.