From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#70716: flymake-cc creates `-.o` files Date: Thu, 2 May 2024 15:10:18 +0200 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_BB367BA3-478B-4923-B1DA-F989CA89DE9F" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11488"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: 70716@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 02 15:11:09 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s2WDM-0002mn-1V for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 May 2024 15:11:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2WCy-0006Pb-6K; Thu, 02 May 2024 09:10:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2WCu-0006PD-Q1 for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 09:10:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2WCu-0002Ty-HK for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 09:10:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2WDF-0005op-VE for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 09:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 May 2024 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70716 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Report Original-Received: via spool by submit@debbugs.gnu.org id=B.171465545822357 (code B ref -1); Thu, 02 May 2024 13:11:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 May 2024 13:10:58 +0000 Original-Received: from localhost ([127.0.0.1]:43692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2WDB-0005oX-Up for submit@debbugs.gnu.org; Thu, 02 May 2024 09:10:58 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:41628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2WD7-0005oP-41 for submit@debbugs.gnu.org; Thu, 02 May 2024 09:10:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2WCf-0006LG-Bc for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 09:10:25 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2WCc-0002DK-E2 for bug-gnu-emacs@gnu.org; Thu, 02 May 2024 09:10:25 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-51f4d2676d1so451000e87.3 for ; Thu, 02 May 2024 06:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714655420; x=1715260220; darn=gnu.org; h=to:cc:date:message-id:subject:mime-version:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=vwMKctJm77K+r5rPeK5xt/IzCUZm0Y7m1dagYztfxqU=; b=gz80ipVyb82cDbT4jUr8PqjseUxk2B1kEIPMLuUV3tELYQK/S+DOgFI87jEjcIY30i T9GNr+b8QsG/LVlYi86tuHARwAjY7Mx0YvO8+osqOyVnszkZfKYEmDVu/yhKEUzvs/E8 X6doH4cvGtutDERV1WwYszfAnCXPnFbww4fyeCVr5fDeooW5LWDh+ApLYo7a+EvbD294 GdbnqmXO68vS87mGMpXVDB6MqnXd1Er9lC/IHoSptYbR6e8GLw9Nr4tHJTyTiOly6TQU Rs5B20eRndW11KM0857G/BedhKz3GjcDBVeD1ztzzJFJ7NJyFRBm1f3pb2EhY8EVXt5u kH3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714655420; x=1715260220; h=to:cc:date:message-id:subject:mime-version:from:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vwMKctJm77K+r5rPeK5xt/IzCUZm0Y7m1dagYztfxqU=; b=oX1IXwMrQjlVv1MCSVlBKrPnVx16EOB8g8GiuL1wdIiXyGYqX1wLpNsOGOwaK0sjVh k5a+xcwj2P9mqbVcOLdkKVj0i5PVehBCpn56X7LUdyOjiAJgYzS/rXNcNZCFk1pZ9a3K 80yqFMt0UehCO2wXMUJWyheWK6jhwhWAHCS495UKwO2Keqh6x/bd+MBwmgd4DbD2bCz/ wjpU2eL2m7uwuu3ZhFeKL6DKGltUVRgyDq+0Hy31nObWwyWSE8fILsOhpJnjBNbx4t6E 7MiOj3IjxcY35amkfk2UrAawLQ/bsvNfDvf/bjRPgY2ultdvXdaqMx226ZjCbHOEJtha FQog== X-Gm-Message-State: AOJu0YxvMypaZw34VOO325h+OFc7XmEB0O8DWconSSLaNC+54rCftJNd /spTEbVTv2wIHNXDTRXwgkXiQgylwWmPyPdO6ZnAfA7cxBHAJk+PnYvY9Q== X-Google-Smtp-Source: AGHT+IGm/NVNUlKk4yyREGco4YX6FFiwxdTZ8wSJx8LY+TglvcTPRlA+GoZyUbV07lqqahcvX6YWyw== X-Received: by 2002:a19:5e1d:0:b0:51d:5e16:517a with SMTP id s29-20020a195e1d000000b0051d5e16517amr1161799lfb.48.1714655419487; Thu, 02 May 2024 06:10:19 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id p25-20020ac246d9000000b0051d2c376c0dsm166061lfo.286.2024.05.02.06.10.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2024 06:10:19 -0700 (PDT) X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284316 Archived-At: --Apple-Mail=_BB367BA3-478B-4923-B1DA-F989CA89DE9F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii `flymake-cc-use-special-make-target`, the standard value for = `flymake-cc-command`, generates a command like make check-syntax CHK_SOURCES=3D"-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? --Apple-Mail=_BB367BA3-478B-4923-B1DA-F989CA89DE9F Content-Disposition: attachment; filename=flymake-cc-null-output.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="flymake-cc-null-output.diff" Content-Transfer-Encoding: 7bit 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'.") --Apple-Mail=_BB367BA3-478B-4923-B1DA-F989CA89DE9F--