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. > AFAIK one can use any -std={gnu,c}++{98,11,14,17,20,23,26} and their > aliases with Objective-C++, similarly how Objective-C can use any > -std={gnu,c}{89,99,11,17,23} etc. flags. > > > Jason, does the -Wnarrowing aspect of -fpermissive apply to > > Objective-C++ as well, or is it stuck at C++98? Marek