https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
Jakub Jelinek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #7 from Jakub Jelinek ---
Author: jakub
Date: Fri Feb 24 20:41:54 2017
New Revision: 245719
URL: https://gcc.gnu.org/viewcvs?rev=245719&root=gcc&view=rev
Log:
PR c++/79588
c-family/
* c-common.c (check_function_restri
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #6 from Jakub Jelinek ---
Created attachment 40781
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40781&action=edit
gcc7-pr79588.patch
Likely yes. In the mean time I've moved it at least to a better place in the
C/C++ FE.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #5 from prathamesh3492 at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #4)
> Indeed, consider e.g.
> // PR c++/79588
> // { dg-do compile }
> // { dg-options "-Wrestrict" }
>
> void foo (char *__restrict, char *__restri
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #4 from Jakub Jelinek ---
Indeed, consider e.g.
// PR c++/79588
// { dg-do compile }
// { dg-options "-Wrestrict" }
void foo (char *__restrict, char *__restrict = __null);
template
void
bar (char **p)
{
foo (p[0], p[0]); // {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #3 from Jakub Jelinek ---
I think the big question is if it isn't simply too early to warn at the place
you've added it, shouldn't it be done later on when the call arguments are
already complete? E.g. do you warn properly for calls
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
--- Comment #2 from prathamesh3492 at gcc dot gnu.org ---
Created attachment 40771
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40771&action=edit
untested patch
Hi Jakub,
IIUC, the patch punts if param_pos < args->length(), ie, the defaul
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
Jakub Jelinek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79588
Jakub Jelinek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|