Marty Kraimer wrote:
>
> GPIB device support which is implemented by starting the John Winan's
> template
> has the statements:
>
> static struct devGpibParmBlock devSupParams;
>
> ...
>
> static struct devGpibParmBlock devSupParams = {
> ...
> };
>
> Note that this is legal ISO C but is not legal C++
I searched the 'bible' (K&R: The C Programming Language) and found no
hint as to what the result of this should be. If one judges according to
logic, the compiler should reject that as a multiple definition error.
But in reality it seems the compiler believes that the first definition
is meant as a declaration (even without 'extern' keyword) and so accepts
it.
However, IMO it is better to prefix the _declaration_ with 'extern'
instead of 'static', i.e.
extern struct devGpibParmBlock devSupParams;
static struct devGpibParmBlock devSupParams = {
...
};
The inconsistences you observed with different compiler versions should
disappear then. I'd vote for changing the skeleton file accordingly.
(The fact that the gcc from vxworks 5.3 has a bug remains of course
untouched by these remarks.)
Bill:
Sorry for not answering, I've been in Greece on vaccation. I don't think
the two problems are related. I'll send you specific info as soon as I
have examined problem more thoroughly.
Ben
--
The Notorious Neb Nesknarf
---------------------------------------------------------------------
@BESSY II: fax: +49 30 6392-4859 phone: +49 30 6392-4865
---------------------------------------------------------------------
make sure useless people get employment: BND MAD Waffen Lieferung ETA
Lybien Irak Iran CIA killer Heroin Befreiungsfront IRA RAF PKK Kurden
- Replies:
- Re: beta12 & GPIB & Compiler Bug Marty Kraimer
- References:
- beta12 & GPIB & Compiler Bug Marty Kraimer
- Navigate by Date:
- Prev:
Re: where to find PMAC Controller support ? Andy Foster
- Next:
Re: MBBI & mask Paul Sichta
- 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:
beta12 & GPIB & Compiler Bug Marty Kraimer
- Next:
Re: beta12 & GPIB & Compiler Bug Marty Kraimer
- 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
|