This is the mail archive of the gcc-patches@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: RFC: need help with patch to check asm_fprintf format specifiers


On Thu, 22 May 2003, Kaveh R. Ghazi wrote:

> Please don't let your preference for a perfect solution prevent
> incremental progress in checking coverage.  This is meant to be a
> stopgap until we get an extensible implementation.  Are you saying
> you'd prefer to tolerate bugs rather than a temporary hardwired check?

Ugliness is a bug, both in code and in extension design (and it's
extension design which is being done here).  An ad hoc mechanism for
passing types in at runtime (as opposed to carefully-designed general
syntax for extensible checking) would just make application-specific
checks uglier.

> (To ensure it's temporary, I'd suggest we *don't* document it so no
> one outside of gcc uses it.)

What is supposed to be "temporary" in GCC generally turns out to be
anything but, and needs maintaining for a very long time, even without any
outside users.  [This particular patch seems to presume that if one
release has the feature then all future releases also will, so that if
3.20 gets extensible format checking and so removes the feature then 3.19
will fail to build with 3.20, but that's a minor point.]

> This is neither fair to me nor terribly efficient from a coverage
> perspective.  It makes more sense to leverage this across the larger
> set of gcc testers.  It's especially important going forward since
> it'll >prevent< new bugs from being introduced.

There are any number of checks that detect bugs that some people sometimes
do - building with extra --enable-checking options, building with
valgrind, ad hoc grepping for this or that problem, ....  It doesn't mean
that they are all appropriate for default bootstraps of GCC, even if that
would prevent some bugs.

New bugs in diagnostics that would be detected this way should be very
rare indeed, since any new diagnostic is expected to come with full
testcases.  The bugs should just be in old diagnostics that aren't yet
covered by the testsuite.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


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