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

            Bug ID: 123702
           Summary: `gcc_jit_context_new_function` doesn't accept Unicode
                    characters in function name
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: jit
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: coarse.d1rtxxx at gmail dot com
                CC: antoyo at gcc dot gnu.org
  Target Milestone: ---

Created attachment 63394
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63394&action=edit
Compiler output

C23 added support for Unicode characters in identifiers, but libgccjit didn't
follow suit. Really, there shouldn't even be a check for validity in the first
place, since LLVM, JVM, and I'm sure others don't have one, thus restricting
interoperability if we were to have one.

What I mean by this is that `gcc_jit_context_new_function`'s fifth argument,
`const char *name`, will not accept a UTF-8 string or any other Unicode format.

`gcc -v` (modified to split long lines):
```log
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.2.0\
/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --enable-host-shared --enable-languages=jit,c++ \
--disable-bootstrap --prefix=/mnt/vg0-lvol0/usr/local --enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.2.0 (GCC) 
```

Compilation command:

```sh
gcc '10 smoketest.c' -lgccjit -o '10 smoketest' --save-temps
```

Compiler output: None.

Reply via email to