From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62832 invoked by alias); 26 Aug 2016 15:56:28 -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 62822 invoked by uid 89); 26 Aug 2016 15:56:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Hx-languages-length:500 X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Aug 2016 15:56:18 +0000 Received: by mail-oi0-f46.google.com with SMTP id c15so115790116oig.0 for ; Fri, 26 Aug 2016 08:56:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=16p7uRHWpZgFg52raMz3YUrkcV6IBrjKeIAhqrNyA04=; b=IPMVUKNBXgdKeyihecrbK8UDBwB6ZIQAQbCCj9E2cWy7MHoBS4ActsmRJZlm2b9pdH M/VSGoG1yQF0zVNQ+2bXiK6x8LvyenZl1oynO5WeGZAfJqLaPy67iUytP3kkkxUN6YGm cQXuWLWdPII/Ek1ZFvPAjRtMijcKoQu/j2KwCkWPLk92JHwDapIaoqQs1WArv4jakF8A QUQMDayIEwUShJ3zXq5D6kGSb/VIpoXlGpraGokm5uRUBjZbu2z4fuOI9TBHanw9Ax7e T/UHs9u1BAWLq7Pj/r8qOt/x/hSU5BSKy529Y5ZM7Xy/SmRfSSVkMaZT2LmIrFsio5/i rX+g== X-Gm-Message-State: AE9vXwO3uLIVVynuaFJ27kmalyt+DALlq9cvQ1xHWyxttaxDk4A9aCiwv+H88yOsnIsz/n2bFXXaAyUnAU9JvDJt X-Received: by 10.157.63.137 with SMTP id r9mr3490479otc.156.1472226976518; Fri, 26 Aug 2016 08:56:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.105.169 with HTTP; Fri, 26 Aug 2016 08:55:55 -0700 (PDT) In-Reply-To: References: From: Jason Merrill Date: Fri, 26 Aug 2016 15:56:00 -0000 Message-ID: Subject: Re: PR35503 - warn for restrict pointer To: Prathamesh Kulkarni Cc: gcc Patches , Marek Polacek , "Joseph S. Myers" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg01875.txt.bz2 On Fri, Aug 26, 2016 at 7:39 AM, Prathamesh Kulkarni wrote: > However with C++FE it appears TYPE_RESTRICT is not set for the > parameters (buf and fmt) > and hence the warning doesn't get emitted for C++. > C FE sets TYPE_RESTRICT for them. I am not sure how to workaround this > issue, and would be grateful for suggestions. In the C++ FE you can see TYPE_RESTRICT on the types of the DECL_ARGUMENTS of the function. Jason