From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: 70716@debbugs.gnu.org
Cc: "João Távora" <joaotavora@gmail.com>
Subject: bug#70716: flymake-cc creates `-.o` files
Date: Thu, 2 May 2024 15:10:18 +0200 [thread overview]
Message-ID: <A6AC5249-B8E8-439D-AA99-276DB7E880D6@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
`flymake-cc-use-special-make-target`, the standard value for `flymake-cc-command`, generates a command like
make check-syntax CHK_SOURCES="-x c -c -"
which causes the compiler (at least Clang) to create the file `-.o` that is never cleaned up and whose name is mysterious and awkward to remove.
What about the patch below?
[-- Attachment #2: flymake-cc-null-output.diff --]
[-- Type: application/octet-stream, Size: 637 bytes --]
diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el
index 60e7da5d617..01f463454e9 100644
--- a/lisp/progmodes/flymake-cc.el
+++ b/lisp/progmodes/flymake-cc.el
@@ -95,9 +95,10 @@ flymake-cc-use-special-make-target
(unless (executable-find "make") (error "Make not found"))
`("make"
"check-syntax"
- ,(format "CHK_SOURCES=-x %s -c -"
+ ,(format "CHK_SOURCES=-x %s -c - -o %s"
(cond ((derived-mode-p 'c++-mode) "c++")
- (t "c")))))
+ (t "c"))
+ null-device)))
(defvar-local flymake-cc--proc nil "Internal variable for `flymake-cc'.")
next reply other threads:[~2024-05-02 13:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 13:10 Mattias Engdegård [this message]
2024-05-02 13:13 ` bug#70716: flymake-cc creates `-.o` files João Távora
2024-05-02 14:00 ` Mattias Engdegård
2024-05-04 11:38 ` Eli Zaretskii
2024-05-18 8:33 ` Eli Zaretskii
2024-05-18 8:28 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A6AC5249-B8E8-439D-AA99-276DB7E880D6@gmail.com \
--to=mattias.engdegard@gmail.com \
--cc=70716@debbugs.gnu.org \
--cc=joaotavora@gmail.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).