[Bug c++/13903] using namespace X does not work for operator new

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jan 28 23:18:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-28 23:18 -------
Actually this is invalid code, from ICC 6.0::
pr13903.cc
pr13903.cc(8): error: allocation operator may not be declared in a namespace
          void *operator new(size_t size) throw();
                ^

pr13903.cc(29): error: namespace "FX" has no member "operator new"
  using FX::operator new;
            ^

compilation aborted for pr13903.cc (code 2)

You cannot have an operator new defined in a namespace.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|rejects-valid               |accepts-invalid, diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-28 23:18:21
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13903



More information about the Gcc-bugs mailing list