Changeset 7527


Ignore:
Timestamp:
06/29/18 22:00:41 (3 months ago)
Author:
baker
Message:

#define csqrt llnl_csqrt for GCC to silence warning: conflicting types for built-in function ‘csqrt’ [enabled by default]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libsrc/uw/llnl_fil.c

    r6216 r7527  
    9191 
    9292/* Local function prototypes */ 
     93 
     94/*************************************************************************** 
     95 * To suppress the GCC warning: conflicting types for built-in function    * 
     96 * ‘csqrt’ [enabled by default].  Neither #pragma GCC diagnostic ignored   * 
     97 * "-Wbuiltin-declaration-mismatch" nor the command-line option            * 
     98 * -Wno-builtin-declaration-mismatch are effective.  Only the command-line * 
     99 * option -fno-builtin-csqrt works.  That is a GCC-specific option.  There * 
     100 * seems to be no way to specify -fno-builtin-csqrt in a pragma.  To avoid * 
     101 * having to discern the compiler in the makefile, we redefine csqrt as    * 
     102 * llnl_csqrt when compiling with GCC.  Since csqrt() is static, there is  * 
     103 * no need to propagate the definition anywhere elae.                      * 
     104 ***************************************************************************/ 
     105 
     106#ifdef __GNUC__ 
     107#define csqrt llnl_csqrt 
     108#endif 
     109 
    93110static int buroots(complex *, char *, float *, int); 
    94111static int chebparm(float, float, int, float *, float *); 
Note: See TracChangeset for help on using the changeset viewer.