https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62198

--- Comment #2 from Paul H. Hargrove <PHHargrove at lbl dot gov> ---
Both icc (v13.0.1) and pgcc (v12.9-0) agree with gcc (and thus disagree with
clang) on this:

$ cat -n q.c
     1  
     2  typedef unsigned long size_t;
     3  extern const void *alloc (size_t);
     4  
     5  int main()
     6  {
     7    const int (*X0)[10] = alloc (10 * sizeof (int));
     8    return !X0;
     9  }

$ icc -c q.c
q.c(7): warning #2331: a value of type "const void *" cannot be used to
initialize an entity of type "const int (*)[10]" (dropping qualifiers)
    const int (*X0)[10] = alloc (10 * sizeof (int));
                          ^


$ pgcc -c q.c
PGC-W-0095-Type cast required for this conversion (q.c: 7)
PGC/x86-64 Linux 12.9-0: compilation completed with warnings

Reply via email to