History

Turn on a implicit-function-declaration warning by default.

A non declared function leads to a seriuos problems. And while gcc don't turn this warning on lets tcc do it. This warning can be turned off by -Wno-implicit-function-declaration option. And autor must explicitly do this if program must be compiled with this warning off.

seyko committed 11 years ago

Commit b5f88b51 parent 7f36abd4 files · +5 −0Browse files

Unified · Split

4 files
  1. libtcc.c +1 −0
  2. tests/tests2/46_grep.c +1 −0
  3. tests/tests2/64_macro_nesting.c +2 −0
  4. win32/examples/fib.c +1 −0
libtcc.c+1−0
@@ -1045,6 +1045,7 @@ LIBTCCAPI TCCState *tcc_new(void) · 1044 unmodified lines
10451045 ".dynhashtab", SHF_PRIVATE);
10461046 s->alacarte_link = 1;
10471047 s->nocommon = 1;
1048+ s->warn_implicit_function_declaration = 1;
10481049
10491050 #ifdef CHAR_IS_UNSIGNED
10501051 s->char_is_unsigned = 1;
tests/tests2/46_grep.c+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
1616 */
1717 #include <stdio.h>
1818 #include <stdlib.h>
19+#include <ctype.h> // tolower()
1920
2021 /*
2122 * grep
tests/tests2/64_macro_nesting.c+2−0
@@ -1,3 +1,5 @@
1+#include <stdio.h> // printf()
2+
13 #define CAT2(a,b) a##b
24 #define CAT(a,b) CAT2(a,b)
35 #define AB(x) CAT(x,y)
win32/examples/fib.c+1−0
@@ -1,4 +1,5 @@
11 #include <stdio.h>
2+#include <stdlib.h> // atoi()
23
34 int fib(n)
45 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t