Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how could I remove the warnings generated by include files. #3

Open
subh007 opened this issue Dec 5, 2013 · 2 comments
Open

how could I remove the warnings generated by include files. #3

subh007 opened this issue Dec 5, 2013 · 2 comments

Comments

@subh007
Copy link

subh007 commented Dec 5, 2013

I included string.h and poison.h to my sample program and it results in warning :

In file included from example.c:3:
./poison.h:12:21: warning: poisoning existing macro
#       pragma GCC poison strcpy wcscpy stpcpy wcpcpy
                          ^
./poison.h:12:35: warning: poisoning existing macro
#       pragma GCC poison strcpy wcscpy stpcpy wcpcpy
                                        ^
./poison.h:15:21: warning: poisoning existing macro
#       pragma GCC poison strcat wcscat
                          ^
./poison.h:17:21: warning: poisoning existing macro
#       pragma GCC poison sprintf vsprintf vfprintf
                          ^
./poison.h:17:29: warning: poisoning existing macro
#       pragma GCC poison sprintf vsprintf vfprintf
                                  ^
./poison.h:19:21: warning: poisoning existing macro
#       pragma GCC poison strncpy wcsncpy
                          ^
example.c:7:3: error: attempt to use a poisoned identifier
  strcpy(a,b);
  ^
6 warnings and 1 error generated.

how can I remove the warnings from the include files ?

@leafsr
Copy link
Owner

leafsr commented Dec 5, 2013

What version of GCC are you using? Try -Wno-pragmas

@subh007
Copy link
Author

subh007 commented Dec 6, 2013

I am using Apple LLVM version 5.0.
For clang -Wno-pragmas is unknown warning option.
warning: unknown warning option '-Wno-pragmas' [-Wunknown-warning-option]
I tried by supplying -Wunknown-warning-option but still getting same warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants