9

Having installed LLVM on Ubuntu 16.04 using the command:

sudo apt-get install clang llvm

I get the following error when compiling:

nlykkei@nlykkei-VirtualBox:~$ clang++ -g toy.cpp `llvm-config --cxxflags --ldflags --system-libs --libs` -o toy
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
      '-Wno-uninitialized'? [-Wunknown-warning-option]
1 warning generated.

To be specific, I follow the tutorial: http://llvm.org/docs/tutorial/LangImpl03.html on the LLVM website.

The version of LLVM is 3.8.

How do I get rid of this warning?

Thanks.

2
  • Which version of clang / llvm do you have? Commented Jan 16, 2017 at 9:57
  • the maybe_uninitialized attribute is c++17 isn't it? Commented Jan 16, 2017 at 9:58

3 Answers 3

13

This is a bug in llvm-config. Long story short, llvm-config outputs -Wno-maybe-uninitialized which is not a warning implemented by clang.

One possible workaround is to add an extra flag squelching warnings about unknown warnings.

clang++ <your flags> -Wno-unknown-warning-option `llvm-config ...`
Sign up to request clarification or add additional context in comments.

Comments

0

This warning comes when you recently upgraded your sdk-build-tools with 30.x

I resolved the issue by downgrading sdk-build-tools by 29.x.

Delete all the intermediate files , they will be auto generate again.

Clean Project .

Invalidate Cashes and Restart the Project.

Woow, warning has been removed now.

Comments

0

Answer mentioned here https://github.com/envoyproxy/envoy/issues/18986 might help. Mostly changing Wno-maybe-uninitialized with -Wno-uninitialized in / bazel/envoy_internal.bzl

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.