https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103032
--- Comment #2 from Olaf 'Rhialto' Seibert <rhialto at falu dot nl> --- I tried my case on a different system with a later gcc version, and it didn't show the problems I reported. It did however show the diagnostics you showed, and I think it is correct. strdup() could indeed return NULL. I don't know how the gcc policy about backporting fixes is. If you don't do it (and this one isn't super important, just somewhat misleading), then this report can be closed. If you might consider a backport, then of course not :)