Hi,
There is a bug in the sun workshop C++ compiler (version "WorkShop
Compilers 4.2 30 Oct 1996 C++ 4.2") that can effect programs using the
EPICS channel access library. It should never be possible for the body
of the "if" in the following code to execute, but it will execute if it
is compiled with:
CC -O -I/opt/local/epics/epics/base/include/ main.C
The bug goes away if any of various things in the example are changed,
i.e. if the function is not inline, if the code is compiled with the -g
option, etc.
The bug seems to be triggered by the compiler proecessing the relatively
compilicated expression insterted into the code when the channel access
status macros are expanded.
Norm
----------------------------------------
#include "cadef.h"
#include "stdio.h"
inline void t1( void )
{
int caStatus = ECA_NORMAL;
if ( caStatus != ECA_NORMAL )
{
printf( " error, %d\n", ECA_NORMAL); // never get here.
return ;
}
}
main()
{
t1();
printf( "Hello W#include "cadef.h"
}
- Navigate by Date:
- Prev:
Re: Missing file Ben-chin K. Cha
- Next:
Bizarre MEDM problem Kathy McCormick
- 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: Usage of OffPage Input/Output ? Janet Tvedt
- Next:
Bizarre MEDM problem Kathy McCormick
- 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
|