[Toybox] The new gcc 9 bug you pointed out.
scsijon
scsijon at lamiaworks.com.au
Wed May 8 15:12:25 PDT 2019
On 08/05/19 19:00, Rob Landley wrote:
/cut
> Anyway, you said:
>
>> Rob, this may also have an effect in toybox, ?maybe?
>
> And pulling up https://gitlab.gnome.org/GNOME/glib/merge_requests/626 ... not
> that I know of?
>
> They removed the debugging feature where printf("%s", NULL) would print "(null)"
> instead of segfaulting trying to dereference the string. I never (intentionally)
> relied on that outside of debug printfs (and have used libc's that segfaulted on
> it before).
>
> Removing it seems kinda stupid, it's not the compiler's business to do so (it
> would be the C library's), and making it an error instead of a warning is just
> laughable. It seriously looks like gcc is end of life and I'm glad llvm isn't
> being done by crazy people.
>
> But I'm unaware of _this_ particular bit of gcc stupidity hitting us? (And the
> fix would be adding another -fstop-being-stupid anyway. Possibly disabling
> printf() format detection entirely if it has such bad side effects. Building
> with llvm would still find printf format/argument mismatches if so. "I fed it a
> char *" is all it should care about, what's _in_ the char * at _runtime_ is my
> business, not the compiler's.)
>
> Rob
>
And was the reason I thought it was important enough to bring to your
attention, I wasn't sure enough to just ignore it, and you have enough
to deal with as it is.
So we can expect toybox to be fully llvm/clang compatable soon, or is it
already so now. I also want to try some of the smaller ones like pcc and
tcc with toybox, for me gcc is getting too big and complicated for a
compiler, it's time they considered archiving out some of it to an
external component.
More information about the Toybox
mailing list