public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jsm28 at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/105412] New: [10/11/12 Regression] Missing phony target with -MP for first include when compiling from stdin Date: Wed, 27 Apr 2022 21:09:32 +0000 [thread overview] Message-ID: <bug-105412-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105412 Bug ID: 105412 Summary: [10/11/12 Regression] Missing phony target with -MP for first include when compiling from stdin Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- When generating dependencies with -M -MP, the phony target for the first included header (typically stdc-predef.h) is missing if compiling from stdin, with GCC 10 and later but not with GCC 9. For example: $ echo "#include <cstdlib>" | ./many9/install/compilers/x86_64-linux-gnu/bin/x86_64-glibc-linux-gnu-g++ -M -MP -x c++ - | grep stdc-predef /scratch/jmyers/glibc/many9/install/compilers/x86_64-linux-gnu/sysroot/usr/include/stdc-predef.h \ /scratch/jmyers/glibc/many9/install/compilers/x86_64-linux-gnu/sysroot/usr/include/stdc-predef.h: shows the expected phony target (the second line of output) with a GCC 9 compiler, but $ echo "#include <cstdlib>" | ./many10/install/compilers/x86_64-linux-gnu/bin/x86_64-glibc-linux-gnu-g++ -M -MP -x c++ - | grep stdc-predef /scratch/jmyers/glibc/many10/install/compilers/x86_64-linux-gnu/sysroot/usr/include/stdc-predef.h \ shows that line of output is missing with GCC 10 and later. (This example is adapted from code in glibc's configure script, but the bug only actually causes problems with glibc when the compiler is used with an old sysroot lacking stdc-predef.h and so the missing phony target is that for <cstdlib> itself.)
next reply other threads:[~2022-04-27 21:09 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-27 21:09 jsm28 at gcc dot gnu.org [this message] 2022-04-27 21:20 ` [Bug preprocessor/105412] " pinskia at gcc dot gnu.org 2022-04-28 16:26 ` [Bug preprocessor/105412] [10/11/12/13 " jakub at gcc dot gnu.org 2022-06-28 10:49 ` jakub at gcc dot gnu.org 2022-07-26 11:44 ` rguenth at gcc dot gnu.org 2023-07-07 10:43 ` [Bug preprocessor/105412] [11/12/13/14 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105412-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).