User forums > General (but related to Code::Blocks)

dont want by default #include's

<< < (3/3)

TDragon:

--- Quote from: killerbot on August 09, 2007, 07:49:25 am ---GCC 3.4.5 also gave a warning , see a reply of mine with log above

--- End quote ---
Not sure which code you got a warning with, but the following doesn't even provoke a warning:

--- Code: ---int main()
{
printf("Hello, world!\n");
return 0;
}

--- End code ---
...

--- Code: ---gcc -o test.exe test.c

--- End code ---

killerbot:
the code I mentioned above (same as yours), I ran from within CB.

Checked full log : seems the following options were added : -Wall -fexceptions (and offcourse a -I to mingw includes)

mitsukai:
this is probally a mingw or GCC extension (as it says in the warning). printf is a built in function, just like vc++ can compile non-standard types as built-in types.


http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_5.html#SEC114

jguarin2002:
Thanks mitsukai.


--- Quote ---The following ISO C89 functions are recognized as built-in functions unless `-fno-builtin' is specified: abs, cos, fabs, fprintf, fputs, labs, memcmp, memcpy, memset, printf, sin, sqrt, strcat, strchr, strcmp, strcpy, strcspn, strlen, strncat, strncmp, strncpy, strpbrk, strrchr, strspn, and strstr. All of these functions have corresponding versions prefixed with __builtin_.
--- End quote ---

thats why.

Navigation

[0] Message Index

[*] Previous page

Go to full version