[Bug libfortran/98076] Increase speed of integer I/O

ro at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 27 20:13:52 GMT 2021


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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu.org

--- Comment #10 from Rainer Orth <ro at gcc dot gnu.org> ---
This patch broke (at least) Solaris bootstrap:

/vol/gcc/src/hg/master/local/libgfortran/runtime/string.c: In function
'gfc_itoa':
/vol/gcc/src/hg/master/local/libgfortran/runtime/string.c:245:73: error: macro
"static_assert" requires 2 arguments, but only 1 given
  245 |       static_assert(sizeof(GFC_UINTEGER_LARGEST) <= 2 *
sizeof(uint64_t));
      |                                                                        
^
In file included from
/vol/gcc/src/hg/master/local/libgfortran/runtime/string.c:26:
/usr/include/assert.h:25: note: macro "static_assert" defined here
   25 | #define static_assert(a, b) _Static_assert(a, b)
      |
/vol/gcc/src/hg/master/local/libgfortran/runtime/string.c:245:7: error:
'static_assert' undeclared (first use in this function)
  245 |       static_assert(sizeof(GFC_UINTEGER_LARGEST) <= 2 *
sizeof(uint64_t));
      |       ^~~~~~~~~~~~~
/vol/gcc/src/hg/master/local/libgfortran/runtime/string.c:245:7: note: each
undeclared identifier is reported only once for each function it appears in
make[6]: *** [Makefile:2765: string.lo] Error 1

According to https://en.cppreference.com/w/c/language/_Static_assert, the
one-arg
form of _Static_assert/static_assert is new since C23, while Solaris <assert.h>
only supports the two-arg form.


More information about the Gcc-bugs mailing list