[GRASS-dev] [GRASS GIS] #3331: ctypes: ValueError: invalid literal for int() with base 8: '08420217248550443400745280086994171'

GRASS GIS trac at osgeo.org
Thu Jun 15 22:47:37 PDT 2017


#3331: ctypes: ValueError: invalid literal for int() with base 8:
'08420217248550443400745280086994171'
--------------------------+---------------------------------
  Reporter:  neteler      |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.2.2
 Component:  Python       |    Version:  svn-releasebranch72
Resolution:               |   Keywords:  ctypes, python
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by neteler):

 Replying to [comment:17 glynn]:
 > Looking through pplexer.py shows that it specifically tries to handle
 literals with an "L" or "l" suffix, but there's nothing there for an
 "F64x" suffix.

 We were wondering here about the L suffix(es) but didn't realize that a
 "F64x" suffix could be an issue.

 ...

 > You can dump out gcc's built-in macro definitions with
 > {{{
 > gcc -E -dM -x c /dev/null | sort
 > }}}
 >
 > Does adding e.g. -std=c89 or -std=c99 eliminate the F64x literals?

 Apparently not, here the diffences (full outputs attached to the ticket):

 {{{
 # see attachments:
 [root at f1e5cbaaed18 /]# gcc -E -dM -x c /dev/null | sort >
 gcc7_flags_standard.txt
 [root at f1e5cbaaed18 /]# gcc -std=c89 -E -dM -x c /dev/null | sort >
 gcc7_flags_with_c89.txt
 [root at f1e5cbaaed18 /]# gcc -std=c99 -E -dM -x c /dev/null | sort >
 gcc7_flags_with_c99.txt

 # differences:
 [root at f1e5cbaaed18 /]# diff -u gcc7_flags_standard.txt
 gcc7_flags_with_c89.txt
 --- gcc7_flags_standard.txt     2017-06-16 05:35:10.481505202 +0000
 +++ gcc7_flags_with_c89.txt     2017-06-16 05:35:37.813790118 +0000
 @@ -161,10 +161,10 @@
  #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
  #define __GCC_IEC_559 2
  #define __GCC_IEC_559_COMPLEX 2
 +#define __GNUC_GNU_INLINE__ 1
  #define __GNUC_MINOR__ 1
  #define __GNUC_PATCHLEVEL__ 1
  #define __GNUC_RH_RELEASE__ 2
 -#define __GNUC_STDC_INLINE__ 1
  #define __GNUC__ 7
  #define __GXX_ABI_VERSION 1011
  #define __INT16_C(c) c
 @@ -278,10 +278,8 @@
  #define __STDC_IEC_559__ 1
  #define __STDC_ISO_10646__ 201605L
  #define __STDC_NO_THREADS__ 1
 -#define __STDC_UTF_16__ 1
 -#define __STDC_UTF_32__ 1
 -#define __STDC_VERSION__ 201112L
  #define __STDC__ 1
 +#define __STRICT_ANSI__ 1
  #define __UINT16_C(c) c
  #define __UINT16_MAX__ 0xffff
  #define __UINT16_TYPE__ short unsigned int
 @@ -339,5 +337,3 @@
  #define __unix__ 1
  #define __x86_64 1
  #define __x86_64__ 1
 -#define linux 1
 -#define unix 1

 [root at f1e5cbaaed18 /]# diff -u gcc7_flags_standard.txt
 gcc7_flags_with_c99.txt
 --- gcc7_flags_standard.txt     2017-06-16 05:35:10.481505202 +0000
 +++ gcc7_flags_with_c99.txt     2017-06-16 05:35:49.742914468 +0000
 @@ -278,10 +278,9 @@
  #define __STDC_IEC_559__ 1
  #define __STDC_ISO_10646__ 201605L
  #define __STDC_NO_THREADS__ 1
 -#define __STDC_UTF_16__ 1
 -#define __STDC_UTF_32__ 1
 -#define __STDC_VERSION__ 201112L
 +#define __STDC_VERSION__ 199901L
  #define __STDC__ 1
 +#define __STRICT_ANSI__ 1
  #define __UINT16_C(c) c
  #define __UINT16_MAX__ 0xffff
  #define __UINT16_TYPE__ short unsigned int
 @@ -339,5 +338,3 @@
  #define __unix__ 1
  #define __x86_64 1
  #define __x86_64__ 1
 -#define linux 1
 -#define unix 1

 [root at f1e5cbaaed18 /]# grep F64x gcc7_flags_*
 gcc7_flags_standard.txt:#define __FLT64X_DENORM_MIN__ 3
 .64519953188247460252840593361941982e-4951F64x
 gcc7_flags_standard.txt:#define __FLT64X_EPSILON__ 1
 .08420217248550443400745280086994171e-19F64x
 gcc7_flags_standard.txt:#define __FLT64X_MAX__
 1.18973149535723176502126385303097021e+4932F64x
 gcc7_flags_standard.txt:#define __FLT64X_MIN__ 3
 .36210314311209350626267781732175260e-4932F64x
 gcc7_flags_with_c89.txt:#define __FLT64X_DENORM_MIN__ 3
 .64519953188247460252840593361941982e-4951F64x
 gcc7_flags_with_c89.txt:#define __FLT64X_EPSILON__ 1
 .08420217248550443400745280086994171e-19F64x
 gcc7_flags_with_c89.txt:#define __FLT64X_MAX__
 1.18973149535723176502126385303097021e+4932F64x
 gcc7_flags_with_c89.txt:#define __FLT64X_MIN__ 3
 .36210314311209350626267781732175260e-4932F64x
 gcc7_flags_with_c99.txt:#define __FLT64X_DENORM_MIN__ 3
 .64519953188247460252840593361941982e-4951F64x
 gcc7_flags_with_c99.txt:#define __FLT64X_EPSILON__ 1
 .08420217248550443400745280086994171e-19F64x
 gcc7_flags_with_c99.txt:#define __FLT64X_MAX__
 1.18973149535723176502126385303097021e+4932F64x
 gcc7_flags_with_c99.txt:#define __FLT64X_MIN__ 3
 .36210314311209350626267781732175260e-4932F64x
 }}}


 > FWIW, F64x appears to derive from ISO/IEC TS 18661-3:2015.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3331#comment:19>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list