doc: Remove claim about ISO C
diff mbox series

Message ID 7f9cd171-05ac-be8f-a6ca-2c007d4b2acb@gigawatt.nl
State New
Headers show
Series
  • doc: Remove claim about ISO C
Related show

Commit Message

Harald van Dijk Nov. 21, 2019, 7:41 p.m. UTC
Hi,

The patch to make -fcommon the default introduces a bogus claim into the 
GCC documentation. I already raised this issue on the patch itself, 
where it was unfortunately ignored. Please find attached a followup 
patch to remove this bogus claim.

-fcommon was claimed to be incompatible with ISO C for preventing 
duplicate definitions from being diagnosed. It does, but as that elicits 
undefined behaviour (the requirement that there shall be no more than 
one external definition is not a constraint), ISO C does not require any 
diagnostic for it. In the absence of any other rule this would violate, 
both -fcommon and -fno-common are fully compatible with all versions of 
ISO C.

Cheers,
Harald van Dijk

         * doc/invoke.texi (-fcommon): Remove claim about ISO C.

Comments

Joseph Myers Nov. 21, 2019, 10:15 p.m. UTC | #1
On Thu, 21 Nov 2019, Harald van Dijk wrote:

> Hi,
> 
> The patch to make -fcommon the default introduces a bogus claim into the GCC
> documentation. I already raised this issue on the patch itself, where it was
> unfortunately ignored. Please find attached a followup patch to remove this
> bogus claim.

This patch is OK.
Harald van Dijk Nov. 21, 2019, 11:23 p.m. UTC | #2
On 21/11/2019 22:15, Joseph Myers wrote:
> On Thu, 21 Nov 2019, Harald van Dijk wrote:
> 
>> Hi,
>>
>> The patch to make -fcommon the default introduces a bogus claim into the GCC
>> documentation. I already raised this issue on the patch itself, where it was
>> unfortunately ignored. Please find attached a followup patch to remove this
>> bogus claim.
> 
> This patch is OK.

Thanks! I do not have commit access, can you (or someone else) commit 
it, please?

Cheers,
Harald van Dijk
Joseph Myers Nov. 21, 2019, 11:27 p.m. UTC | #3
On Thu, 21 Nov 2019, Harald van Dijk wrote:

> On 21/11/2019 22:15, Joseph Myers wrote:
> > On Thu, 21 Nov 2019, Harald van Dijk wrote:
> > 
> > > Hi,
> > > 
> > > The patch to make -fcommon the default introduces a bogus claim into the
> > > GCC
> > > documentation. I already raised this issue on the patch itself, where it
> > > was
> > > unfortunately ignored. Please find attached a followup patch to remove
> > > this
> > > bogus claim.
> > 
> > This patch is OK.
> 
> Thanks! I do not have commit access, can you (or someone else) commit it,
> please?

Done.

Patch
diff mbox series

--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14141,9 +14141,9 @@  than one compilation unit.
 The @option{-fcommon} places uninitialized global variables in a common block.
 This allows the linker to resolve all tentative definitions of the same variable
 in different compilation units to the same object, or to a non-tentative
-definition.  This behavior does not conform to ISO C, is inconsistent with C++,
-and on many targets implies a speed and code size penalty on global variable
-references.  It is mainly useful to enable legacy code to link without errors.
+definition.  This behavior is inconsistent with C++, and on many targets implies
+a speed and code size penalty on global variable references.  It is mainly
+useful to enable legacy code to link without errors.
 
 @item -fno-ident
 @opindex fno-ident