Hi Ben,
On Monday 18 April 2011 14:24:12 J. Lewis Muir wrote:
> FYI, there were a few warnings when building seq 2.0.13-rc1.
This section of Lewis' output is illuminating:
>preprocessing ../tooLong.st
>/opt/vxworks-tornado-2.0.2/host/x86-linux/bin/ccppc -x c -E -DCPU=PPC603
> -DvxWorks -I. -I../O.Common -I. -I.. -I../../../include/os/vxWorks
> -I../../../include -I/home/jlmuir/tmp/opt/epics-3.14.11/include/os/vxWorks
> -I/home/jlmuir/tmp/opt/epics-3.14.11/include
> -I/opt/vxworks-tornado-2.0.2/target/h ../tooLong.st > tooLong.i
>converting tooLong.i
>../../../bin/linux-x86_64/snc tooLong.i -o tooLong.c.tmp
>line 17: cannot assign variable >l< because on this architecture its (base)
> type is larger than 4 bytes. Such variables cannot be faithfully mapped to
> any of the Channel Access base types. Try declaring the variable as 'int'
> or, if that is still too large on your system, as 'short'.
>line 20: cannot assign variable >ul< because on this architecture its (base)
> type is larger than 4 bytes. Such variables cannot be faithfully mapped to
> any of the Channel Access base types. Try declaring the variable as 'int'
> or, if that is still too large on your system, as 'short'.
Unfortunately those warnings from snc are wrong, since this is a cross-build
for the vxWorks-ppc603 architecture where long is 32 bits so is legal. Since
snc doesn't know what architecture the target will be compiled for or what the
characteristics of that target are, I think it has to defer those size checks
to the C compiler when someone uses a long variable. It can do that by
generating code like this:
#include <limits.h>
#if LONG_MAX > 2147483647L
# error Cannot assign ...
#endif
C doesn't allow the use of sizeof in a #if condition, but using LONG_MAX like
this works fine.
Thanks,
- Andrew
--
An error is only a mistake if you don't learn from it.
When you learn something from it, it becomes a lesson.
- Replies:
- Re: ioc segfault if - c seq flag is not set or +c? Benjamin Franksen
- References:
- ioc segfault if - c seq flag is not set or +c? Abadie Lana
- Re: ioc segfault if - c seq flag is not set or +c? Benjamin Franksen
- Re: ioc segfault if - c seq flag is not set or +c? J. Lewis Muir
- Navigate by Date:
- Prev:
Re: EDM site unavailable? D Peter Siddons
- Next:
Re: EDM site unavailable? S. Banerian
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: ioc segfault if - c seq flag is not set or +c? J. Lewis Muir
- Next:
Re: ioc segfault if - c seq flag is not set or +c? Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|