public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "roman at binarylife dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/46688] New: [4.6 Regression] g++ requires a function declaration when it should not
Date: Sat, 27 Nov 2010 23:30:00 -0000	[thread overview]
Message-ID: <bug-46688-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2010-11-27 23:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-27 23:30 roman at binarylife dot net [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46688-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).