This is the mail archive of the gcc-patches@gcc.gnu.org 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 
(0x78)
/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 
(0x2e)
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 30: error: unknown opcode 
".LLC0"
/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 
(0x2e)
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 31: error: unknown opcode 
".LLC1"
/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 
(0x5f)
/usr/ccs/bin/as: "/var/tmp//ccLMj7Kj.s", line 32: error: unknown opcode 
"__FUNCTION__.1513"
/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 "!"
#else
#define MARKER "#"
#endif

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]