Clang coding warning

The latest Xcode grabbed / usr / bin / gcc and made it mean:

$ /usr/bin/gcc --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)

Now, every source file of my favorite project, which was compiled with real gcc last week, gives a warning:

warning: illegal character encoding in string literal [-Winvalid-source-encoding]

Source files are encoded in ISO 8859-9. (The performance encoding is the same.) How can I tell Apple faux gcc? Despite its name, it clearly does not understand the gcc -finput-charset flag:

clang: error: unknown argument: '-finput-charset=ISO8859-9' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

Grateful for all the tips.

+4
source share
1 answer

Oh! "Xcode command line tools" provide real gcc. I ran

 xcode-select --install

to install them, and I'm back in business.

+1
source

Source: https://habr.com/ru/post/1540610/


All Articles