* [Xenomai-core] enum rtdm_selecttype
@ 2008-06-01 18:45 Gilles Chanteperdrix
2008-06-01 18:57 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-06-01 18:45 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai
Hi Jan,
when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
warnings like:
xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
So it seems gcc 4.2.1 does not like the enum being used in function
prototypes without being defines. So, could we move the enum definition
before the functions using it ?
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] enum rtdm_selecttype
2008-06-01 18:45 [Xenomai-core] enum rtdm_selecttype Gilles Chanteperdrix
@ 2008-06-01 18:57 ` Philippe Gerum
2008-06-01 19:02 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2008-06-01 18:57 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Jan Kiszka, xenomai
Gilles Chanteperdrix wrote:
> Hi Jan,
>
> when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
> warnings like:
> xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
> xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
>
> So it seems gcc 4.2.1 does not like the enum being used in function
> prototypes without being defines. So, could we move the enum definition
> before the functions using it ?
>
We can sort this out with a simple forward declaration.
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] enum rtdm_selecttype
2008-06-01 18:57 ` Philippe Gerum
@ 2008-06-01 19:02 ` Gilles Chanteperdrix
2008-06-01 19:19 ` Philippe Gerum
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-06-01 19:02 UTC (permalink / raw)
To: rpm; +Cc: Jan Kiszka, xenomai
Philippe Gerum wrote:
> Gilles Chanteperdrix wrote:
> > Hi Jan,
> >
> > when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
> > warnings like:
> > xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
> > xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
> >
> > So it seems gcc 4.2.1 does not like the enum being used in function
> > prototypes without being defines. So, could we move the enum definition
> > before the functions using it ?
> >
>
> We can sort this out with a simple forward declaration.
That is the way it is done today, but gcc 4.2.1 seems not to like
it. Maybe recent C standards allow the compiler to pick the smallest type
for the enum as C++ does ?
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] enum rtdm_selecttype
2008-06-01 19:02 ` Gilles Chanteperdrix
@ 2008-06-01 19:19 ` Philippe Gerum
2008-06-01 20:08 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2008-06-01 19:19 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Jan Kiszka, xenomai
Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> > Gilles Chanteperdrix wrote:
> > > Hi Jan,
> > >
> > > when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
> > > warnings like:
> > > xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
> > > xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
> > >
> > > So it seems gcc 4.2.1 does not like the enum being used in function
> > > prototypes without being defines. So, could we move the enum definition
> > > before the functions using it ?
> > >
> >
> > We can sort this out with a simple forward declaration.
>
> That is the way it is done today, but gcc 4.2.1 seems not to like
> it. Maybe recent C standards allow the compiler to pick the smallest type
> for the enum as C++ does ?
>
Or any integral type the implementation sees fit actually. Well, yes, maybe it
is indeed bits of the C++ standard dripping on the C implementation of GCC,
especially if forward decl of enums is not explicitly defined by the C standard.
--
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] enum rtdm_selecttype
2008-06-01 19:19 ` Philippe Gerum
@ 2008-06-01 20:08 ` Gilles Chanteperdrix
2008-06-01 20:15 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-06-01 20:08 UTC (permalink / raw)
To: rpm; +Cc: Jan Kiszka, xenomai
Philippe Gerum wrote:
> Gilles Chanteperdrix wrote:
> > Philippe Gerum wrote:
> > > Gilles Chanteperdrix wrote:
> > > > Hi Jan,
> > > >
> > > > when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
> > > > warnings like:
> > > > xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
> > > > xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
> > > >
> > > > So it seems gcc 4.2.1 does not like the enum being used in function
> > > > prototypes without being defines. So, could we move the enum definition
> > > > before the functions using it ?
> > > >
> > >
> > > We can sort this out with a simple forward declaration.
> >
> > That is the way it is done today, but gcc 4.2.1 seems not to like
> > it. Maybe recent C standards allow the compiler to pick the smallest type
> > for the enum as C++ does ?
> >
>
> Or any integral type the implementation sees fit actually. Well, yes, maybe it
> is indeed bits of the C++ standard dripping on the C implementation of GCC,
> especially if forward decl of enums is not explicitly defined by the C standard.
Actually it is gcc 3.4 which does not like the forward decl, not gcc 4.2
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] enum rtdm_selecttype
2008-06-01 20:08 ` Gilles Chanteperdrix
@ 2008-06-01 20:15 ` Jan Kiszka
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2008-06-01 20:15 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> > Gilles Chanteperdrix wrote:
> > > Philippe Gerum wrote:
> > > > Gilles Chanteperdrix wrote:
> > > > > Hi Jan,
> > > > >
> > > > > when compiling xenomai v2.4.x for ARM with gcc 4.2.1, I get plenty of
> > > > > warnings like:
> > > > > xenomai-arm/kernel/xenomai/skins/posix/syscall.c:38:
> > > > > xenomai-arm/include/xenomai/rtdm/rtdm_driver.h:206: warning: parameter has incomplete type
> > > > >
> > > > > So it seems gcc 4.2.1 does not like the enum being used in function
> > > > > prototypes without being defines. So, could we move the enum definition
> > > > > before the functions using it ?
> > > > >
> > > >
> > > > We can sort this out with a simple forward declaration.
> > >
> > > That is the way it is done today, but gcc 4.2.1 seems not to like
> > > it. Maybe recent C standards allow the compiler to pick the smallest type
> > > for the enum as C++ does ?
> > >
> >
> > Or any integral type the implementation sees fit actually. Well, yes, maybe it
> > is indeed bits of the C++ standard dripping on the C implementation of GCC,
> > especially if forward decl of enums is not explicitly defined by the C standard.
>
> Actually it is gcc 3.4 which does not like the forward decl, not gcc 4.2
I'm fine with moving it if that helps to make all compilers happy. Just
ensure that it remains in the right doxygen group.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-06-01 20:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-01 18:45 [Xenomai-core] enum rtdm_selecttype Gilles Chanteperdrix
2008-06-01 18:57 ` Philippe Gerum
2008-06-01 19:02 ` Gilles Chanteperdrix
2008-06-01 19:19 ` Philippe Gerum
2008-06-01 20:08 ` Gilles Chanteperdrix
2008-06-01 20:15 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.