public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/109183] New: [regression?] since GCC 11.1, -MM -MMD generates "a-" prefixed dependency files
@ 2023-03-18 10:36 yann at droneaud dot fr
  2023-03-20  9:19 ` [Bug preprocessor/109183] " rguenth at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: yann at droneaud dot fr @ 2023-03-18 10:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109183

            Bug ID: 109183
           Summary: [regression?] since GCC 11.1, -MM -MMD generates "a-"
                    prefixed dependency files
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yann at droneaud dot fr
  Target Milestone: ---

I've found a rather surprising behavior change when using GCC >= 11.1 to build
some project using custom build environment.

How to reproduce:

    : > test.c
    gcc -MM -MMD test.c
    test -e a-test.d && echo "unexpected dependency file name"

I've git-bisect-ed between GCC 11.1 and GCC 10.1 and the behavior change did
happen as the result of this commit:

    commit 1dedc12d186a110854537e1279b4e6c29f2df35a
    Author: Alexandre Oliva <oliva@adacore.com>
    Date:   Tue May 26 04:30:15 2020 -0300

        revamp dump and aux output names

   
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1dedc12d186a110854537e1279b4e6c29f2df35a

I didn't find an explanation there for this behavior change.

It's not noted in the documentation either
https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gcc/Preprocessor-Options.html

So this make me believe it's some kind of regression for a corner case.

I understand the correct usage of -MMD is to be associated with some
processing, -E, -S, -c, etc, while -MM imply -E, so perhaps -MM and -MMD are
mutually exclusive and should not be allowed together. I dunno.

But generating "a-" prefixed dependency files is rather unexpected.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-04-14 13:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 10:36 [Bug preprocessor/109183] New: [regression?] since GCC 11.1, -MM -MMD generates "a-" prefixed dependency files yann at droneaud dot fr
2023-03-20  9:19 ` [Bug preprocessor/109183] " rguenth at gcc dot gnu.org
2023-03-21 18:46 ` yann at droneaud dot fr
2023-03-26 19:29 ` aoliva at gcc dot gnu.org
2023-03-27 17:23 ` yann at droneaud dot fr
2023-04-13 16:09 ` allan.w.macdonald at gmail dot com
2023-04-13 16:12 ` allan.w.macdonald at gmail dot com
2023-04-13 16:12 ` pinskia at gcc dot gnu.org
2023-04-13 16:21 ` allan.w.macdonald at gmail dot com
2023-04-13 16:31 ` jakub at gcc dot gnu.org
2023-04-13 16:40 ` schwab@linux-m68k.org
2023-04-13 19:27 ` allan.w.macdonald at gmail dot com
2023-04-13 21:05 ` pinskia at gcc dot gnu.org
2023-04-14 12:52 ` allan.w.macdonald at gmail dot com
2023-04-14 13:45 ` schwab@linux-m68k.org

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).