[PATCH] Fix goto *expr for non-pointer expr (PR c++/38725)

Jakub Jelinek jakub@redhat.com
Thu Jan 8 22:06:00 GMT 2009


On Thu, Jan 08, 2009 at 06:03:16PM +0000, Joseph S. Myers wrote:
> On Wed, 7 Jan 2009, Jakub Jelinek wrote:
> 
> > Attached are 2 alternative patches, both bootstrapped/regtested on
> > x86_64-linux.  The first one rejects in both C and C++ FE goto *expr
> > if expr doesn't have void * type, the second one just changes the C++
> > FE to match C FE.  Given that the rejection patch rejected 10 testcases
> > in our testsuite, I'd bet there are numerous programs in the wild that would
> > be bitten by the same, so I'm not sure if it is appropriate, at least
> > this late in the 4.4 cycle.  So perhaps the second patch might be better,
> > at least for 4.4.
> 
> How many of the rejected programs were using some pointer type other than 
> void *?

20071210-1.c    void **
950613-1.c      long
pr29128.c       long *
920826-1.c      char
920831-1.c      char
991213-3.c      int (*)()
pr28489.c       void (*)()
pr27863.c       long
label1.C        void **  
label2.C        void **  

I'd say using void ** instead of void * is more wrong than using long.

	Jakub



More information about the Gcc-patches mailing list