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]

Re: PATCH: Lazy name-mangling


Sorry, but I think it is very bad idea to leave error detection to the assembler.
It's g++'s duty to generate error free .s for the assembler. It's a first order
constraint (much stronger than to find C++ errors).

> In any case,
> that means that we will now catch clashes between mangled names and
> (invalid) user names in the assembler, rather than the compiler.

I therefor looked at the removed testcases.

While mangle1.C and static8.C are somewhat ok (undefined behavior using names starting with _
and one can make sense out of the assembler message).
mangle2.C is different:
I think (actually hope) that there is no undefined behavior involved.
As you remove it, this means you decide it is erroneous code - I don't know for sure.
It does not seem to be impossible to write such code. Now look at the error messages:

/tmp/ccmf28ly.s: Assembler messages:
/tmp/ccmf28ly.s:22: Error: invalid character '=' in operand 1
/tmp/ccmf28ly.s:37: Error: Rest of line ignored. First ignored character is `!'.
/tmp/ccmf28ly.s:38: Error: ignoring unrecognized symbol type ""
/tmp/ccmf28ly.s:38: Error: Rest of line ignored. First ignored character is `!'.
/tmp/ccmf28ly.s:39: Error: invalid character '!' in mnemonic
/tmp/ccmf28ly.s:55: Error: expected comma after name `operator' in .size directive
/tmp/ccmf28ly.s:55: Error: Rest of line ignored. First ignored character is `!'.

Nobody can understand this.

Alfred


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