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]

[PING] [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)


Hi,

I'd like to ping for this patch: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01800.html

I will add a new BZ entry for the (minor) regression this patch
introduces in gcc.dg/strlenopt-49.c and assign it to myself.


Thanks
Bernd.

On 07/29/18 12:56, Bernd Edlinger wrote:
> Hi!
> 
> This fixes two wrong code bugs where string_constant
> returns over length string constants.  Initializers
> like that are rejected in C++, but valid in C.
> 
> I have xfailed strlenopt-49.c, which tests this feature.
> Personally I don't think that it is worth the effort to
> optimize something that is per se invalid in C++.
> 
> The hunk in builtins.c is unrelated, but I would like
> to use tree_to_shwi here, to be in line with the
> tree_fits_shwi_p check above, and the rest of that
> function which uses signed HWI throughout.
> 
> 
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
> 
> 
> Thanks
> Bernd.

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