Groups | Search | Server Info | Login | Register


Groups > comp.lang.c > #397273

Re: Why is this happening?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Why is this happening?
Date Sun, 29 Mar 2026 10:37:23 -0700
Organization A noiseless patient Spider
Lines 38
Message-ID <867bqu35bg.fsf@linuxsc.com> (permalink)
References <10q5046$3ec1o$2@dont-email.me> <10q523v$3e865$1@dont-email.me> <n2n05bFmg8nU2@mid.individual.net> <10q7bug$7vod$1@dont-email.me> <87bjg8wrgl.fsf@example.invalid> <10q7kon$aibc$2@dont-email.me> <10q85s6$fe60$1@dont-email.me> <10q8e9o$igtv$1@dont-email.me> <10q8sg1$nocf$1@dont-email.me> <10q91bf$pms8$2@dont-email.me> <10qarlj$1c51m$3@dont-email.me> <10qbgif$1mgdi$1@dont-email.me>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Sun, 29 Mar 2026 17:37:26 +0000 (UTC)
Injection-Info dont-email.me; posting-host="8b6e2ad1f6d4b3e2ca51dfb376f541d7"; logging-data="1868361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ByofuOW1gIfe9Viax0il6O/61+YEtBzw="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:DIneKy1bQ5vmvCntbIAb0sJHGnw= sha1:KhmlQxYIEB6QxMZM3dS8+f2qjZw=
Xref csiph.com comp.lang.c:397273

Show key headers only | View raw


Richard Harnden <richard.nospam@gmail.invalid> writes:

> On 29/03/2026 10:33, David Brown wrote:
>
>> On 28/03/2026 17:58, Richard Harnden wrote:
>>
>>> On 28/03/2026 15:35, David Brown wrote:
>>>
>>>> Well, underscore basically counts as a letter, so it's a valid
>>>> identifier just like "x1234" would be.  Sometimes people use
>>>> identifiers like that for specific purposes, like macro
>>>> parameters.
>>>
>>> Isn't _UPPERCASE and __anything reserved for the implementation?
>>
>> Yes.
>>
>> And identifiers with _lowercase have implicit internal linkage (when
>> they would otherwise have had implicit external linkage).  That's
>> why I wrote "underscore /basically/ counts as a letter" - to save
>> mentioning all the details.
>
> I didn't know that, thanks.

Don't believe everything you read.  Of course, as far as the C
standard is concerned, defining a reserved name is undefined
behavior, but actual compilers have different behavior than what
is suggested above.

> So, at file scope, these are equivalent ... ?
>    static int foo;
>    int _foo;

If you try with gcc or clang (which I did), I expect you will
find that _foo is an ordinary global symbol.  It does not have
"implicit internal linkage".  It is treated just like any other
external definition.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Why is this happening? DFS <nospam@dfs.com> - 2026-03-27 00:12 -0400
  Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-27 05:46 +0100
    Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-27 06:01 +0100
      Re: Why is this happening? DFS <nospam@dfs.com> - 2026-03-27 02:31 -0400
    Re: Why is this happening? Josef Möllers <josef@invalid.invalid> - 2026-03-27 10:15 +0100
      Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-27 16:02 +0000
        Re: Why is this happening? Josef Möllers <josef@invalid.invalid> - 2026-03-28 21:58 +0100
          Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-29 14:30 +0200
            Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-29 18:56 +0000
              Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 02:00 +0200
            Re: Why is this happening? Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2026-03-30 00:41 +0100
              Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 09:25 +0200
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 11:23 +0300
                Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-30 11:16 +0200
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 13:06 +0300
      Re: Why is this happening? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-28 01:46 +0000
        Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-27 20:41 -0700
          Re: Why is this happening? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-03-28 05:17 +0100
            Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-28 10:09 +0100
              Re: Why is this happening? Bart <bc@freeuk.com> - 2026-03-28 11:33 +0000
                Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-28 16:35 +0100
                Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-28 16:56 +0000
                Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-28 16:58 +0000
                Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-28 19:24 -0400
                Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-29 11:33 +0200
                Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-29 16:30 +0100
                Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-29 10:37 -0700
                Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-31 16:20 +0200
                Re: Why is this happening? Richard Harnden <richard.nospam@gmail.invalid> - 2026-03-31 17:19 +0100
                Re: Why is this happening? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-29 13:19 -0700
                Re: Why is this happening? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-03-29 13:26 -0700
                Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 14:14 -0700
                Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-29 20:47 -0400
                Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 13:57 -0700
                Re: Why is this happening? David Brown <david.brown@hesbynett.no> - 2026-03-31 16:26 +0200
          Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-28 15:14 +0000
            Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-28 10:18 -0700
              Re: Why is this happening? scott@slp53.sl.home (Scott Lurndal) - 2026-03-29 18:50 +0000
            Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-28 19:12 -0700
              Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-28 22:31 -0700
                Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-06 12:11 -0700
                Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-06 14:20 -0700
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-04-07 02:05 +0300
                Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-06 17:42 -0700
              Re: Why is this happening? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-03-29 14:43 -0700
            Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-29 11:50 +0300
              Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 13:54 -0700
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 02:05 +0300
                Re: Why is this happening? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-03-29 16:22 -0700
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-30 10:57 +0300
                Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-30 20:37 -0400
                Re: Why is this happening? Michael S <already5chosen@yahoo.com> - 2026-03-31 11:48 +0300
                Re: Why is this happening? James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-03-31 10:51 -0400
                Re: Why is this happening? candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2026-03-31 19:00 +0000
        Re: Why is this happening? Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk> - 2026-04-03 02:41 +0100

csiph-web