Hi,

On 17/05/2016 20:15, Jason Merrill wrote:
On 05/17/2016 04:47 AM, Paolo Carlini wrote:
... alternately, if the substance of my patchlet is right, we could
simplify a bit the logic per the below.

Here's a well-formed variant that was accepted by 4.5. Does your patch fix it? I also think with your patch we can drop the C++11 check, since list-initialization doesn't exist in C++98.
Oh nice, the new testcase indeed passes with my patch. However, removing completely C++11 check causes a regression in c++98 mode for init/explicit1.C, we start warning for it:

struct A { explicit A(int = 0); };
struct B { A a; };

int main()
{
  B b = {};            // { dg-warning "explicit" "" { target c++11 } }
}

(just checked, apparently clang too accepts init/explicit1.C in c++98)

Thanks,
Paolo.



Reply via email to