This is the mail archive of the gcc@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: ppc more sensitive to duplicate typedefs?


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>


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