This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GOOGLE] Disable overflow warning of the offset
- From: Xinliang David Li <davidxl at google dot com>
- To: Dehao Chen <dehao at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 19 Feb 2015 11:12:37 -0800
- Subject: Re: [GOOGLE] Disable overflow warning of the offset
- Authentication-results: sourceware.org; auth=none
- References: <CAO2gOZXcVB5G3KCr2TFUCrWp6==c3ZVVgM_waY_5GiVU8TeZNQ at mail dot gmail dot com>
ok
david
On Thu, Feb 19, 2015 at 11:07 AM, Dehao Chen <dehao@google.com> wrote:
> The offset overflow warning would cause build fails when function's
> start line is missing(0). Until the start line issues is fixed, we
> will suppress this warning.
>
> Testing on-going. OK for google-4_9?
>
> Thanks,
> Dehao
>
> Index: gcc/auto-profile.c
>
> ===================================================================
> --- gcc/auto-profile.c (revision 219263)
> +++ gcc/auto-profile.c (working copy)
> @@ -398,8 +398,6 @@ static unsigned
> get_combined_location (location_t loc, tree decl)
> {
> /* TODO: allow more bits for line and less bits for discriminator. */
> - if (LOCATION_LINE (loc) - DECL_SOURCE_LINE (decl) >= (1<<16))
> - warning_at (loc, OPT_Woverflow, "Offset exceeds 16 bytes.");
> return ((LOCATION_LINE (loc) - DECL_SOURCE_LINE (decl)) << 16)
> | get_discriminator_from_locus (loc);
> }