This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Use a proper C tokenizer to implement the obsolete typedefs test.
- From: Zack Weinberg <zackw at panix dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, Florian Weimer <fweimer at redhat dot com>, DJ Delorie <dj at redhat dot com>, Arjun Shankar <arjun at redhat dot com>
- Date: Tue, 12 Feb 2019 10:29:11 -0500
- Subject: Re: [PATCH] Use a proper C tokenizer to implement the obsolete typedefs test.
- References: <email@example.com>
On Sat, Jan 19, 2019 at 11:46 AM Zack Weinberg <firstname.lastname@example.org> wrote:
> The test for obsolete typedefs in installed headers was implemented
> using “grep” and could therefore get false positives on e.g. “ulong”
> in a comment. It was also scanning all of the headers included by our
> headers, and therefore testing headers we don’t control, e.g. Linux
> kernel headers.
> This patch splits the obsolete-typedef test from
> scripts/check-installed-headers.sh to a separate program,
> scripts/check-obsolete-constructs.py. Being implemented in Python,
> it is feasible to make it tokenize C accurately enough to avoid false
> positives on the contents of comments and strings. It also only
> examines $(headers) in each subdirectory--all the headers we install,
> but not any external dependencies of those headers.