If I compile my Kernel gcc prints out some warnings like this:
In file included from string.h:1,
from strcat.c:1:
strcmp.h:1: warning: conflicting types for built-in function `strcmp'
.
.
.
How can I scotch this messages? Or how can I make gcc don't use the build in string functions
gcc parameter
Re:gcc parameter
Never disable warnings. They point to a problem - solve the problem, not the diagnostics. To the contrary - always see to it that every possible diagnostic is printed. Personally, I also activate -Werror, which handles every warning as a "hard" error.ich_will wrote: How can I scotch this messages?
--no-builtin...Or how can I make gcc don't use the build in string functions
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:gcc parameter
however, i strongly suggest you get a look at the function's definition (as it's a standard function) and comply with the standard ... or pick up a non-standard name for your non-standard function.
<rant>
When people see "strcpy()" they think 'a function that will copy chars from its second argument into its first arguments, both being char* and returns ... etc.' If you have an implementation that use the opposite order, you'll fool everyone including yourself in the future
</rant>
<rant>
When people see "strcpy()" they think 'a function that will copy chars from its second argument into its first arguments, both being char* and returns ... etc.' If you have an implementation that use the opposite order, you'll fool everyone including yourself in the future
</rant>
Re:gcc parameter
r u sure i useSolar wrote: --no-builtin...
-fno-builtin
and it works for me. Anyway let me check...... Ok i guess
--no-builtin
works too. Any idea why the gave 2 ways to do the same thing.
Only Human
Re:gcc parameter
A common illness among the GNU people.
Every good solution is obvious once you've found it.