This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 27528: Expanding constant asm operands

> 	* gcc.c-torture/compile/pr27528.c: New test.

The '#' character is not the marker for comments on Solaris so the above test 
fails to assemble

hikaru% gcc/xgcc -Bgcc -c pr27528.c
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 29: error: invalid character 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 29: error: unknown opcode "x"
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 29: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 30: error: invalid character 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 30: error: unknown opcode 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 30: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 31: error: invalid character 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 31: error: unknown opcode 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 31: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 32: error: invalid character 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 32: error: unknown opcode 
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 32: error: statement syntax

The '!' character would need to be used instead.  What's the least unelegant 
way to do that?  Something like

#if defined (sun) && defined (__svr4__)
#define MARKER "!"
#define MARKER "#"

plus string concatenation?  Thanks in advance.

Eric Botcazou

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]