From patchwork Mon Oct 23 17:04:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 829431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-464786-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sVTKvR/L"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yLN712d9Xz9t6F for ; Tue, 24 Oct 2017 04:04:41 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=WjXfNyXK1NWc6XaKG50HXhe7+YXiikrku5MU0WBU5narIX+Owm+Y1 H7p1fqlabTAghDga/nv8BP34+pcJgVLvwHHteSEJAS+QAH9ezeabqcLREnV8p9Jd 6jl6TDDaAFAgxNq4muKnyva0dW+crZYb+hkANbfUEFS1uWEW6nBq9I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=ePaWbsjwl22HEbC5T+Q1drbUMrQ=; b=sVTKvR/LvjlXaZNRejjH fLOC4ummOI6EZyTYUITjPQj357/JIqLO3fvjMrLPzFVdV4n/KYVn44eDemmLprqb ANDr9dSWPvNS9BdDzFwl5We4fgqgY2fQlC3nP1J9b5OKgz9i4XCmD0HLQ24jY1S0 q9zKCXZhT5w9XAaYfevlyME= Received: (qmail 111098 invoked by alias); 23 Oct 2017 17:04:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 111086 invoked by uid 89); 23 Oct 2017 17:04:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 23 Oct 2017 17:04:31 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 100F1806BB for ; Mon, 23 Oct 2017 17:04:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 100F1806BB Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=polacek@redhat.com Received: from redhat.com (unknown [10.40.205.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AA8B7A1E6 for ; Mon, 23 Oct 2017 17:04:29 +0000 (UTC) Date: Mon, 23 Oct 2017 19:04:25 +0200 From: Marek Polacek To: GCC Patches Subject: C PATCH to fix a couple of typos (PR c/82681) Message-ID: <20171023170425.GA12792@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) As noted in this PR, chages -> changes. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2017-10-23 Marek Polacek PR c/82681 * c-warn.c (warnings_for_convert_and_check): Fix typos. * gcc.dg/c90-const-expr-11.c: Fix typos in dg-warning. * gcc.dg/overflow-warn-5.c: Likewise. * gcc.dg/overflow-warn-8.c: Likewise. Marek diff --git gcc/c-family/c-warn.c gcc/c-family/c-warn.c index cb1db0327c3..78f6ba83d98 100644 --- gcc/c-family/c-warn.c +++ gcc/c-family/c-warn.c @@ -1215,12 +1215,12 @@ warnings_for_convert_and_check (location_t loc, tree type, tree expr, if (cst) warning_at (loc, OPT_Woverflow, "overflow in conversion from %qT to %qT " - "chages value from %qE to %qE", + "changes value from %qE to %qE", exprtype, type, expr, result); else warning_at (loc, OPT_Woverflow, "overflow in conversion from %qT to %qT " - "chages the value of %qE", + "changes the value of %qE", exprtype, type, expr); } else diff --git gcc/testsuite/gcc.dg/c90-const-expr-11.c gcc/testsuite/gcc.dg/c90-const-expr-11.c index e4f2aff7874..a2720c47bf4 100644 --- gcc/testsuite/gcc.dg/c90-const-expr-11.c +++ gcc/testsuite/gcc.dg/c90-const-expr-11.c @@ -20,7 +20,7 @@ f (void) /* Overflow. */ struct t b = { INT_MAX + 1 }; /* { dg-warning "integer overflow in expression" } */ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */ - struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. chages value " } */ + struct t c = { DBL_MAX }; /* { dg-warning "overflow in conversion from .double. to .int. changes value " } */ /* { dg-error "overflow in constant expression" "constant" { target *-*-* } .-1 } */ /* Bad operator outside sizeof. */ struct s d = { 1 ? 1.0 : atan (a.d) }; /* { dg-error "is not a constant expression|near initialization" } */ diff --git gcc/testsuite/gcc.dg/overflow-warn-5.c gcc/testsuite/gcc.dg/overflow-warn-5.c index b2c8dc31d95..1a5aa0c6059 100644 --- gcc/testsuite/gcc.dg/overflow-warn-5.c +++ gcc/testsuite/gcc.dg/overflow-warn-5.c @@ -3,5 +3,5 @@ /* { dg-options "-Woverflow" } */ unsigned char rx_async(unsigned char p) { - return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. chages value" } */ + return p & 512; /* { dg-warning "overflow in conversion from .int. to .unsigned char. changes value" } */ } diff --git gcc/testsuite/gcc.dg/overflow-warn-8.c gcc/testsuite/gcc.dg/overflow-warn-8.c index ace605517dc..e76bcac5e07 100644 --- gcc/testsuite/gcc.dg/overflow-warn-8.c +++ gcc/testsuite/gcc.dg/overflow-warn-8.c @@ -7,7 +7,7 @@ void foo (int j) int i3 = 1 + INT_MAX; /* { dg-warning "integer overflow" } */ int i4 = +1 + INT_MAX; /* { dg-warning "integer overflow" } */ int i5 = (int)((double)1.0 + INT_MAX); - int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. chages value" } */ + int i6 = (double)1.0 + INT_MAX; /* { dg-warning "overflow in conversion from .double. to .int. changes value" } */ int i7 = 0 ? (int)(double)1.0 + INT_MAX : 1; int i8 = 1 ? 1 : (int)(double)1.0 + INT_MAX; int i9 = j ? (int)(double)1.0 + INT_MAX : 1; /* { dg-warning "integer overflow" } */