[PATCH] Adding option -fno-inline-asm to disallow inline asm
stevenwu at apple.com
Wed Jan 14 21:17:12 PST 2015
The intention of this patch is to provide a way to control the usage of inline assembly since they are harder to get correct. The reason why it is not issuing an error on MSVC style assembly is because we already have a way to control its usage (-fno-asm-block).
I can imply -fno-asm-block with -fno-inline-asm but that will require some refactoring of my patch since these two flags triggers different error with this patch. -fno-inline-asm is currently a sema check and -fno-asm-block will disable a path in the parser.
It is a good point that we can use this patch to get a one-step closer to -fno-gnu-extensions. In that case, I think it should be better to make a new flag (-fno-gnu-asm) which disable gnu-style asm parser, and -fno-inline-asm should implies both -fno-asm-block and -fno-gnu-asm.
I will try to come up with a new patch tomorrow.
More information about the cfe-commits