public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46688] New: [4.6 Regression] g++ requires a function declaration when it should not
@ 2010-11-27 23:30 roman at binarylife dot net
  2010-11-28  1:29 ` [Bug c++/46688] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: roman at binarylife dot net @ 2010-11-27 23:30 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] g++ requires a function declaration
                    when it should not
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: roman@binarylife.net


$ cat test.cc 
struct A {
   A(int);
};

struct B {
   B() {}
   A a[];
};
$ g++ test.cc 
test.cc: In constructor 'B::B()':
test.cc:6:8: error: no matching function for call to 'A::A()'
test.cc:2:4: note: candidates are: A::A(int)
test.cc:1:8: note:                 A::A(const A&)

The same problem with A a[0];

v4.5 is perfect in this respect.


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

end of thread, other threads:[~2011-01-14 13:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-27 23:30 [Bug c++/46688] New: [4.6 Regression] g++ requires a function declaration when it should not roman at binarylife dot net
2010-11-28  1:29 ` [Bug c++/46688] " rguenth at gcc dot gnu.org
2010-11-28  1:33 ` hjl.tools at gmail dot com
2011-01-03 20:27 ` rguenth at gcc dot gnu.org
2011-01-04 18:55 ` redi at gcc dot gnu.org
2011-01-13  0:05 ` jason at gcc dot gnu.org
2011-01-14 13:17 ` jason at gcc dot gnu.org
2011-01-14 13:44 ` paolo.carlini at oracle dot com

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).