This is the mail archive of the gcc@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: [PATCH]: Proof-of-concept for dynamic format checking


"Kaveh R. Ghazi" <ghazi@caipclassic.rutgers.edu> writes:

> I strongly feel that the "inherit" command should not change the
> behavior of the inherited format depending on the --std= flag passed
> to GCC at compile time of the user's code.  This change isn't right
> for users, their variable argument output routine will not change it's
> behavior based on the C standard in effect when compiling it.
> 
> Therefore if we implement an inherit, it should force the user to
> choose "inherit printf90", "inherit printf99" or "inherit printfGNU".
> Or something along those lines.

But in cases like BFD, the code just does some pre-processing and then
calls vfprintf.  So there is no always correct value to inherit.  The
correct value to inherit from is the one which the user will link
against, and for that the closest we can come to the right answer is
the --std= flag used at compile time of the user's code.

Ian


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