From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E12313858D20 for ; Tue, 1 Mar 2022 18:46:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E12313858D20 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-487-ADxHt6vAOWaqnO5A0ENYGg-1; Tue, 01 Mar 2022 13:46:15 -0500 X-MC-Unique: ADxHt6vAOWaqnO5A0ENYGg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 410D41091DA0; Tue, 1 Mar 2022 18:46:14 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCE621059A64; Tue, 1 Mar 2022 18:46:13 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 221IkBat3311801 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 1 Mar 2022 19:46:11 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 221IkAU63311800; Tue, 1 Mar 2022 19:46:10 +0100 Date: Tue, 1 Mar 2022 19:46:10 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Cc: Martin Sebor Subject: [committed] warn-access: Comment spelling fixes Message-ID: Reply-To: Jakub Jelinek MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 18:46:18 -0000 Hi! I've noticed various spelling bugs in comments in this file. There is one spot I haven't fixed: "Otherwise, VAR is the auto variable (including an unnamed temporary such as a compound literal) whose lifetime's rended it dangling." I'm afraid I don't know what it wanted to say, "lifetime rendered it" or something else? Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2022-03-01 Jakub Jelinek * gimple-ssa-warn-access.cc (warn_string_no_nul, maybe_warn_nonstring_arg, fndecl_alloc_p, new_delete_mismatch_p, matching_alloc_calls_p, maybe_warn_alloc_args_overflow, pass_waccess::check_alloca, pass_waccess::check_strcat, memmodel_to_uhwi, fntype_argno_type, pass_waccess::maybe_check_access_sizes, pass_waccess::check_call_access, pass_waccess::maybe_check_dealloc_call, pass_waccess::check_stmt): Comment spelling fixes. --- gcc/gimple-ssa-warn-access.cc.jj 2022-02-04 14:36:55.215602366 +0100 +++ gcc/gimple-ssa-warn-access.cc 2022-02-28 16:22:40.860520930 +0100 @@ -146,7 +146,7 @@ warn_string_no_nul (location_t loc, Gimp loc = expansion_point_location_if_in_system_header (loc); bool warned; - /* Format the bound range as a string to keep the nuber of messages + /* Format the bound range as a string to keep the number of messages from exploding. */ char bndstr[80]; *bndstr = 0; @@ -619,7 +619,7 @@ maybe_warn_nonstring_arg (tree fndecl, G /* In a call to strncat with a bound in a range whose lower but not upper bound is less than the array size, reset ASIZE to be the same as the bound and the other variable to trigger - the apprpriate warning below. */ + the appropriate warning below. */ if (fncode == BUILT_IN_STRNCAT && bndrng[0] != bndrng[1] && wi::ltu_p (wi::to_offset (bndrng[0]), asize) @@ -1538,7 +1538,7 @@ check_access (tree expr, tree dstwrite, } /* Return true if STMT is a call to an allocation function. Unless - ALL_ALLOC is set, consider only functions that return dynmamically + ALL_ALLOC is set, consider only functions that return dynamically allocated objects. Otherwise return true even for all forms of alloca (including VLA). */ @@ -1720,7 +1720,7 @@ new_delete_mismatch_p (const demangle_co } /* Return true if DELETE_DECL is an operator delete that's not suitable - to call with a pointer returned fron NEW_DECL. */ + to call with a pointer returned from NEW_DECL. */ static bool new_delete_mismatch_p (tree new_decl, tree delete_decl) @@ -1960,7 +1960,7 @@ matching_alloc_calls_p (tree alloc_decl, } /* Return true if DEALLOC_DECL is a function suitable to deallocate - objectes allocated by the ALLOC call. */ + objects allocated by the ALLOC call. */ static bool matching_alloc_calls_p (gimple *alloc, tree dealloc_decl) @@ -2215,7 +2215,7 @@ alloc_max_size (void) /* Diagnose a call EXP to function FN decorated with attribute alloc_size whose argument numbers given by IDX with values given by ARGS exceed - the maximum object size or cause an unsigned oveflow (wrapping) when + the maximum object size or cause an unsigned overflow (wrapping) when multiplied. FN is null when EXP is a call via a function pointer. When ARGS[0] is null the function does nothing. ARGS[1] may be null for functions like malloc, and non-null for those like calloc that @@ -2388,7 +2388,7 @@ pass_waccess::check_alloca (gcall *stmt) /* -Walloca-larger-than and -Wvla-larger-than settings of less than HWI_MAX override the more general -Walloc-size-larger-than so unless either of the former options is smaller than the last - one (wchich would imply that the call was already checked), check + one (which would imply that the call was already checked), check the alloca arguments for overflow. */ const tree alloc_args[] = { call_arg (stmt, 0), NULL_TREE }; const int idx[] = { 0, -1 }; @@ -2471,7 +2471,7 @@ pass_waccess::check_strcat (gcall *stmt) /* There is no way here to determine the length of the string in the destination to which the SRC string is being appended so - just diagnose cases when the souce string is longer than + just diagnose cases when the source string is longer than the destination object. */ access_data data (m_ptr_qry.rvals, stmt, access_read_write, NULL_TREE, true, NULL_TREE, true); @@ -2789,7 +2789,7 @@ memmodel_to_uhwi (tree ord, gimple *stmt else { /* Use the range query to determine constant values in the absence - of constant proppagation (such as at -O0). */ + of constant propagation (such as at -O0). */ value_range rng; if (!get_range_query (cfun)->range_of_expr (rng, ord, stmt) || !rng.constant_p () @@ -3270,7 +3270,7 @@ pass_waccess::check_builtin (gcall *stmt } /* Returns the type of the argument ARGNO to function with type FNTYPE - or null when the typoe cannot be determined or no such argument exists. */ + or null when the type cannot be determined or no such argument exists. */ static tree fntype_argno_type (tree fntype, unsigned argno) @@ -3347,7 +3347,7 @@ pass_waccess::maybe_check_access_sizes ( tree ptrtype = fntype_argno_type (fntype, ptridx); if (!ptrtype) /* A function with a prototype was redeclared without one and - the protype has been lost. See pr102759. Avoid dealing + the prototype has been lost. See pr102759. Avoid dealing with this pathological case. */ return; @@ -3605,7 +3605,7 @@ pass_waccess::check_call_access (gcall * if (!fntypeattrs) return false; - /* Map of attribute accewss specifications for function arguments. */ + /* Map of attribute access specifications for function arguments. */ rdwr_map rdwr_idx; init_attr_rdwr_indices (&rdwr_idx, fntypeattrs); @@ -3621,7 +3621,7 @@ pass_waccess::check_call_access (gcall * if (POINTER_TYPE_P (TREE_TYPE (arg))) { access->ptr = arg; - // A nonnull ACCESS->SIZE contains VLA bounds. */ + /* A nonnull ACCESS->SIZE contains VLA bounds. */ } else { @@ -3654,7 +3654,7 @@ check_nonstring_args (gcall *stmt) /* Issue a warning if a deallocation function such as free, realloc, or C++ operator delete is called with an argument not returned by a matching allocation function such as malloc or the corresponding - form of C++ operatorn new. */ + form of C++ operator new. */ void pass_waccess::maybe_check_dealloc_call (gcall *call) @@ -4331,7 +4331,7 @@ pass_waccess::check_stmt (gimple *stmt) if (m_check_dangling_p && gimple_clobber_p (stmt, CLOBBER_EOL)) { - /* Ignore clobber statemts in blocks with exceptional edges. */ + /* Ignore clobber statements in blocks with exceptional edges. */ basic_block bb = gimple_bb (stmt); edge e = EDGE_PRED (bb, 0); if (e->flags & EDGE_EH) Jakub