SQLite

Check-in [aa5be9ee93]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fail to build if the -ffast-math option is specified in GCC. Ticket #3202. (CVS 5345)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: aa5be9ee935ae2a45d78405e26bba2385a52563a
User & Date: drh 2008-07-06 00:21:35.000
Context
2008-07-07
11:18
Make the Pager.pAll linked-list doubly linked when ENABLE_MEMORY_MANAGEMENT is defined. This is used to speed up sqlite3_release_memory(). (CVS 5346) (check-in: 71d699de36 user: danielk1977 tags: trunk)
2008-07-06
00:21
Fail to build if the -ffast-math option is specified in GCC. Ticket #3202. (CVS 5345) (check-in: aa5be9ee93 user: drh tags: trunk)
2008-07-04
17:52
Fix a bug in btree.c that caused it to report a database as being corrupt if it used one of the last 6 slots in a freelist trunk page. Continue to never use those last 6 slots so that databases from newer versions are still readable with older versions. (CVS 5344) (check-in: b8ff6b0a3d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/util.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36



37
38
39
40
41
42
43
**
*************************************************************************
** Utility functions used throughout sqlite.
**
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.232 2008/06/13 18:24:27 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
#include <ctype.h>


/*
** Return true if the floating point value is Not a Number.
*/
int sqlite3IsNaN(double x){
  /* This NaN test sometimes fails if compiled on GCC with -ffast-math.
  ** On the other hand, the use of -ffast-math comes with the following
  ** warning:
  **
  **      This option [-ffast-math] should never be turned on by any
  **      -O option since it can result in incorrect output for programs
  **      which depend on an exact implementation of IEEE or ISO 
  **      rules/specifications for math functions.
  */



  volatile double y = x;
  return x!=y;
}

/*
** Set the most recent error code and error string for the sqlite
** handle "db". The error code is set to "err_code".







|



















>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
**
*************************************************************************
** Utility functions used throughout sqlite.
**
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.233 2008/07/06 00:21:35 drh Exp $
*/
#include "sqliteInt.h"
#include <stdarg.h>
#include <ctype.h>


/*
** Return true if the floating point value is Not a Number.
*/
int sqlite3IsNaN(double x){
  /* This NaN test sometimes fails if compiled on GCC with -ffast-math.
  ** On the other hand, the use of -ffast-math comes with the following
  ** warning:
  **
  **      This option [-ffast-math] should never be turned on by any
  **      -O option since it can result in incorrect output for programs
  **      which depend on an exact implementation of IEEE or ISO 
  **      rules/specifications for math functions.
  */
#ifdef __FAST_MATH__
# error SQLite will not work correctly with the -ffast-math option of GCC.
#endif
  volatile double y = x;
  return x!=y;
}

/*
** Set the most recent error code and error string for the sqlite
** handle "db". The error code is set to "err_code".