Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #381981 > unrolled thread

Static analysis tools to catch use of reserved identifiers?

Started byAnthony Cuozzo <anthony@cuozzo.us>
First post2024-02-07 10:13 -0500
Last post2024-02-07 08:38 -0800
Articles 3 — 3 participants

Back to article view | Back to comp.lang.c


Contents

  Static analysis tools to catch use of reserved identifiers? Anthony Cuozzo <anthony@cuozzo.us> - 2024-02-07 10:13 -0500
    Re: Static analysis tools to catch use of reserved identifiers? Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2024-02-07 15:19 +0000
    Re: Static analysis tools to catch use of reserved identifiers? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-02-07 08:38 -0800

#381981 — Static analysis tools to catch use of reserved identifiers?

FromAnthony Cuozzo <anthony@cuozzo.us>
Date2024-02-07 10:13 -0500
SubjectStatic analysis tools to catch use of reserved identifiers?
Message-ID<16NwN.343220$xHn7.45376@fx14.iad>
My inspiration is this post: https://news.ycombinator.com/item?id=39275575

I'm interested in knowing if there are any static analysis tools which 
catch uses of reserved identifier patterns under standard C in addition 
to those reserved under POSIX.

(Please forgive me if "identifier" is the wrong term here. I'm 
interested in looking at variable names, function names, typedef names, 
struct/union/enum (and their members) names, preprocessor macro names, etc.)

Thanks,
--Anthony

[toc] | [next] | [standalone]


#381983

FromMalcolm McLean <malcolm.arthur.mclean@gmail.com>
Date2024-02-07 15:19 +0000
Message-ID<uq072f$1fnso$1@dont-email.me>
In reply to#381981
On 07/02/2024 15:13, Anthony Cuozzo wrote:
> 
> (Please forgive me if "identifier" is the wrong term here. I'm 
> interested in looking at variable names, function names, typedef names, 
> struct/union/enum (and their members) names, preprocessor macro names, 
> etc.)
> 
> 
'But "glory" doesn't mean "a nice knock-down argument",' Alice objected.

'When I use a word,' Humpty Dumpty said, in rather a scornful tone, 'it 
means just what I choose it to mean — neither more nor less.'

'The question is,' said Alice, 'whether you can make words mean so many 
different things.'

'The question is,' said Humpty Dumpty, 'which is to be master — that's 
all.'
-- 
Check out Basic Algorithms and my other books:
https://www.lulu.com/spotlight/bgy1mm

[toc] | [prev] | [next] | [standalone]


#381999

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2024-02-07 08:38 -0800
Message-ID<87zfwcgrft.fsf@nosuchdomain.example.com>
In reply to#381981
Anthony Cuozzo <anthony@cuozzo.us> writes:
> My inspiration is this post: https://news.ycombinator.com/item?id=39275575

According to that post clang's "-Wreserved-identifier" option warns
about identifiers that are reserved by the C standard.

> I'm interested in knowing if there are any static analysis tools which
> catch uses of reserved identifier patterns under standard C in
> addition to those reserved under POSIX.
>
> (Please forgive me if "identifier" is the wrong term here. I'm
> interested in looking at variable names, function names, typedef
> names, struct/union/enum (and their members) names, preprocessor macro
> names, etc.)

If I understand you correctly, "identifier" is exactly the right term.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c


csiph-web