diff mbox series

doc: Document -fasm as the opposite of -fno-asm

Message ID 20240701093731.16905-1-alx@kernel.org
State New
Headers show
Series doc: Document -fasm as the opposite of -fno-asm | expand

Commit Message

Alejandro Colomar July 1, 2024, 9:37 a.m. UTC
gcc/ChangeLog:

	* doc/invoke.texi: Document -fasm.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
 gcc/doc/invoke.texi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jakub Jelinek July 1, 2024, 10:40 a.m. UTC | #1
On Mon, Jul 01, 2024 at 11:37:40AM +0200, Alejandro Colomar wrote:
> gcc/ChangeLog:
> 
> 	* doc/invoke.texi: Document -fasm.

Why?  We have almost 1300 options which accept the negative forms
and we don't document any of them this way, the manual explicitly states
that:

Many options have long names starting with @samp{-f} or with
@samp{-W}---for example,
@option{-fmove-loop-invariants}, @option{-Wformat} and so on.  Most of
these have both positive and negative forms; the negative form of
@option{-ffoo} is @option{-fno-foo}.  This manual documents
only one of these two forms, whichever one is not the default.

> Signed-off-by: Alejandro Colomar <alx@kernel.org>
> ---
>  gcc/doc/invoke.texi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 30c4b002d1f..2d55f2715b3 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -198,7 +198,7 @@ in the following sections.
>  @item C Language Options
>  @xref{C Dialect Options,,Options Controlling C Dialect}.
>  @gccoptlist{-ansi  -std=@var{standard}  -aux-info @var{filename}
> --fno-asm
> +-f@r{[}no-@r{]}asm
>  -fno-builtin  -fno-builtin-@var{function}  -fcond-mismatch
>  -ffreestanding  -fgimple  -fgnu-tm  -fgnu89-inline  -fhosted
>  -flax-vector-conversions  -fms-extensions
> @@ -2600,8 +2600,8 @@ comments, after the declaration.
>  
>  @opindex fno-asm
>  @opindex fasm
> -@item -fno-asm
> -Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
> +@item -f@r{[}no-@r{]}asm
> +Do (or do not) recognize @code{asm}, @code{inline} or @code{typeof} as a
>  keyword, so that code can use these words as identifiers.  You can use
>  the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}
>  instead.  In C, @option{-ansi} implies @option{-fno-asm}.
> -- 
> 2.45.2
> 



	Jakub
Alejandro Colomar July 1, 2024, 10:44 a.m. UTC | #2
On Mon, Jul 01, 2024 at 12:40:45PM GMT, Jakub Jelinek wrote:
> On Mon, Jul 01, 2024 at 11:37:40AM +0200, Alejandro Colomar wrote:
> > gcc/ChangeLog:
> > 
> > 	* doc/invoke.texi: Document -fasm.
> 
> Why?  We have almost 1300 options which accept the negative forms
> and we don't document any of them this way, the manual explicitly states
> that:
> 
> Many options have long names starting with @samp{-f} or with
> @samp{-W}---for example,
> @option{-fmove-loop-invariants}, @option{-Wformat} and so on.  Most of
> these have both positive and negative forms; the negative form of
> @option{-ffoo} is @option{-fno-foo}.  This manual documents
> only one of these two forms, whichever one is not the default.

Ahh; hadn't seen that.  Thanks!

> 
> > Signed-off-by: Alejandro Colomar <alx@kernel.org>
> > ---
> >  gcc/doc/invoke.texi | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> > index 30c4b002d1f..2d55f2715b3 100644
> > --- a/gcc/doc/invoke.texi
> > +++ b/gcc/doc/invoke.texi
> > @@ -198,7 +198,7 @@ in the following sections.
> >  @item C Language Options
> >  @xref{C Dialect Options,,Options Controlling C Dialect}.
> >  @gccoptlist{-ansi  -std=@var{standard}  -aux-info @var{filename}
> > --fno-asm
> > +-f@r{[}no-@r{]}asm
> >  -fno-builtin  -fno-builtin-@var{function}  -fcond-mismatch
> >  -ffreestanding  -fgimple  -fgnu-tm  -fgnu89-inline  -fhosted
> >  -flax-vector-conversions  -fms-extensions
> > @@ -2600,8 +2600,8 @@ comments, after the declaration.
> >  
> >  @opindex fno-asm
> >  @opindex fasm
> > -@item -fno-asm
> > -Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
> > +@item -f@r{[}no-@r{]}asm
> > +Do (or do not) recognize @code{asm}, @code{inline} or @code{typeof} as a
> >  keyword, so that code can use these words as identifiers.  You can use
> >  the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}
> >  instead.  In C, @option{-ansi} implies @option{-fno-asm}.
> > -- 
> > 2.45.2
> > 
> 
> 
> 
> 	Jakub
>
Georg-Johann Lay July 2, 2024, 9:54 a.m. UTC | #3
Am 01.07.24 um 11:37 schrieb Alejandro Colomar:
> gcc/ChangeLog:
> 
> 	* doc/invoke.texi: Document -fasm.
> 
> Signed-off-by: Alejandro Colomar <alx@kernel.org>
> ---
>   gcc/doc/invoke.texi | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 30c4b002d1f..2d55f2715b3 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -198,7 +198,7 @@ in the following sections.
>   @item C Language Options
>   @xref{C Dialect Options,,Options Controlling C Dialect}.
>   @gccoptlist{-ansi  -std=@var{standard}  -aux-info @var{filename}
> --fno-asm
> +-f@r{[}no-@r{]}asm
>   -fno-builtin  -fno-builtin-@var{function}  -fcond-mismatch
>   -ffreestanding  -fgimple  -fgnu-tm  -fgnu89-inline  -fhosted
>   -flax-vector-conversions  -fms-extensions
> @@ -2600,8 +2600,8 @@ comments, after the declaration.
>   
>   @opindex fno-asm
>   @opindex fasm
> -@item -fno-asm
> -Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
> +@item -f@r{[}no-@r{]}asm
> +Do (or do not) recognize @code{asm}, @code{inline} or @code{typeof} as a
>   keyword, so that code can use these words as identifiers.  You can use
>   the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}

Also __asm can be used?

Johann

>   instead.  In C, @option{-ansi} implies @option{-fno-asm}.
diff mbox series

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 30c4b002d1f..2d55f2715b3 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -198,7 +198,7 @@  in the following sections.
 @item C Language Options
 @xref{C Dialect Options,,Options Controlling C Dialect}.
 @gccoptlist{-ansi  -std=@var{standard}  -aux-info @var{filename}
--fno-asm
+-f@r{[}no-@r{]}asm
 -fno-builtin  -fno-builtin-@var{function}  -fcond-mismatch
 -ffreestanding  -fgimple  -fgnu-tm  -fgnu89-inline  -fhosted
 -flax-vector-conversions  -fms-extensions
@@ -2600,8 +2600,8 @@  comments, after the declaration.
 
 @opindex fno-asm
 @opindex fasm
-@item -fno-asm
-Do not recognize @code{asm}, @code{inline} or @code{typeof} as a
+@item -f@r{[}no-@r{]}asm
+Do (or do not) recognize @code{asm}, @code{inline} or @code{typeof} as a
 keyword, so that code can use these words as identifiers.  You can use
 the keywords @code{__asm__}, @code{__inline__} and @code{__typeof__}
 instead.  In C, @option{-ansi} implies @option{-fno-asm}.