From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC3CF3858D35; Thu, 13 Apr 2023 19:27:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC3CF3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681414079; bh=Kc1o+citI7vKM3NhlUNy1YP4AlrVlfjtfc4WD+ykht8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=P7JX11FcyKI7mB9U/W2bl+r6CaoXa2yk6vPD1zoF3DGwlaLm1c7c8Qu0XSU4UqtmP XHYO2qChXfAQtK8taE4dPCX3someuKwjKo430cgBbhprje1M7PkEinLNB4baaYG/3h rZ1ZEeErdjS3+1ScSP/gt8dW4muOq+Ia3roxBOo4= From: "allan.w.macdonald at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/109183] [regression?] since GCC 11.1, -MM -MMD generates "a-" prefixed dependency files Date: Thu, 13 Apr 2023 19:27:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: allan.w.macdonald at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109183 --- Comment #11 from Allan W. Macdonald --- The makefiles I've been maintaining contain a mechanism to make sure that a= ny change in a locally-included file will cause the c file that includes it to= be compiled again, like so: ### Extract of makefile: %.d: %.c gcc -MM -MD $< -include $(OBJECTS:.o=3D.d) ### So, if I understand this correctly (tell me if I'm wrong), preprocessing is performed to generate the .d files before any file is compiled to an object= in this situation. These .d files are then included and turned into rules usi= ng a substitution reference. The 'a-' prefix breaks this mechanism. The workaround I mentioned, gcc -E -MMD $< > /dev/null seems to achieve the same behaviour but there's probably a better way to do= it.=