groff
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]