User account creation filtered due to spam.

Bug 30214 - warning: incompatible implicit declaration of built-in function 'strcpy'
Summary: warning: incompatible implicit declaration of built-in function 'strcpy'
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-14 21:51 UTC by Juan Carlos Mendoza C
Modified: 2006-12-14 22:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Carlos Mendoza C 2006-12-14 21:51:35 UTC
I was compiled my aplication correctly with gcc 3.3 on SUSE 9, but now upgrade SUSE to version 10 and the gcc now is the version 4.1. With the new version when compile display more warning, example:

/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c: In function âload_track_2â:
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4301: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4312: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4327: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4350: warning: incompatible implicit declaration of built-in function âstrcpyâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4361: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4369: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4382: warning: incompatible implicit declaration of built-in function âmemcpyâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4405: warning: incompatible implicit declaration of built-in function âstrlenâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4407: warning: incompatible implicit declaration of built-in function âstrcpyâ
/auexes/autra_prod/source/swap/ts/pgm/swap_ts.c:4417: warning: incompatible implicit declaration of built-in function âmemcpyâ


but the compile finish OK. 
As I can correct this error?

Thanks
Comment 1 Andrew Pinski 2006-12-14 22:34:01 UTC
> How I can correct this error?
Add to the source file:
#include <string.h>

This comes from the fact the implicit declaration causes different prototype than what is declared for the builtin functions.
You can either use -fno-builtins or including the correct headers.