all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#70716: flymake-cc creates `-.o` files
@ 2024-05-02 13:10 Mattias Engdegård
  2024-05-02 13:13 ` João Távora
  0 siblings, 1 reply; 13+ messages in thread
From: Mattias Engdegård @ 2024-05-02 13:10 UTC (permalink / raw)
  To: 70716; +Cc: João Távora

[-- 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'.")
 

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

end of thread, other threads:[~2024-08-28 17:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 13:10 bug#70716: flymake-cc creates `-.o` files Mattias Engdegård
2024-05-02 13:13 ` 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
2024-06-30  5:45     ` Stefan Kangas
2024-07-20 10:10       ` Eli Zaretskii
2024-08-04  7:55         ` Eli Zaretskii
2024-08-17  8:22           ` Eli Zaretskii
2024-08-28 17:01             ` Spencer Baugh
2024-08-28 17:01     ` sbaugh
2024-08-28 17:50       ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.