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

            Bug ID: 123509
           Summary: Switch int8_t etc. to byte on Solaris
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: *-*-solaris2.11

Created attachment 63303
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63303&action=edit
Proposed patch

int8_t on Solaris is of type char (which is signed), in violation of C99. This
is constantly causing problems, especially for C++.  Thus I'm considering
a fix using fixincludes, as detailed in PR libstdc++/113450.

There are only two group  of regressions when bootstrapping:

+UNRESOLVED: gdc.test/runnable_cxx/stdint.d   compilation failed to produce
executable
+UNRESOLVED: gdc.test/runnable_cxx/stdint.d -shared-libphobos   compilation
failed to produce executable

Undefined                       first referenced
 symbol                             in file
_Z15testCppI8Manglechchch           /var/tmp//ccJLlOBa.o

+FAIL: libphobos.phobos/std_complex.d execution test
+FAIL: libphobos.phobos/std_format_package.d execution test
+FAIL: libphobos.phobos/std_format_write.d execution test
+FAIL: libphobos.phobos/std_math_hardware.d execution test
+FAIL: libphobos.phobos/std_typecons.d execution test

This can easily be avoided by switching int8_t etc. from char to byte in
stdint.d, as in the attached patch.  This way, all regressions are gone.

I guess such a patch would have to go upstream first?

Reply via email to