Article View: gnu.gcc.bug
Article #236Assembler looses with -g and templates on ISC 2.2
From: Dave Daney
Date: Mon, 03 Aug 1992 04:24
Date: Mon, 03 Aug 1992 04:24
39 lines
1758 bytes
1758 bytes
The Problem:
gcc-2.2.2 running on Interactive Unix 2.2.1 (Sysv/386 R3.2) compiling
c++ with templates creates illegal assembler code with -g option.
Here is an example of the problem, the assembler does not like the '<,'
or the '>'.
.def tree_element<int>; .scl 10; .type 010;\
.size 28; .endef
My solution:
I changed it to this:
.def tree_element_int_; .scl 10; .type 010;\
.size 28; .endef
It might make some things look a bit strange in gdb, not sure about
this though.
I put this in i386isc.h, but I think perhaps att386.h is where it should
go.
/*----------------------------------------------------------*/
/* Assembler does not like '<' or '>' in labels (from template's
in c++) so we change them to '_'. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
do{ \
char *p = &((NAME)[0]); \
while(*p) \
{ \
if('<' == *p || '>' == *p) \
putc('_', (FILE)); \
else \
putc(*p, (FILE)); \
p++; \
} \
} while(0)
/*----------------------------------------------------------*/
Dave Daney daney@mermaid.micro.umn.edu
Technical Details
Message-ID:
<199208031424.AA28950@mermaid.micro.umn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mermaid.micro.umn.edu!daneyShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mermaid.micro.umn.edu!daney From: daney@mermaid.micro.umn.edu (Dave Daney) Subject: Assembler looses with -g and templates on ISC 2.2 Message-ID: <199208031424.AA28950@mermaid.micro.umn.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 3 Aug 1992 04:24:30 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 40