Message ID | c210778d-e7d8-5d00-7255-329f7dfec052@suse.cz |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BEB63858430 for <patchwork@sourceware.org>; Fri, 2 Dec 2022 11:27:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 935133858D20 for <gcc-patches@gcc.gnu.org>; Fri, 2 Dec 2022 11:27:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 935133858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9B8291FDA8; Fri, 2 Dec 2022 11:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669980449; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iw9Q7Sw2DnoYC+utK3D7xGDG7P+DCog/zcYH+lMcpCY=; b=OLipBcd8VTosbqXTMoWAMFmmIXnk91EIKLi2+0inYl1hdkIr1XhLU/VmG4tlAPiop3wrOx mJf545hQeuxYggtWQoz55EX6+pP1NvTPIENhYYtboKQsj+mMkZ4x9l5O2cWShVjUuwImEz tDcB4VVpx6WJV1PC7O3O3uIMAE4UjhQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669980449; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iw9Q7Sw2DnoYC+utK3D7xGDG7P+DCog/zcYH+lMcpCY=; b=9GB68DHkVSpxJ3dfWQMXl/uASzsdqtglEFr+ojFGR4vq3aAQ2LstJln324q9faOMtIW3Y6 9X9FTjrCvYlJXAAA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 81AB9133DE; Fri, 2 Dec 2022 11:27:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id fIqoHiHhiWPNDAAAGKfGzw (envelope-from <mliska@suse.cz>); Fri, 02 Dec 2022 11:27:29 +0000 Message-ID: <c210778d-e7d8-5d00-7255-329f7dfec052@suse.cz> Date: Fri, 2 Dec 2022 12:27:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 From: =?utf-8?q?Martin_Li=C5=A1ka?= <mliska@suse.cz> Subject: [PATCH] ipa: silent -Wodr notes with -w To: gcc-patches@gcc.gnu.org Content-Language: en-US Cc: Jan Hubicka <hubicka@ucw.cz>, Martin Jambor <mjambor@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
ipa: silent -Wodr notes with -w
|
|
Commit Message
Martin Liška
Dec. 2, 2022, 11:27 a.m. UTC
If -w is used, warn_odr properly sets *warned = false and so it should be preserved when calling warn_types_mismatch. Noticed that during a LTO reduction where I used -w. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned value if set. --- gcc/ipa-devirt.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Comments
PING^1 On 12/2/22 12:27, Martin Liška wrote: > If -w is used, warn_odr properly sets *warned = false and > so it should be preserved when calling warn_types_mismatch. > > Noticed that during a LTO reduction where I used -w. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ChangeLog: > > * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned > value if set. > --- > gcc/ipa-devirt.cc | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc > index 265d07bb354..bcdc50c5bd7 100644 > --- a/gcc/ipa-devirt.cc > +++ b/gcc/ipa-devirt.cc > @@ -1300,7 +1300,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, NULL, NULL, warn, warned, > G_("it is defined as a pointer to different type " > "in another translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), > loc1, loc2); > return false; > @@ -1315,7 +1315,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, NULL, NULL, warn, warned, > G_("a different type is defined " > "in another translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); > return false; > } > @@ -1333,7 +1333,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, NULL, NULL, warn, warned, > G_("a different type is defined in another " > "translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); > } > gcc_assert (TYPE_STRING_FLAG (t1) == TYPE_STRING_FLAG (t2)); > @@ -1375,7 +1375,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, NULL, NULL, warn, warned, > G_("has different return value " > "in another translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); > return false; > } > @@ -1398,7 +1398,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, NULL, NULL, warn, warned, > G_("has different parameters in another " > "translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_VALUE (parms1), > TREE_VALUE (parms2), loc1, loc2); > return false; > @@ -1484,7 +1484,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, > warn_odr (t1, t2, f1, f2, warn, warned, > G_("a field of same name but different type " > "is defined in another translation unit")); > - if (warn && warned) > + if (warn && (warned == NULL || *warned)) > warn_types_mismatch (TREE_TYPE (f1), TREE_TYPE (f2), loc1, loc2); > return false; > }
PING^2 On 12/9/22 09:27, Martin Liška wrote: > PING^1 > > On 12/2/22 12:27, Martin Liška wrote: >> If -w is used, warn_odr properly sets *warned = false and >> so it should be preserved when calling warn_types_mismatch. >> >> Noticed that during a LTO reduction where I used -w. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >> * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned >> value if set. >> --- >> gcc/ipa-devirt.cc | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc >> index 265d07bb354..bcdc50c5bd7 100644 >> --- a/gcc/ipa-devirt.cc >> +++ b/gcc/ipa-devirt.cc >> @@ -1300,7 +1300,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, NULL, NULL, warn, warned, >> G_("it is defined as a pointer to different type " >> "in another translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), >> loc1, loc2); >> return false; >> @@ -1315,7 +1315,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, NULL, NULL, warn, warned, >> G_("a different type is defined " >> "in another translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >> return false; >> } >> @@ -1333,7 +1333,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, NULL, NULL, warn, warned, >> G_("a different type is defined in another " >> "translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >> } >> gcc_assert (TYPE_STRING_FLAG (t1) == TYPE_STRING_FLAG (t2)); >> @@ -1375,7 +1375,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, NULL, NULL, warn, warned, >> G_("has different return value " >> "in another translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >> return false; >> } >> @@ -1398,7 +1398,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, NULL, NULL, warn, warned, >> G_("has different parameters in another " >> "translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_VALUE (parms1), >> TREE_VALUE (parms2), loc1, loc2); >> return false; >> @@ -1484,7 +1484,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >> warn_odr (t1, t2, f1, f2, warn, warned, >> G_("a field of same name but different type " >> "is defined in another translation unit")); >> - if (warn && warned) >> + if (warn && (warned == NULL || *warned)) >> warn_types_mismatch (TREE_TYPE (f1), TREE_TYPE (f2), loc1, loc2); >> return false; >> } >
PING^3 On 12/22/22 13:15, Martin Liška wrote: > PING^2 > > On 12/9/22 09:27, Martin Liška wrote: >> PING^1 >> >> On 12/2/22 12:27, Martin Liška wrote: >>> If -w is used, warn_odr properly sets *warned = false and >>> so it should be preserved when calling warn_types_mismatch. >>> >>> Noticed that during a LTO reduction where I used -w. >>> >>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >>> >>> Ready to be installed? >>> Thanks, >>> Martin >>> >>> gcc/ChangeLog: >>> >>> * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned >>> value if set. >>> --- >>> gcc/ipa-devirt.cc | 12 ++++++------ >>> 1 file changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc >>> index 265d07bb354..bcdc50c5bd7 100644 >>> --- a/gcc/ipa-devirt.cc >>> +++ b/gcc/ipa-devirt.cc >>> @@ -1300,7 +1300,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>> G_("it is defined as a pointer to different type " >>> "in another translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), >>> loc1, loc2); >>> return false; >>> @@ -1315,7 +1315,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>> G_("a different type is defined " >>> "in another translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>> return false; >>> } >>> @@ -1333,7 +1333,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>> G_("a different type is defined in another " >>> "translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>> } >>> gcc_assert (TYPE_STRING_FLAG (t1) == TYPE_STRING_FLAG (t2)); >>> @@ -1375,7 +1375,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>> G_("has different return value " >>> "in another translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>> return false; >>> } >>> @@ -1398,7 +1398,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>> G_("has different parameters in another " >>> "translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_VALUE (parms1), >>> TREE_VALUE (parms2), loc1, loc2); >>> return false; >>> @@ -1484,7 +1484,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>> warn_odr (t1, t2, f1, f2, warn, warned, >>> G_("a field of same name but different type " >>> "is defined in another translation unit")); >>> - if (warn && warned) >>> + if (warn && (warned == NULL || *warned)) >>> warn_types_mismatch (TREE_TYPE (f1), TREE_TYPE (f2), loc1, loc2); >>> return false; >>> } >> >
PING^4 On 1/13/23 10:09, Martin Liška wrote: > PING^3 > > On 12/22/22 13:15, Martin Liška wrote: >> PING^2 >> >> On 12/9/22 09:27, Martin Liška wrote: >>> PING^1 >>> >>> On 12/2/22 12:27, Martin Liška wrote: >>>> If -w is used, warn_odr properly sets *warned = false and >>>> so it should be preserved when calling warn_types_mismatch. >>>> >>>> Noticed that during a LTO reduction where I used -w. >>>> >>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >>>> >>>> Ready to be installed? >>>> Thanks, >>>> Martin >>>> >>>> gcc/ChangeLog: >>>> >>>> * ipa-devirt.cc (odr_types_equivalent_p): Respect *warned >>>> value if set. >>>> --- >>>> gcc/ipa-devirt.cc | 12 ++++++------ >>>> 1 file changed, 6 insertions(+), 6 deletions(-) >>>> >>>> diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc >>>> index 265d07bb354..bcdc50c5bd7 100644 >>>> --- a/gcc/ipa-devirt.cc >>>> +++ b/gcc/ipa-devirt.cc >>>> @@ -1300,7 +1300,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>>> G_("it is defined as a pointer to different type " >>>> "in another translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), >>>> loc1, loc2); >>>> return false; >>>> @@ -1315,7 +1315,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>>> G_("a different type is defined " >>>> "in another translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>>> return false; >>>> } >>>> @@ -1333,7 +1333,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>>> G_("a different type is defined in another " >>>> "translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>>> } >>>> gcc_assert (TYPE_STRING_FLAG (t1) == TYPE_STRING_FLAG (t2)); >>>> @@ -1375,7 +1375,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>>> G_("has different return value " >>>> "in another translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); >>>> return false; >>>> } >>>> @@ -1398,7 +1398,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, NULL, NULL, warn, warned, >>>> G_("has different parameters in another " >>>> "translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_VALUE (parms1), >>>> TREE_VALUE (parms2), loc1, loc2); >>>> return false; >>>> @@ -1484,7 +1484,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, >>>> warn_odr (t1, t2, f1, f2, warn, warned, >>>> G_("a field of same name but different type " >>>> "is defined in another translation unit")); >>>> - if (warn && warned) >>>> + if (warn && (warned == NULL || *warned)) >>>> warn_types_mismatch (TREE_TYPE (f1), TREE_TYPE (f2), loc1, loc2); >>>> return false; >>>> } >>> >> >
diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc index 265d07bb354..bcdc50c5bd7 100644 --- a/gcc/ipa-devirt.cc +++ b/gcc/ipa-devirt.cc @@ -1300,7 +1300,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, NULL, NULL, warn, warned, G_("it is defined as a pointer to different type " "in another translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); return false; @@ -1315,7 +1315,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, NULL, NULL, warn, warned, G_("a different type is defined " "in another translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); return false; } @@ -1333,7 +1333,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, NULL, NULL, warn, warned, G_("a different type is defined in another " "translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); } gcc_assert (TYPE_STRING_FLAG (t1) == TYPE_STRING_FLAG (t2)); @@ -1375,7 +1375,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, NULL, NULL, warn, warned, G_("has different return value " "in another translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_TYPE (t1), TREE_TYPE (t2), loc1, loc2); return false; } @@ -1398,7 +1398,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, NULL, NULL, warn, warned, G_("has different parameters in another " "translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_VALUE (parms1), TREE_VALUE (parms2), loc1, loc2); return false; @@ -1484,7 +1484,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned, warn_odr (t1, t2, f1, f2, warn, warned, G_("a field of same name but different type " "is defined in another translation unit")); - if (warn && warned) + if (warn && (warned == NULL || *warned)) warn_types_mismatch (TREE_TYPE (f1), TREE_TYPE (f2), loc1, loc2); return false; }