This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ppc more sensitive to duplicate typedefs?
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: 05 Apr 2002 07:59:51 -0800
- Subject: Re: ppc more sensitive to duplicate typedefs?
- References: <200204050317.WAA79877@bromo.msbb.uc.edu>
Jack Howarth <howarth@bromo.msbb.uc.edu> writes:
> xf86drmSiS.c:69: conflicting types for `drm_sis_mem_t'
> kernel/sis_drm.h:10: previous declaration of `drm_sis_mem_t'
> xf86drmSiS.c:73: conflicting types for `drm_sis_agp_t'
> kernel/sis_drm.h:14: previous declaration of `drm_sis_agp_t'
> xf86drmSiS.c:77: conflicting types for `drm_sis_flip_t'
> kernel/sis_drm.h:18: previous declaration of `drm_sis_flip_t'
> make[9]: *** [xf86drmSiS.o] Error 1
>
> where both xf86drmSiS.c and kernel/sis_drm.h had the same
> declarations...
>
> typedef struct {
> int context;
> unsigned int offset;
> unsigned int size;
> unsigned int free;
> } drm_sis_mem_t;
Can you come up with a test case? The correct behaviour is to produce
this error, because the two unnamed structures are different (and not
compatible) types. It may be that the 2.95.x compilers you're working
with are buggy, and the bugs were subsequently fixed. I can't
reproduce the problem with 2.96.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>