Fix description of -fcommon
diff mbox series

Message ID VI1PR03MB452891182500A24F174D5ACAE46E0@VI1PR03MB4528.eurprd03.prod.outlook.com
State New
Headers show
Series
  • Fix description of -fcommon
Related show

Commit Message

Bernd Edlinger Oct. 20, 2019, 5:14 p.m. UTC
Hi,

I've noticed that the description of -fcommon that gets printed
with "gcc -v --help" is exactly the opposite of what this
option actually does.

With -fcommon, different global variables w/o initial value
are plced in common blocks, similar to fortran named common
blocks, while with -fno-common, those variables are placed
in the .bss segment.

I believe the description is describing the "flag_no_common",
but that is not what the user needs to know.


Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?


Thanks
Bernd.

Comments

Sandra Loosemore Oct. 20, 2019, 9:17 p.m. UTC | #1
On 10/20/19 11:14 AM, Bernd Edlinger wrote:
> Hi,
> 
> I've noticed that the description of -fcommon that gets printed
> with "gcc -v --help" is exactly the opposite of what this
> option actually does.
> 
> With -fcommon, different global variables w/o initial value
> are plced in common blocks, similar to fortran named common
> blocks, while with -fno-common, those variables are placed
> in the .bss segment.
> 
> I believe the description is describing the "flag_no_common",
> but that is not what the user needs to know.
> 
> 
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?

Good catch!  Yes, this is fine.

-Sandra

Patch
diff mbox series

2019-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* common.opt (-fcommon): Fix description.

Index: gcc/common.opt
===================================================================
--- gcc/common.opt	(revision 277155)
+++ gcc/common.opt	(working copy)
@@ -1132,7 +1132,7 @@ 
 
 fcommon
 Common Report Var(flag_no_common,0)
-Do not put uninitialized globals in the common section.
+Put uninitialized globals in the common section.
 
 fcompare-debug
 Driver