Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dataflow
on Aug 1, 2021
|
parent
|
context
|
favorite
| on:
Learning that you can use unions in C for grouping...
Try
struct S { struct { int x; }; };
under -pedantic and you'll get
warning: ISO C++ prohibits anonymous structs [-Wpedantic]
midjji
on Aug 1, 2021
[–]
Pedantic is for the older C++ standard, its not pedantic for the latter e.g c++11, I think this changed.
junon
on Aug 1, 2021
|
parent
|
next
[–]
No, pedantic is for disabling compiler extensions. You still need to explicitly specify a standard.
midjji
on Aug 2, 2021
|
root
|
parent
|
next
[–]
gcc pedantic ignores the language flag, and clang and intel state they mirror gcc. So pedantic would be not C++11 even if you added that.
dataflow
on Aug 1, 2021
|
parent
|
prev
[–]
Well that blows my mind, I never realized pedantic ignores the language setting. Is this the only case where it does that?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: