This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR c++/13101


Dodji Seketeli wrote:
Manuel López-Ibáñez a écrit :
2008/7/3 Dodji Seketeli <dseketel@redhat.com>:
+++ b/gcc/testsuite/g++.dg/parse/func-ptr-decl.C
@@ -0,0 +1,7 @@
+// Contributed by Dodji Seketeli <dseketel@redhat.com>
+// Origin: PR C++/13101
+// { dg-do compile }
+
+extern void(*ptr0)() = 0; // { dg-error "warning: 'ptr0' initialized and
declared 'extern'" }

I think you should use { dg-warning "warning:" } here.

Right. Fixed, regtested on x86_64 and re-sent in attachment to this email.

I don't think the logic is correct here, since I don't see anything that ever clears is_function_pointer, and we might well have an array of pointers to functions. I think you need to check that the innermost declarator is a pointer-to-function.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]