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

Submitted by:  -Deleted Account- <reioa>
Submitted on:  Tue 21 Oct 2008 08:39:08 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Operating System: Debian GNU/LinuxStatus: Fixed
Assigned to: -Deleted Account- <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>In charge of this item.
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Oct 2008 07:09:54 PM UTCbjgStatusNone=>Fixed
      Assigned toNone=>bjg
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1