Skip to content

Build fails with GCC from -Wcovered-switch-default #37

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

Closed
arsenm opened this issue May 26, 2013 · 1 comment
Closed

Build fails with GCC from -Wcovered-switch-default #37

arsenm opened this issue May 26, 2013 · 1 comment

Comments

@arsenm
Copy link

arsenm commented May 26, 2013

cc -pipe -std=c99 -I/usr/local/include -pipe -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -g -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Wall -Wextra -pedantic -O3 -I./src -c -o src/obj/completion_serv.o ./src/completion_serv.c
cc: error: unrecognized command line option ‘-Wcovered-switch-default’

@toojays
Copy link
Contributor

toojays commented Jun 2, 2013

You didn't write how you caused that error, but I guess that it came just from running make in a clean checkout.

My second guess is that -Wcovered-switch-default comes from llvm-config --cflags, which the makefile runs to determine what flags are required to build a program which uses libclang. If that's the case, it also means that you need to build using Clang as the compiler rather than GCC, because GCC does not understand -Wcovered-switch-default.

You should be able to do this by running make CC=clang rather than just make.

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