https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65852
--- Comment #10 from Paul Robinson <paul_robinson at playstation dot sony.com> --- I thought I had heard your name before! Howdy... Granted this is an obscure corner case, but they are legal filenames, using a leading # is less horrifying than a leading space, and the depfile that gcc produces is demonstrably wrong. I just downloaded Cygwin with gcc 4.9.2 to my Windows, and the behavior is exactly the same (using \ instead of / as the separator, seeing \\\ before the space and only \\ before the #). Anyway, can we agree that the inconsistent handling of space and # is a bug? You can set the priority as low as you like. FYI, you do _not_ want to escape all backslashes; that will break BSD Make, which doesn't do any quoting at all.