This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid.
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Mar 2012 19:58:34 +0000
- Subject: [Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid.
- Auto-submitted: auto-generated
- References: <bug-40942-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40942
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #7 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-03-29 19:58:34 UTC ---
Clang prints:
/tmp/webcompile/_25725_0.cc:15:5: error: call to constructor of 'S' is
ambiguous
S s1 ("test");
^ ~~~~~~
/tmp/webcompile/_25725_0.cc:4:3: note: candidate constructor [with T = char]
S (T const *)
^
/tmp/webcompile/_25725_0.cc:8:3: note: candidate constructor [with N = 5]
S (char const (&)[N])
^
/tmp/webcompile/_25725_0.cc:1:8: note: candidate is the implicit copy
constructor
struct S
^
1 error generated.