[Bug d/88039] gdc.test/compilable/ddoc12.d FAILs

ro at CeBiTec dot Uni-Bielefeld.DE gcc-bugzilla@gcc.gnu.org
Mon Nov 19 09:56:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88039

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> (In reply to Rainer Orth from comment #0)
>> 
>> The problem obviously is that the native assemblers don't support UTF-8 in
>> identifiers (and I bet there are other non-gas assemblers that don't either).
>> 
>
> Do we have a function that checks if the effective target supports utf-8 in
> assembler?

we do: there's ucn, used in some of the gcc.dg/ucnid-*.c tests.

However, there's another option: C11, 6.4.2.1 General, n.71 suggests

On systems in which linkers cannot accept extended characters, an
encoding of the universal character name may be used in forming valid
external identifiers. For example, some otherwise unused character or
sequence of characters may be used to encode the \u in a universal
character name.  Extended characters may produce a long external
identifier

(cited from the n1570.pdf draft).  Go, which heavily relies on UTF-8
identifiers, does something like this:
cf. gcc/go/gofrontend/go-encode-id.{cc,h}.

>> Besides, we again see the obnoxious effect of gdc-test.exp's 
>> 
>> // { dg-prune-output .* }
>> 
>> which effectively masks all errors, letting the test for excess errors
>> wrongly
>> PASS.
>
> The D2 testsuite is needlessly verbose in places, just grep "pragma(msg", which
> is why its there.  I could convince upstream to remove these, unless there's a
> better way to handle them in dejagnu.

Having a way to suppress those messages at runtime would be enough.
Being able to identify them in some way, by a common prefix perhaps,
would work too since this way the pruning could be selective.


More information about the Gcc-bugs mailing list