This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR35503 - warn for restrict pointer
- From: Jason Merrill <jason at redhat dot com>
- To: Prathamesh Kulkarni <prathamesh dot kulkarni at linaro dot org>
- Cc: gcc Patches <gcc-patches at gcc dot gnu dot org>, Marek Polacek <polacek at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Fri, 26 Aug 2016 11:55:55 -0400
- Subject: Re: PR35503 - warn for restrict pointer
- Authentication-results: sourceware.org; auth=none
- References: <CAAgBjMkRNk3f47mXwZ6J_MyMHQym4vo3+zXCZ1R6jjrqDkKRYA@mail.gmail.com>
On Fri, Aug 26, 2016 at 7:39 AM, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> 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