bfontaine
bfontaine

Reputation: 19835

What does -fheinous-gnu-extensions option do?

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?

Upvotes: 12

Views: 2018

Answers (1)

Flash Sheridan
Flash Sheridan

Reputation: 1689

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.

Upvotes: 12

Related Questions