This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-in-cxx update


On Wed, Apr 29, 2009 at 10:54 AM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> 2009/4/29 Joseph S. Myers <joseph@codesourcery.com>:
>> On Wed, 29 Apr 2009, Manuel López-Ibáñez wrote:
>>
>>> 2009/4/29 Joseph S. Myers <joseph@codesourcery.com>:
>>> > On Wed, 29 Apr 2009, Manuel López-Ibáñez wrote:
>>> >
>>> >> >> BTW, why is this warned about?
>>> >> >
>>> >> > I imagine because in C it is not conventional to use "extern" when
>>> >> > defining something, only on a declaration that is not a definition.
>>> >>
>>> >> But may it lead to some confusion or subtle error? It seems overly
>>> >> pedantic to me if it is just a matter of style, because ?extern is
>>> >> implicit if missing,
>>> >
>>> > "int i;" is not the same as "extern int i;".
>>>
>>> Sorry for my ignorance but I have been reading and searching for the
>>> answer and I cannot tell what is the difference between "int i = 1"
>>> and "extern int i = 1" at file-scope in C.
>>
>> I did not say those were different, I said the uninitialized case was
>> different, so "extern is implicit if missing" is not a general C rule.
>
> OK, then. I assumed that we were discussing about the initialized
> case, which is the origin of this thread. Hence, my suggestion stands:
> get rid of the warning.

I do not follow your reasoning here.

BTW, I already the history of the warning.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]