tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: further texinfo lossage with GCC 15.1
> Vasyl Maksym Lanko reports more fallout from his Manjaro Linux system
> using GCC 15.1 as the system compiler.
> /home/maksym/netbsd-gsoc/src/tools/texinfo/../../external/gpl2/texinfo/dist/makeinfo/cmds.c:56:11: error: initialization of 'void (*)(void)' from incompatible pointer type 'void (*)(int)' [-Wincompatible-pointer-types]
This _is_ a real problem from a C perspective, though I doubt any
current NetBSD port would be affected.
> What is the best way to deal with this lossage? I figure we're not
> updating texinfo anytime soon because the latest version requires
> Perl.
Good reason. :-/ I suppose dumping texinfo entirely is not considered
suitable?
> 3 options from the top of my head:
> 1. we disable the appropriate GCC warning [for texinfo]
> 2. we disable the appropriate GCC warning [for these files]
> 3. we hack cmds.[hc] and makeinfo.c so that the problem goes away.
Well, I've got no skin in this game. But, personally, I'd prefer this
last. I much prefer writing to C's restrictions even when I know
perfectly well the systems I'm going to be using the code on don't
depend on that. For example, I would not write
... foo(void **argp)
{
...
*(int **)argp = 1;
...
}
even though all machines I expect to ever use that code on have the
same size and representation for int * and void *. (I might do it as
part of specifically MD code, though even there I tend to avoid such.)
Similarly, even though all machines I currently use - and, I think, all
machines NetBSD supports - use the same representation (a simple
address of the code) for function pointers, I would not treat
differently-typed function pointers as if they had the same size and
representation.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index