Re: [C/C++ PATCH] Allow __atomic_always_lock_free in a static assert (PR c/62024)

2014-09-02 Thread Marek Polacek
On Wed, Aug 27, 2014 at 03:06:38PM -0400, Jason Merrill wrote: On 08/25/2014 07:43 AM, Marek Polacek wrote: * semantics.c (finish_static_assert): Strip no-op conversions. I think I'd rather strip these in cxx_eval_builtin_function_call so that we don't have to deal with them in various

Re: [C/C++ PATCH] Allow __atomic_always_lock_free in a static assert (PR c/62024)

2014-09-01 Thread Marek Polacek
On Wed, Aug 27, 2014 at 05:59:17PM +, Joseph S. Myers wrote: On Mon, 25 Aug 2014, Marek Polacek wrote: PR62024 reports that we can't use __atomic_always_lock_free in a static assert, as the FEs say it's not a constant expression. Yet the docs say that the result of

Re: [C/C++ PATCH] Allow __atomic_always_lock_free in a static assert (PR c/62024)

2014-08-27 Thread Joseph S. Myers
On Mon, 25 Aug 2014, Marek Polacek wrote: PR62024 reports that we can't use __atomic_always_lock_free in a static assert, as the FEs say it's not a constant expression. Yet the docs say that the result of __atomic_always_lock_free is a compile time constant. We can fix this pretty easily.

Re: [C/C++ PATCH] Allow __atomic_always_lock_free in a static assert (PR c/62024)

2014-08-27 Thread Jason Merrill
On 08/25/2014 07:43 AM, Marek Polacek wrote: * semantics.c (finish_static_assert): Strip no-op conversions. I think I'd rather strip these in cxx_eval_builtin_function_call so that we don't have to deal with them in various consumers. Jason

[C/C++ PATCH] Allow __atomic_always_lock_free in a static assert (PR c/62024)

2014-08-25 Thread Marek Polacek
PR62024 reports that we can't use __atomic_always_lock_free in a static assert, as the FEs say it's not a constant expression. Yet the docs say that the result of __atomic_always_lock_free is a compile time constant. We can fix this pretty easily. While fold folds __atomic_always_lock_free to a