Re: "error: static assertion failed: [...]" (was: [GCC Wiki] Update of "DiagnosticsGuidelines" by MartinSebor)

2016-07-13 Thread Manuel López-Ibáñez
On 13/07/16 14:26, Thomas Schwinge wrote: Hi! I had recently noticed that given: #ifndef __cplusplus /* C */ _Static_assert(0, "foo"); #else /* C++ */ static_assert(0, "foo"); #endif ..., for C we diagnose: [...]:2:1: error: static assertion failed: "foo"

"error: static assertion failed: [...]" (was: [GCC Wiki] Update of "DiagnosticsGuidelines" by MartinSebor)

2016-07-13 Thread Thomas Schwinge
Hi! I had recently noticed that given: #ifndef __cplusplus /* C */ _Static_assert(0, "foo"); #else /* C++ */ static_assert(0, "foo"); #endif ..., for C we diagnose: [...]:2:1: error: static assertion failed: "foo" _Static_assert(0, "foo"); ^~ ...,