public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54196] New: gcc doesn't find incompatible exception specification for operator
@ 2012-08-07 18:52 mib.bugzilla at gmail dot com
  2012-08-07 18:57 ` [Bug c++/54196] " mib.bugzilla at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mib.bugzilla at gmail dot com @ 2012-08-07 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54196
           Summary: gcc doesn't find incompatible exception specification
                    for operator
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mib.bugzilla@gmail.com


It look like g++ emit error for regular functions but not for new.  Here is the
example: 
For following test case g++ emit error for foo but not for operator new. 


class bad_alloc 
{ 
  public: 
    bad_alloc() throw() { } 
}; 
struct nothrow_t { }; 
extern const nothrow_t nothrow; 
typedef unsigned long size_t; 
//void* operator new(size_t) noexcept; 
void* operator new(size_t, const nothrow_t&); 

void foo(); 
int main(int argc, char *argv[]) 
{ 
  void* (*pf)(size_t) throw (bad_alloc) = operator new; 
  void* (*pf1)() throw (bad_alloc) = foo; 
}


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-09 19:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-07 18:52 [Bug c++/54196] New: gcc doesn't find incompatible exception specification for operator mib.bugzilla at gmail dot com
2012-08-07 18:57 ` [Bug c++/54196] " mib.bugzilla at gmail dot com
2012-08-07 20:55 ` redi at gcc dot gnu.org
2021-08-09 19:05 ` [Bug c++/54196] gcc doesn't find incompatible exception specification pinskia at gcc dot gnu.org
2021-08-09 19:06 ` pinskia at gcc dot gnu.org
2021-08-09 19:08 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).