Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does -fheinous-gnu-extensions option do?

Tags:

clang

When Homebrew compiles libgcrypt on OS X, it patches it to use clang and add -std=gnu89 and -fheinous-gnu-extensions to the CFLAG Makefile var. What does the latter do?

like image 965
bfontaine Avatar asked Oct 14 '13 19:10

bfontaine


1 Answers

https://clang.llvm.org/doxygen/SemaStmtAsm_8cpp.html says:

GNU C has an extremely ugly extension whereby they silently ignore "noop" casts in places where an lvalue is required by an inline asm. We emulate this behavior when -fheinous-gnu-extensions is specified, but provide a strong guidance to not use it.

No, I haven’t used it; I don’t know why Homebrew needed it.

like image 157
Flash Sheridan Avatar answered Oct 21 '22 00:10

Flash Sheridan