• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: gcc4 question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc4 question


  • Subject: Re: gcc4 question
  • From: Joseph Oreste Bruni <email@hidden>
  • Date: Mon, 31 Oct 2005 21:42:43 -0700

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:
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: This email sent to email@hidden
References: 
 >gcc4 question (From: Dmitry Markman <email@hidden>)

  • Prev by Date: gcc4 question
  • Next by Date: Re: [xcode] make in external target
  • Previous by thread: gcc4 question
  • Index(es):
    • Date
    • Thread