summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown12
1 files changed, 7 insertions, 5 deletions
diff --git a/c.html.markdown b/c.html.markdown
index 1ff8658c..0c6df413 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -8,6 +8,7 @@ contributors:
- ["Marco Scannadinari", "https://marcoms.github.io"]
- ["Zachary Ferguson", "https://github.io/zfergus2"]
- ["himanshu", "https://github.com/himanshu81494"]
+ - ["Joshua Li", "https://github.com/JoshuaRLi"]
---
Ah, C. Still **the** language of modern high-performance computing.
@@ -19,11 +20,12 @@ memory management and C will take you as far as you need to go.
> **About compiler flags**
>
> By default, gcc and clang are pretty quiet about compilation warnings and
-> errors, which can be very useful information. Using some
-> stricter compiler flags is recommended. Here is an example you can
-> tweak to your liking:
+> errors, which can be very useful information. Explicitly using stricter
+> compiler flags is recommended. Here are some recommended defaults:
>
-> `-Wall -Wextra -Werror -O0 -ansi -pedantic -std=c11`
+> `-Wall -Wextra -Werror -O2 -std=c99 -pedantic`
+>
+> For information on what these flags do as well as other flags, consult the man page for your C compiler (e.g. `man 1 gcc`) or just search online.
```c
// Single-line comments start with // - only available in C99 and later.
@@ -348,7 +350,7 @@ int main (int argc, char** argv)
printf("Error occurred at i = %d & j = %d.\n", i, j);
/*
https://ideone.com/GuPhd6
- this will print out "Error occurred at i = 52 & j = 99."
+ this will print out "Error occurred at i = 51 & j = 99."
*/
///////////////////////////////////////