https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110058
Bug ID: 110058
Summary: confusing error message for %c asm output modifier
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
CC: uros at gcc dot gnu.org
Target Milestone: ---
Target: i*86-*-* x86_64-*-*
'c' is both a generic modifier (for operands that are constants) and a x86
specific modifier (for operands that are condition codes). If used with an
operand that is neither a CONSTANT_ADDRESS_P nor a COMPARISON_P, the x86
backend prints a confusing error message.
$ echo 'void f() { asm ("%c0" :: "i"("")); }' | gcc -mcmodel=large -xc - -S
<stdin>: In function âfâ:
<stdin>:1:12: error: invalid 'asm': operand is not a condition code, invalid
operand code 'c'
Before r0-116930-gf1ea1f5c047c3e, the error message also mentioned that a
constant is acceptable.