Re: [C++ Patch] PR 39970

2012-04-25 Thread Paolo Carlini
On 04/25/2012 01:41 AM, Jason Merrill wrote: On 04/24/2012 05:24 PM, Paolo Carlini wrote: Perhaps we aren't checking default arguments unless they're actually used; a could change that if they aren't dependent. Your reply reached the mailing list a bit mangled, could you please clarify? If

[C++ Patch] PR 39970

2012-04-24 Thread Paolo Carlini
Hi, I'm trying to resolve this rather old PR, where we don't reject uses of the dot operator in default template arguments, eg: class blah { int member; }; blah global; templateint param = global.member class template_blah; I'm enforcing the check by adding to cp_parser a new

Re: [C++ Patch] PR 39970

2012-04-24 Thread Paolo Carlini
Hi, We should already reject that because it isn't a constant expression; I don't think we want to bother checking specifically for this case in the parser as well. Sure we reject this kind of code at instantiation time. I suspect submitter bothered filing a PR because other front-end also

Re: [C++ Patch] PR 39970

2012-04-24 Thread Jason Merrill
On 04/24/2012 05:24 PM, Paolo Carlini wrote: Perhaps we aren't checking default arguments unless they're actually used; a could change that if they aren't dependent. Your reply reached the mailing list a bit mangled, could you please clarify? If the default argument isn't dependent on other

Re: [C++ Patch] PR 39970

2012-04-24 Thread Paolo Carlini
On 04/25/2012 01:41 AM, Jason Merrill wrote: On 04/24/2012 05:24 PM, Paolo Carlini wrote: Perhaps we aren't checking default arguments unless they're actually used; a could change that if they aren't dependent. Your reply reached the mailing list a bit mangled, could you please clarify? If