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
1045 ".dynhashtab", SHF_PRIVATE);1045 ".dynhashtab", SHF_PRIVATE);
1046 s->alacarte_link = 1;1046 s->alacarte_link = 1;
1047 s->nocommon = 1;1047 s->nocommon = 1;
1048 s->warn_implicit_function_declaration = 1;
1048 1049
1049#ifdef CHAR_IS_UNSIGNED1050#ifdef CHAR_IS_UNSIGNED
1050 s->char_is_unsigned = 1;1051 s->char_is_unsigned = 1;
tests/tests2/46_grep.c+1−0
@@ -16,6 +16,7 @@ · 15 unmodified lines
16 */16 */
17#include <stdio.h>17#include <stdio.h>
18#include <stdlib.h>18#include <stdlib.h>
19#include <ctype.h> // tolower()
19 20
20/*21/*
21 * grep22 * grep
tests/tests2/64_macro_nesting.c+2−0
@@ -1,3 +1,5 @@
1#include <stdio.h> // printf()
2
1#define CAT2(a,b) a##b3#define CAT2(a,b) a##b
2#define CAT(a,b) CAT2(a,b)4#define CAT(a,b) CAT2(a,b)
3#define AB(x) CAT(x,y)5#define AB(x) CAT(x,y)
win32/examples/fib.c+1−0
@@ -1,4 +1,5 @@
1#include <stdio.h>1#include <stdio.h>
2#include <stdlib.h> // atoi()
2 3
3int fib(n)4int fib(n)
4{5{

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