On 2011-10-19 18:49+0100 Andrew Ross wrote:

> I have now completed the bulk of this [code-standards compliance] work.

Hi Andrew:

One more iteration of scripts/style_source.sh was required
to get the last of the style issues (revision 11985).

As of that revision the "minimal" set of compiler flags,

CXXFLAGS=-O3 -fvisibility=hidden -std=c++98
CFLAGS=-O3 -fvisibility=hidden -std=c99 -D_POSIX_C_SOURCE=200112L
FFLAGS=-O3 -std=legacy

appears to build and ctest without errors.  But these -std options and
the -D option appear to be the minimal set of flags that will build
our code.

For example, the "old" set of flags,

CXXFLAGS=-O3 -fvisibility=hidden
CFLAGS=-O3 -fvisibility=hidden
FFLAGS=-O3

now generates build errors. Here are the first of those:

/home/software/plplot_svn/HEAD/plplot_cmake_qt/src/plot3d.c: In function 
‘plfplot3dcl’:
/home/software/plplot_svn/HEAD/plplot_cmake_qt/src/plot3d.c:1014:
error: ‘for’ loop initial declarations are only allowed in C99 mode
/home/software/plplot_svn/HEAD/plplot_cmake_qt/src/plot3d.c:1014:
note: use option -std=c99 or -std=gnu99 to compile your code

Is there any way to avoid these build errors for the "old" set of
flags without generating additional warnings for the "minimal" set of
flags?  If not (which is what I suspect), then I think this is a
painful but still acceptable price for our gcc users to pay to get our
code into compliance with c99.  However, to minimize the pain for our
users _we must be sure_ to communicate the new minimal CXXFLAGS,
CFLAGS, and FFLAGS requirements to our users Will you do that, please,
in README.release?

The other issue is the "minimal" set of flags still generates 16
warning messages.  I assume those are a subset of the warning messages
you have already mentioned, but you may want to give first attention
to eliminating these 16 warnings since the above "minimal" compile
flags are probably the ones our users will tend to use as opposed to
the much more demanding set of compiler flags you are using at the
moment that presumably generates many more warnings than the 16.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to