bugGNU Scientific Library - Bugs: bug #24623, Discrepancy between Reference...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24623: Discrepancy between Reference Manual A.4 and #elif

Submitter:  -Deleted Account- <reioa>
Submitted:  Tue 21 Oct 2008 08:39:08 PM UTC
   
 
Category:  None Severity:  3 - Normal
Operating System:  Debian GNU/Linux Status:  Fixed
Assigned to:  bjg Open/Closed:  Closed
Release:  1.11

Wed 22 Oct 2008 07:09:54 PM UTC, comment #1: 

Thank you, I have removed that option from the manual.

Head:       848655208d - remove -Wtraditional, no longer recommended

-Deleted Account- <bjg>
Tue 21 Oct 2008 08:39:08 PM UTC, original submission:  

I tried to compile a program with CGG waring options mentioned in Reference Manual A.4 GCC warning options for numerical programs, but GCC returned error as shown below.

gcc -DHAVE_CONFIG_H -I. -I..    -g -O2 -ansi -pedantic -Werror -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wtraditional -Wconversion -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -fshort-enums -fno-common -Dinline= -g -O4 -g -O2 -MT **.o -MD -MP -MF .deps/****.Tpo -c -o **.o **.c
In file included from /home/***/include/gsl/gsl_math.h:26,
                 from /home/***/include/gsl/gsl_fit.h:24,
                 from **.c:5:
/home/***/include/gsl/gsl_nan.h:26:2: error: suggest not using #elif in traditional C
/home/***/include/gsl/gsl_nan.h:36:2: error: suggest not using #elif in traditional C

Removing -Wtraditional option, the compile was successfully compleated.

If these waring options is recomended officially, GSL itself ought not to block use of the options, I think.

The problematic part is like this.

#ifdef aaa
bbb
#elif ccc
ddd
#else
eee
#endif

This code can be switched to a code in below.

#ifdef aaa
bbb
#else
#ifdef ccc
ddd
#else
eee
#endif
#endif

I would like to take the modification into account.

-Deleted Account- <reioa>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by reioa (Submitted the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-22 bjg StatusNone Fixed
        Assigned toNone bjg
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code