[PATCH] Adding option -fno-inline-asm to disallow inline asm
Reid Kleckner
rnk at google.com
Fri Jan 16 10:14:45 PST 2015
In http://reviews.llvm.org/D6870#109616, @steven_wu wrote:
> - Update patch that AsmLabels are now disabled with -fno-gnu-inline-asm. This also means functions with asm-labels will also be reported as an error with -fno-gnu-inline-asm.
I wasn't suggesting that we reject function asm labels, I was suggesting that we reject variables marked as living in specific registers. Consider something like:
register void *sp asm("esp");
int main () {
printf("sp: %p\n", sp);
}
This code compiles down to read the esp register in main.
I think using asm labels to rename something is not inherently architecture specific and could be accepted even in the presence of -fno-inline-asm. What do you think?
http://reviews.llvm.org/D6870
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list