Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang encoding warning

The latest Xcode has hijacked /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 compiled cleanly with real gcc last week, throws a warning:

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

The source files are encoded in ISO 8859-9. (The execution charset is the same btw.) How can I tell Apple's faux gcc that? In spite of its name, it evidently doesn't understand gcc's -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 hints.

like image 618
Wegesrand Avatar asked Nov 11 '22 08:11

Wegesrand


1 Answers

Ah! The "Xcode command line tools" provide a real gcc. I ran

 xcode-select --install

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

like image 97
Wegesrand Avatar answered Dec 02 '22 11:12

Wegesrand