From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10372 invoked by alias); 14 Jan 2018 21:54:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10362 invoked by uid 89); 14 Jan 2018 21:54:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f67.google.com Received: from mail-oi0-f67.google.com (HELO mail-oi0-f67.google.com) (209.85.218.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 14 Jan 2018 21:54:47 +0000 Received: by mail-oi0-f67.google.com with SMTP id d124so7119046oib.13 for ; Sun, 14 Jan 2018 13:54:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=rYF9RIYZXGmiqGWJy0OUEtTbyyfoxr/vw19+PXHJ5Ek=; b=dTgF1KV7/+i0M/6Gn6MMxdgrUAyMksT6dgEFGHOzNB5qujxZ9phFO0lEJHzpuEzw9e mEy1JQnyLvoaw3Tp9lSqOrnES5k00RNsn7tWeiDJdT34J0yY/SPCR+ZiI8XHem0qzmkC pzAGpjQkiW+LTCnIlhkwowKgxPblXzcLPM7BcMqIJB+IXS6CmbYXnYjG7ndU39hn+5WR LI+cwFKeIKhFUK2tXANax8H2Qq0hWWkddZWl1LNDPhTls/iPAwgI+Kpny/toCJ20FQ0P wAtwtW0cPDVGZfVSeqrmFLMsJvaYJx6c+EypNC2pe7xLLHjq/SJvbc86q+dwBIpnoneY dZuw== X-Gm-Message-State: AKGB3mLvnrKbZiIwPZH5KC9bR2yhTNBflbBWRZG/4CqIUl9c7wPPHDyk aFLTcbQrIBTzpGwC4pnpnk6vbQ== X-Google-Smtp-Source: ACJfBotktRJaUVRZNmDbw8YpZLBRWaeUalgdCHc4S81yM3dmy77Kj4x3KNHt/Xn4cd6FIyhTOo3o0Q== X-Received: by 10.202.64.6 with SMTP id n6mr15359803oia.315.1515966885757; Sun, 14 Jan 2018 13:54:45 -0800 (PST) Received: from localhost.localdomain ([97.118.124.0]) by smtp.gmail.com with ESMTPSA id u45sm13394710otd.75.2018.01.14.13.54.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jan 2018 13:54:44 -0800 (PST) Subject: Re: [PATCH] document -Wclass-memaccess suppression by casting (PR 81327) To: Jakub Jelinek , Jason Merrill References: <20180114103141.GQ2063@tucnak> Cc: Gcc Patch List From: Martin Sebor Message-ID: Date: Sun, 14 Jan 2018 21:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20180114103141.GQ2063@tucnak> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg01282.txt.bz2 On 01/14/2018 03:31 AM, Jakub Jelinek wrote: > On Sat, Jan 13, 2018 at 04:14:38PM -0700, Martin Sebor wrote: >> -The @option{-Wclass-memaccess} option is enabled by @option{-Wall}. >> +The @option{-Wclass-memaccess} option is enabled by @option{-Wall}. Casting > > Perhaps "Explicitly casting" instead? The implicit cast doesn't suppress it > and occurs whenever there isn't an explicit cast. > >> +the pointer to the class object to @code{void *} or to a type that can be >> +safely accessed by the raw memory function suppresses the warning. >> Sure. I've committed r256677. Martin