This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Lessons learned from compiler error/warnings tests
- From: Martin Sebor <msebor at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>, GCC <gcc at gcc dot gnu dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 9 Sep 2016 11:15:07 -0600
- Subject: Re: Lessons learned from compiler error/warnings tests
- Authentication-results: sourceware.org; auth=none
- References: <29835506-6a1a-d0f4-ff70-01e298928dd1@redhat.com>
On 09/09/2016 06:28 AM, Florian Weimer wrote:
For compile-time fortify checks (such as the wrappers for type-safe
open/openat), we need to add tests in glibc which examine the compiler
output for warnings and errors.
I do not want to add Dejagnu as a dependency to the glibc test suite,
but I wonder if you could share any lessons learned from the testing
support facility in GCC.
Would you suggest to mirror the GCC directives exactly?
I probably have to implement the testing directive parser as a small C
program.
Writing a parser in C or C++ or other high level language wouldn't
be my first (or second) choice. If all I needed to do is check for
compiler errors and warnings on the source lines they point to, my
first choice would be a POSIX shell script combined with grep, sed,
and/or awk.
Martin