[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: groff 1.23.0.rc4 on Solaris 10
From: |
G. Branden Robinson |
Subject: |
Re: groff 1.23.0.rc4 on Solaris 10 |
Date: |
Sun, 16 Apr 2023 01:07:31 -0500 |
Hi Bruno,
At 2023-04-15T23:43:18+0200, Bruno Haible wrote:
> * The Sun C, C++ compilers.
>
> The build failure regarding <stdbool.h> is gone.
>
> Now there is a build failure:
>
> CC src/libs/libgroff/libgroff_a-getopt.o
> "../src/libs/libgroff/getopt.c", line 251: syntax error before or at: (
> "../src/libs/libgroff/getopt.c", line 252: syntax error before or at: (
> "../src/libs/libgroff/getopt.c", line 253: syntax error before or at: const
> "../src/libs/libgroff/getopt.c", line 253: syntax error before or at: int
> "../src/libs/libgroff/getopt.c", line 254: syntax error before or at: struct
> "../src/libs/libgroff/getopt.c", line 254: syntax error before or at: )
> "../src/libs/libgroff/getopt.c", line 273: zero or negative subscript
> "../src/libs/libgroff/getopt.c", line 273: syntax error before or at: ==
> "../src/libs/libgroff/getopt.c", line 278: warning: old-style declaration or
> incorrect type for: __posixly_correct
> "../src/libs/libgroff/getopt.c", line 279: warning: old-style declaration or
> incorrect type for: d
> ...
>
> The cause is apparently the use of __attribute__((__unused__))
> in src/libs/libgroff/getopt.c line 251.
>
> This syntax is not portable; it works only in GCC, clang, and AIX xlc.
>
> Instead, you can use the Gnulib module 'attribute', #include "attribute.h",
> and use MAYBE_UNUSED instead of __attribute__((__unused__)). This is
> portable.
The only other place in the groff code that used attributes was its
bespoke allocator[1], and that was a recent change by me.
I have a fix in preparation following your advice.
With luck, for groff 1.24 we can switch to gnulib's "getopt-gnu" module,
and drop the groff allocator entirely.
Regards,
Branden
[1]
https://git.savannah.gnu.org/cgit/groff.git/tree/src/libs/libgroff/new.cpp?h=1.23.0.rc4
signature.asc
Description: PGP signature
- Re: groff 1.23.0.rc4 on AIX, (continued)
Re: groff 1.23.0.rc4 on Solaris 10, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on mingw, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on Alpine Linux, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on FreeBSD, Bruno Haible, 2023/04/15