2011/10/8 Andrew Ross <andrewr...@users.sourceforge.net>:
> On Fri, Oct 07, 2011 at 05:45:56PM -0700, Alan Irwin wrote:
>> On 2011-10-07 16:28-0700 Alan W. Irwin wrote:
>>
>> > Hi Andrew:
>> >
>> > Following Geoffrey's recent advice to test our software for standards
>> > compliancy, I tried the following:
>> >
>> > export CFLAGS='-O3 -fvisibility=hidden -std=c99 -pedantic'
>> > export 'CXXFLAGS='-O3 -fvisibility=hidden -std=c++98 -pedantic'
>> > export FFLAGS='-O3'

In gcc documentation it can be readed about the -pedantic flag
(http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Warning-Options.html#Warning-Options):

"Some users try to use -pedantic to check programs for strict ISO C
conformance. They soon find that it does not do quite what they want:
it finds some non-ISO practices, but not all—only those for which ISO
C requires a diagnostic, and some others for which diagnostics have
been added."

So I think that other warning flags should be added in order to check
the warning (not only warnongs concerning c99). First of all I think
that -Wall and -Wextra could be added. But -Wall and -Wextra do not
detect some warnings that I consider important, as type conversion
(useful to detect, for example, signed assignation to an unsigned
variable) or missing prototypes of functions. My list of flags for c99
compilation is:

CFLAGS='-O3 -std=c99 -pedantic -Wall -Wextra -Wmissing-prototypes
-Wstrict-prototypes -Wnested-externs -Wconversion -Wshadow -Wcast-qual
-Wcast-align -Wwrite-strings'

>> >
>> > cmake -DENABLE_java=OFF ...
>> >
>> > make test_noninteractive
>> >
>> > The results for that test without java had no obvious errors, but
>> > there were lots of warning messages during the compilation about our
>> > code not being compliant with standards.  That is a big concern so I
>> > hope you will take a look at these warning messages to see what can
>> > be done.
>> >
>> > Also, if I enable java, then starting with a fresh build and compiling
>> > with the above CFLAGS values generates a segfault on the first java
>> > example with either the test_noninteractive or test_java_psc targets.
>> >
>> > Could you also take a look at that related issue?
>> >
>> > If I try the java build with the above CXXFLAGS and FFLAGS, but with
>> >
>> > export CFLAGS='-O3 -fvisibility=hidden'
>> >
>> > then there are no obvious errors or build warnings with the test_java_psc 
>> > or
>> > test_noninteractive targets.
>>
>> Actually, I got ahead of myself there, and in fact there are lots of
>> build warnings about C++ non-standards compliancy in this case as well.
>>
>> So my further tests (until you can figure this out post release) will be with
>>
>> export CFLAGS='-O3 -fvisibility=hidden'
>> export CXXFLAGS='-O3 -fvisibility=hidden'
>> export FFLAGS='-O3'
>
> Alan,
>
> I'll add it to my list. Currently rather snowed under with work. I
> urgently need to update the Debian packages. This will be next
> priority.
>
> Andrew
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>



-- 
*****************************************
José Luis García Pallero
jgpall...@gmail.com
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to