This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

Re: [PATCH RFA] testsuite/gdb.c++/templates.cc printf() patch


On Jan 29,  6:44pm, Michael Elizabeth Chastain wrote:

> Hmmm.  Why does gdb.c++/templates.cc have a definition of printf()
> at all?

Good question.  I didn't see any reason for the printf() definition
either at the time I investigated this problem.  But I figured that
the more conservative course of action would be to change the
definition to not collide with gcc's internal declarations.

I just spent a few minutes digging around in the Red Hat (former
Cygnus) internal repository and didn't find anything enlightening
either.  I thought perhaps that some earlier version of the test
used printf() in some capacity, but that does not appear to be
the case.

> I don't think it's ever called, either from templates.cc or
> from templates.exp.  I tried adding some 'write' statements to it
> and deleting the thing altogether, and I always got the same results
> (5 PASS, 17 FAIL, 6 XFAIL).
> 
> I have no problem with changing the definition from "void" to "int"
> as long as it exists though.

I'll leave it to the testsuite maintainers to decide whether it would
be better to change the printf() declarator or remove the printf()
definition altogether.

Kevin

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