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: gcc4 question



My guess (and I'm only guessing) is that static in global scope is actually just file scope.



On Oct 31, 2005, at 8:05 PM, Dmitry Markman wrote:

Hi
it could be OT

I discovered that gcc4 doesn't tolerate
global static operator new
gcc3.3 was fine with that
also I found that C++ standard (3.7.3.1) restricts it:
"An allocation function shall be a class member function or a global function; a program is ill-formed if an allocation
function is declared in a namespace scope other than global scope or declared static in global scope."


interesting that that sentence was approved at 1998 and only now gcc compiler actually
implemented that restriction


can anybody explain me why it's a bad thing to declare operator new as static in global scope
(I didn't find any comment about that in Stroustrup's book)


thanks in advance

Dmitry Markman

_______________________________________________
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

_______________________________________________ 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: 
 >gcc4 question (From: Dmitry Markman <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.