* Documenting common C/C++ options
@ 2023-10-10 9:47 Florian Weimer
2023-10-10 10:46 ` Richard Earnshaw (lists)
0 siblings, 1 reply; 7+ messages in thread
From: Florian Weimer @ 2023-10-10 9:47 UTC (permalink / raw)
To: gcc
Currently, -fsigned-char and -funsigned-char are only documented as C
language options, although they work for C++ as well (and Objective-C
and Objective-C++, I assume, but I have not tested this). There does
not seem to be a place for this kind of options in the manual.
The options -fshort-enums and -fshort-wchar are documented under
code-generation options, but this seems to be a bit of a stretch because
(at least for -fshort-wchar), these too seem to be more about front-end
behavior.
What would be a good way to address this?
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 9:47 Documenting common C/C++ options Florian Weimer
@ 2023-10-10 10:46 ` Richard Earnshaw (lists)
2023-10-10 10:48 ` Richard Earnshaw (lists)
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw (lists) @ 2023-10-10 10:46 UTC (permalink / raw)
To: Florian Weimer, gcc
On 10/10/2023 10:47, Florian Weimer via Gcc wrote:
> Currently, -fsigned-char and -funsigned-char are only documented as C
> language options, although they work for C++ as well (and Objective-C
> and Objective-C++, I assume, but I have not tested this). There does
> not seem to be a place for this kind of options in the manual.
>
> The options -fshort-enums and -fshort-wchar are documented under
> code-generation options, but this seems to be a bit of a stretch because
> (at least for -fshort-wchar), these too seem to be more about front-end
> behavior.
>
> What would be a good way to address this?
>
> Thanks,
> Florian
>
All of these are ABI; so where ever it goes, it should be documented that changing them will potentially cause issues with any pre-compiled object files having different settings.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 10:46 ` Richard Earnshaw (lists)
@ 2023-10-10 10:48 ` Richard Earnshaw (lists)
2023-10-10 11:11 ` Florian Weimer
0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw (lists) @ 2023-10-10 10:48 UTC (permalink / raw)
To: Florian Weimer, gcc
On 10/10/2023 11:46, Richard Earnshaw (lists) via Gcc wrote:
> On 10/10/2023 10:47, Florian Weimer via Gcc wrote:
>> Currently, -fsigned-char and -funsigned-char are only documented as C
>> language options, although they work for C++ as well (and Objective-C
>> and Objective-C++, I assume, but I have not tested this). There does
>> not seem to be a place for this kind of options in the manual.
>>
>> The options -fshort-enums and -fshort-wchar are documented under
>> code-generation options, but this seems to be a bit of a stretch because
>> (at least for -fshort-wchar), these too seem to be more about front-end
>> behavior.
>>
>> What would be a good way to address this?
>>
>> Thanks,
>> Florian
>>
>
>
> All of these are ABI; so where ever it goes, it should be documented that changing them will potentially cause issues with any pre-compiled object files having different settings.
>
> R.
And you can add -f[un]signed-bitfield to that list as well.
R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 10:48 ` Richard Earnshaw (lists)
@ 2023-10-10 11:11 ` Florian Weimer
2023-10-10 11:15 ` Richard Biener
2023-10-10 16:33 ` Jason Merrill
0 siblings, 2 replies; 7+ messages in thread
From: Florian Weimer @ 2023-10-10 11:11 UTC (permalink / raw)
To: Richard Earnshaw (lists); +Cc: gcc
* Richard Earnshaw:
> On 10/10/2023 11:46, Richard Earnshaw (lists) via Gcc wrote:
>> On 10/10/2023 10:47, Florian Weimer via Gcc wrote:
>>> Currently, -fsigned-char and -funsigned-char are only documented as C
>>> language options, although they work for C++ as well (and Objective-C
>>> and Objective-C++, I assume, but I have not tested this). There does
>>> not seem to be a place for this kind of options in the manual.
>>>
>>> The options -fshort-enums and -fshort-wchar are documented under
>>> code-generation options, but this seems to be a bit of a stretch because
>>> (at least for -fshort-wchar), these too seem to be more about front-end
>>> behavior.
>>>
>>> What would be a good way to address this?
>>>
>>> Thanks,
>>> Florian
>>>
>>
>>
>> All of these are ABI; so where ever it goes, it should be documented
>> that changing them will potentially cause issues with any
>> pre-compiled object files having different settings.
> And you can add -f[un]signed-bitfield to that list as well.
There's already a section for those ABI options that are like
-fshort-enums:
@node Code Gen Options
@section Options for Code Generation Conventions
Maybe we should move them over there.
But that wasn't really the direction of my question. I was wondering
where we should document a future C version of -fpermissive.
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 11:11 ` Florian Weimer
@ 2023-10-10 11:15 ` Richard Biener
2023-10-10 16:33 ` Jason Merrill
1 sibling, 0 replies; 7+ messages in thread
From: Richard Biener @ 2023-10-10 11:15 UTC (permalink / raw)
To: Florian Weimer; +Cc: Richard Earnshaw (lists), gcc
On Tue, Oct 10, 2023 at 1:13 PM Florian Weimer via Gcc <gcc@gcc.gnu.org> wrote:
>
> * Richard Earnshaw:
>
> > On 10/10/2023 11:46, Richard Earnshaw (lists) via Gcc wrote:
> >> On 10/10/2023 10:47, Florian Weimer via Gcc wrote:
> >>> Currently, -fsigned-char and -funsigned-char are only documented as C
> >>> language options, although they work for C++ as well (and Objective-C
> >>> and Objective-C++, I assume, but I have not tested this). There does
> >>> not seem to be a place for this kind of options in the manual.
> >>>
> >>> The options -fshort-enums and -fshort-wchar are documented under
> >>> code-generation options, but this seems to be a bit of a stretch because
> >>> (at least for -fshort-wchar), these too seem to be more about front-end
> >>> behavior.
> >>>
> >>> What would be a good way to address this?
> >>>
> >>> Thanks,
> >>> Florian
> >>>
> >>
> >>
> >> All of these are ABI; so where ever it goes, it should be documented
> >> that changing them will potentially cause issues with any
> >> pre-compiled object files having different settings.
>
> > And you can add -f[un]signed-bitfield to that list as well.
>
> There's already a section for those ABI options that are like
> -fshort-enums:
>
> @node Code Gen Options
> @section Options for Code Generation Conventions
>
> Maybe we should move them over there.
>
> But that wasn't really the direction of my question. I was wondering
> where we should document a future C version of -fpermissive.
Options common to the C family are documented in 'C Dialect Options'
which says
"The following options control the dialect of C (or languages derived
from C, such as C++, Objective-C and Objective-C++) that the compiler
accepts:"
the options usually specify when they do not apply to all of the above
sibling languages (where it's not obvious).
Richard.
> Thanks,
> Florian
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 11:11 ` Florian Weimer
2023-10-10 11:15 ` Richard Biener
@ 2023-10-10 16:33 ` Jason Merrill
2023-10-10 17:15 ` Florian Weimer
1 sibling, 1 reply; 7+ messages in thread
From: Jason Merrill @ 2023-10-10 16:33 UTC (permalink / raw)
To: Florian Weimer; +Cc: Richard Earnshaw (lists), gcc
[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]
On Tue, Oct 10, 2023 at 7:12 AM Florian Weimer via Gcc <gcc@gcc.gnu.org>
wrote:
> * Richard Earnshaw:
>
> > On 10/10/2023 11:46, Richard Earnshaw (lists) via Gcc wrote:
> >> On 10/10/2023 10:47, Florian Weimer via Gcc wrote:
> >>> Currently, -fsigned-char and -funsigned-char are only documented as C
> >>> language options, although they work for C++ as well (and Objective-C
> >>> and Objective-C++, I assume, but I have not tested this). There does
> >>> not seem to be a place for this kind of options in the manual.
> >>>
> >>> The options -fshort-enums and -fshort-wchar are documented under
> >>> code-generation options, but this seems to be a bit of a stretch
> because
> >>> (at least for -fshort-wchar), these too seem to be more about front-end
> >>> behavior.
> >>>
> >>> What would be a good way to address this?
> >>>
> >>> Thanks,
> >>> Florian
> >>>
> >>
> >>
> >> All of these are ABI; so where ever it goes, it should be documented
> >> that changing them will potentially cause issues with any
> >> pre-compiled object files having different settings.
>
> > And you can add -f[un]signed-bitfield to that list as well.
>
> There's already a section for those ABI options that are like
> -fshort-enums:
>
> @node Code Gen Options
> @section Options for Code Generation Conventions
>
> Maybe we should move them over there.
>
> But that wasn't really the direction of my question. I was wondering
> where we should document a future C version of -fpermissive.
>
My permerror patch proposes moving it to the Warning Options node, right
after -pedantic-errors.
Jason
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Documenting common C/C++ options
2023-10-10 16:33 ` Jason Merrill
@ 2023-10-10 17:15 ` Florian Weimer
0 siblings, 0 replies; 7+ messages in thread
From: Florian Weimer @ 2023-10-10 17:15 UTC (permalink / raw)
To: Jason Merrill; +Cc: Richard Earnshaw (lists), gcc
* Jason Merrill:
>> But that wasn't really the direction of my question. I was wondering
>> where we should document a future C version of -fpermissive.
>
> My permerror patch proposes moving it to the Warning Options node,
> right after -pedantic-errors.
Yes, that should work. I'm basing my patches based on it.
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-10 17:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-10 9:47 Documenting common C/C++ options Florian Weimer
2023-10-10 10:46 ` Richard Earnshaw (lists)
2023-10-10 10:48 ` Richard Earnshaw (lists)
2023-10-10 11:11 ` Florian Weimer
2023-10-10 11:15 ` Richard Biener
2023-10-10 16:33 ` Jason Merrill
2023-10-10 17:15 ` Florian Weimer
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).