Experimental Physics and Industrial Control System
Subject: |
Quality of the C code generated by the EPICS state notation compiler. |
From: |
Steven M Beard <[email protected]> |
Date: |
Thu, 20 Jun 1996 10:16:29 +0100 (BST) |
I have found the EPICS state notation compiler to be a very useful tool,
and I am using state notation code as the key part of the Core Instrument
Control System I am building for the Gemini 8m telescopes project.
The Gemini programming standard requires that all code submitted to that
project be compiled using and be acceptable to the "-ansi -Wall -pedantic"
options of the C compiler. Unfortunately, when the C generated by the
state notation compiler is compiled in this way it produces a whole stream
of warning messages, sometimes several pages in length. Here are a few
typical examples:
Warning: variable "DATUM_ON" is used but not declared.
Warning: variable "DATUM_OFF" is used but not declared.
../cics_st.st:191: warning: return-type defaults to `int'
../cics_st.st: In function `D_filter_ss_init1':
../cics_st.st:441: warning: control reaches end of non-void function
../cics_st.st: At top level:
../cics_st.st:508: warning: `return' with no value, in function returning non-void
../cics_st.st:510: warning: control reaches end of non-void function
../cics_st.st: At top level:
../cics_st.st:515: warning: return-type defaults to `int'
../cics_st.st: In function `D_filter_ss_not_datumed':
../cics_st.st:1485: warning: `return' with no value, in function returning non-void
../cics_st.st:1487: warning: control reaches end of non-void function
../cics_st.st: At top level:
../cics_st.st:1490: warning: return-type defaults to `int'
../cics_st.st: In function `exit_handler':
I find these warnings can quite easily hide genuine compilation problems.
Is it possible for the state notation compiler to produce code that will
generate fewer warnings (e.g. by declaring the type of some of the
functions the compiler complains are not declared and by adding a value to
"return" statements). Also, I think fixing these warnings now will lead to
more reliable code in the long term. Any comments?
Regards,
Steven
==============================================================================
Steven Beard
Royal Observatory Tel. : +44 (0)131 668 8253 (direct)
Blackford Hill +44 (0)131 668 8100 (switchboard)
Edinburgh EH9 3HJ Fax. : +44 (0)131 668 1130
UK E-mail : [email protected] (Internet)
WWW : http://www.roe.ac.uk/smbwww/
- Replies:
- Re: Quality of the C code generated by the EPICS state notation compiler. Johnny Tang
- Navigate by Date:
- Prev:
gdct on Solaris Mark Rivers
- Next:
Re: Quality of the C code generated by the EPICS state notation compiler. Johnny Tang
- 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:
gdct on Solaris Mark Rivers
- Next:
Re: Quality of the C code generated by the EPICS state notation compiler. Johnny Tang
- 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