Ian Lance Taylor - Re: [PATCH] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf ( (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] Fix ICE on sprintf (p, "%s") and miscompilation of sprintf (p, "a", q++) (PR middle-end/30473)


Jakub Jelinek jakub@redhat.com writes:

BTW, I noticed we do all the fold_builtin_1 folding even with -O0, is that desirable? Might make debugging harder.

I think we should fold __builtin_FN, and in some cases that is necessary. But I agree that something like sprintf should not be folded at -O0. Anybody want to implement that?

Please use a new variable here, e.g., third_argument, rather than reusing arglist. New variables are fairly cheap, and I think it will make the rest of the patch more comprehensible.

I assume you bootstrapped it--you didn't say.

OK with that change for all open branches.

Thanks.

Ian


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