Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 15333
Product:  
Component:  
Status: RESOLVED
Resolution: DUPLICATE of bug 15083
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: ofv@wanadoo.es
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 15333 depends on: Show dependency tree
Show dependency graph
Bug 15333 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2004-05-06 23:21
I'm seeing hundreds of warnings like this on a project that uses the idiom of 
self-registering objects.

It only happens if the constructor is a template.

This is a regression wrt previous gcc releases.

// Test case begins

class B {
public:
  B();  // Implemented elsewhere
};


class A {
public:
  template <typename T1>
  A(T1) {
    new B;
  }
};


A a(10);

// Test case ends

t:/sec/exp # g++ -c -Wall p.cpp 
p.cpp: In constructor `A::A(T1)':
p.cpp:11: warning: statement has no effect

------- Comment #1 From Andrew Pinski 2004-05-06 23:23 -------
This is a dup of bug 15083.

*** This bug has been marked as a duplicate of 15083 ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug