On 02/16/12 12:04, Jakub Jelinek wrote:
On Thu, Feb 16, 2012 at 11:46:33AM -0600, Aldy Hernandez wrote:
#GOOD
houston:/build/t2/gcc$ ./cc1 a.c -fgnu-tm -O0 -quiet -w
In function 'asmfunc',
inlined from 'f' at a.c:13:10:
a.c:7:3: error: asm not allowed in 'transaction_safe' function
#BAD
houston:/build/t2/gcc$ ./cc1 a.c -fgnu-tm -O1 -quiet -w
a.c: In function 'f':
a.c:7:3: error: asm not allowed in 'transaction_safe' function
houston:/build/t2/gcc$
Even with -O1 -g ? With -g0 we prune BLOCKs, so the backtraces
don't work well.
Well with -O1 -g the backtrace works for this particular error. But
with -O2 -g, we trigger another error "asm not allowed in atomic
transaction", and no amount of %K fiddling will get me a backtrace.
But even so, it doesn't seem right to expect users to get a correct
error message only with -g, does it?