On 11/30/23 16:36, Marek Polacek wrote:
On Thu, Nov 30, 2023 at 10:30:44PM +0100, Jakub Jelinek wrote:
On Thu, Nov 30, 2023 at 10:27:33PM +0100, Florian Weimer wrote:
* Jakub Jelinek:

On Thu, Nov 30, 2023 at 04:15:26PM -0500, Marek Polacek wrote:
On Thu, Nov 30, 2023 at 10:11:31PM +0100, Florian Weimer wrote:
* Marek Polacek:

On Mon, Nov 20, 2023 at 10:56:36AM +0100, Florian Weimer wrote:
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6183,6 +6183,7 @@ that have their own flag:
  @gccoptlist{
  -Wimplicit-function-declaration @r{(C)}
  -Wimplicit-int @r{(C)}
+-Wincompatible-pointer-types @r{(C)}
  -Wint-conversion @r{(C)}
  -Wnarrowing @r{(C++)}
  -Wreturn-mismatch @r{(C)}

BTW, should the C ones mention Objective-C as well?

Isn't there Objective-C++ as well?  I assumed it applied to both
dialects.

I think we usually spell both, if they apply.  But you can leave it as it is.

Seems we use (C and Objective-C only) (40 times) in preference to (C only)
(4 times), (C++ and Objective-C++ only) (61 times) in preference to (6
times), but (C and C++ only) (5 times) and never all 4 languages, even
when I think it is very likely some switch would be C only, C++ only or
C and C++ only.  And (C) is used just for Copyright ;)

So it should say “C and Objective-C only” for the C stuff,

Yes please.
and “C++ and
Objective-C++ only” for -Wnarrowing?

I'd say so, but let's wait for Jason.

FWIW, I just checked the code and I agree.

Yes.  Adjusted thus:


From fa99f7d12b87f36d3c38349fcdcfca074564858d Mon Sep 17 00:00:00 2001
From: Jason Merrill <ja...@redhat.com>
Date: Sun, 10 Dec 2023 14:20:32 -0500
Subject: [PATCH] doc: small tweak
To: gcc-patches@gcc.gnu.org

Mention Objective-C++ here to be consistent with the surrounding C/ObjC
lines.

gcc/ChangeLog:

	* doc/invoke.texi (-fpermissive): Mention ObjC++ for -Wnarrowing.
---
 gcc/doc/invoke.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d4e689b64c0..15f3a86e768 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6246,7 +6246,7 @@ that have their own flag:
 -Wimplicit-int @r{(C and Objective-C only)}
 -Wincompatible-pointer-types @r{(C and Objective-C only)}
 -Wint-conversion @r{(C and Objective-C only)}
--Wnarrowing @r{(C++)}
+-Wnarrowing @r{(C++ and Objective-C++ only)}
 -Wreturn-mismatch @r{(C and Objective-C only)}
 }
 
-- 
2.39.3

Reply via email to