Re: C++ PATCH for c++/86608, reading constexpr volatile variable

2018-12-11 Thread Jason Merrill
OK. On Tue, Dec 11, 2018 at 1:35 PM Marek Polacek wrote: > > On Tue, Dec 11, 2018 at 10:26:00AM -0500, Jason Merrill wrote: > > On 12/10/18 8:48 PM, Marek Polacek wrote: > > > A template-argument for a non-type template-parameter shall be a converted > > > constant expression. But an lvalue-to-rv

Re: C++ PATCH for c++/86608, reading constexpr volatile variable

2018-12-11 Thread Marek Polacek
On Tue, Dec 11, 2018 at 10:26:00AM -0500, Jason Merrill wrote: > On 12/10/18 8:48 PM, Marek Polacek wrote: > > A template-argument for a non-type template-parameter shall be a converted > > constant expression. But an lvalue-to-rvalue conversion applied to a > > volatile > > glvalue is not allowe

Re: C++ PATCH for c++/86608, reading constexpr volatile variable

2018-12-11 Thread Jason Merrill
On 12/10/18 8:48 PM, Marek Polacek wrote: A template-argument for a non-type template-parameter shall be a converted constant expression. But an lvalue-to-rvalue conversion applied to a volatile glvalue is not allowed to be part of the evaluation of a constant expression. So this test should be

C++ PATCH for c++/86608, reading constexpr volatile variable

2018-12-10 Thread Marek Polacek
A template-argument for a non-type template-parameter shall be a converted constant expression. But an lvalue-to-rvalue conversion applied to a volatile glvalue is not allowed to be part of the evaluation of a constant expression. So this test should be rejected. The non_const_var_error tweaks ar