This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/40942] GCC accepts code that Comeau and MSVC deems invalid.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]