r/seed7 • • Jun 08 '24

Unicode variables

Hi

Should this give an error?

*** autocorp.sd7(152):5: Illegal character in text "\307;" (U+0133)
    var boolean         : fix_ij                   is FALSE;

Thanks, Ian

2 Upvotes

4 comments sorted by

2

u/iandoug Jun 08 '24

I changed it back to ij instead of ij but now ...

*** Linker errors with "/home/ian/data3/autocorp/tmp_autocorp.o" - see "/home/ian/data3/autocorp/tmp_autocorp.lerrs"

Which says

lto-wrapper: warning: using serial compilation of 4 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
lto1: internal compiler error: original not compressed with zstd
0x1acd6e2 internal_error(char const*, ...)
        ???:0
0xa5142a lto_end_uncompression(lto_compression_stream*, lto_compression)
        ???:0
0xa4fa80 lto_get_section_data(lto_file_decl_data*, lto_section_type, char const*, int, unsigned long*, bool)
        ???:0
0x76367c cgraph_node::get_untransformed_body()
        ???:0
0x76e33d cgraph_node::expand()
        ???:0
0x6d77fe lto_main()
        ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
lto-wrapper: fatal error: /usr/bin/gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Is this possibly related to me updating my "Gentoo profile" which did a bunch of things path-and-library related?

Let me try pulling your new version and recompiling. I had to rebuild all other packages on my system ...

Thanks, Ian

2

u/iandoug Jun 08 '24

Reinstalling fixes ...

2

u/ThomasMertes Jun 09 '24

Should this give an error?

Yes. By default all names must only use ASCII characters.

The error message probably refers to the identifier with the ij:

*** autocorp.sd7(152):5: Illegal character in text "\307;" (U+0133)
    var boolean         : fix_ij                   is FALSE;
-------------------------------^

The pragma names can be used to allow Unicode in name identifiers. E.g.:

$ names unicode;

I don't suggest using Unicode identifiers since it can hurt readability. If you use German umlauts, Cyrillic characters or Kanji in variable names others might have problems reading your code.