Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Post History

50%
+1 −1
Meta Default Rules: Extensions

The C (gcc) implies extensions - it will only work with that specific compiler under it's default setting GNU17 (equivalent to -std=gnu17), which is mostly a superset of standard C. This also inclu...

posted 3y ago by Lundin‭

Answer
#1: Initial revision by user avatar Lundin‭ · 2021-08-16T08:00:28Z (over 3 years ago)
The `C (gcc)` implies extensions - it will only work with that specific compiler under it's default setting GNU17 (equivalent to `-std=gnu17`), which is mostly a superset of standard C. This also includes a number of POSIX functions.

Another option is standard C, meaning no extensions and no constraint or syntax violations. This would be equivalent to `gcc -std=c17 -pedantic-errors`. As a subset of standard C, there is yet another option: strictly conforming standard C, meaning there can also be no poorly-defined behavior.

The definition of a strictly conforming program can be found in C17 4/5:

> A _strictly conforming program_ shall use only those features of the language and library specified in this International Standard. It shall not produce output dependent on any unspecified, undefined, or implementation-defined behavior, and shall not exceed any minimum implementation limit.

Solutions in standard C and/or strictly conforming should be labelled as such by the poster. Otherwise, the default behavior of the specific compiler with no options passed to it is assumed to apply.

C++ (g++) behaves mostly the same, though in C++ there's also the boost library which has to be included explicitly. I think boost is to be regarded as any 3rd party lib and solutions using it will then be `C++ with boost`.