Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Dave Daney
Mon, 03 Aug 1992 04:24
Assembler looses with -g and templates on ISC 2.2
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads