Henrik Bach
2004-Jul-15 22:26 UTC
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
>From: Chris Lattner <sabre at nondot.org> >Date: Wed, 14 Jul 2004 14:49:01 -0500 (CDT)> >There is currently support for building in non-cygwin windows environments >protected by _MSC_VER. You just need to broaden the scope of the #ifndef >to include internix. >Sorry Chris, but my DataTypes.h.in seems to be outdated (due to I'm porting LLVM 1.2), so I'm not at the moment able to edit the file. Anyway, at this moment, I don't know how to hack it, before I know more about autoconf. I'll edit later when 1.3 is released. Hi I've found that the min and max values for integral data types, for Interix 3.5 (gcc automatic macro is __INTERIX), are defined in the system header file: '/usr/include/limits.h': --- /usr/include/limits.h --------------------- ... #define SCHAR_MIN (-128) /* min value for a signed char */ #define SCHAR_MAX 127 /* max value for a signed char */ #define UCHAR_MAX 0xff /* max value for a unsigned char */ #if defined(_CHAR_UNSIGNED) || defined(__CHAR_UNSIGNED__) #define CHAR_MIN 0 #define CHAR_MAX UCHAR_MAX #else #define CHAR_MIN SCHAR_MIN /* mim value for a char */ #define CHAR_MAX SCHAR_MAX /* max value for a char */ #endif /* _CHAR_UNSIGNED */ #define SHRT_MIN (-32768) /* min value for (signed) short */ #define SHRT_MAX 32767 /* max value for (signed) short */ #define USHRT_MAX 0xffff /* max value for unsigned short */ #define INT_MIN (-2147483647-1) /* min value for (signed) int */ #define INT_MAX 2147483647 /* max value for (signed) int */ #define UINT_MAX 0xffffffff /* max value for unsigned int */ #define LONG_MIN (-2147483647L-1) /* minimum (signed) long */ #define LONG_MAX 2147483647L /* maximum (signed) long */ #define ULONG_MAX 0xffffffffUL /* maximum unsigned long */ #if defined(_ALL_SOURCE) \ || (__STDC__ - 0 == 0) && !defined(_POSIX_C_SOURCE) \ && !defined(_XOPEN_SOURCE) /* * Minimum and maximum values for 64-bit types * Define all the various well-known flavors of symbols * */ #define ULLONG_MAX ((u_quad_t)0-1) /* 0xffffffffffffffff */ #define LLONG_MAX ((quad_t)(ULLONG_MAX>>1)) /* 0x7fffffffffffffff */ #define LLONG_MIN ((quad_t)((-LLONG_MAX)-1)) /* 0x8000000000000000 */ #define LONG_LONG_MIN LLONG_MIN #define LONG_LONG_MAX LLONG_MAX #define ULONG_LONG_MAX ULLONG_MAX #define QUAD_MIN LLONG_MIN #define QUAD_MAX LLONG_MAX #define UQUAD_MAX ULLONG_MAX ... --- /usr/include/limits.h --------------------- Which defintions do you think encompasses LLVMs expectations?: INT8_MAX - SCHAR_MAX //signed INT8_MIN - SCHAR_MIN //signed INT16_MAX - SHRT_MAX //signed INT16_MIN - SHRT_MIN //signed INT32_MAX - LONG_MAX //signed INT32_MIN - LONG_MIN //signed ... UINT8_MAX - CHAR_MIN //unsigned - #define _CHAR_UNSIGNED || __CHAR_UNSIGNED__ UINT8_MIN - (implicitly 0?) UINT16_MAX - USHRT_MAX //unsigned UINT16_MIN - (implicitly 0?) UINT32_MAX - ULONG_MAX //unsigned UINT32_MIN - (implicitly 0?) /Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger
Reid Spencer
2004-Jul-15 22:33 UTC
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (firstuse this function)
On Thu, 15 Jul 2004 17:43:27 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote:> Sorry! LLVM 1.3 will probably be out in a few weeks...Speaking of which, what are your intentions for 1.3? Are you waiting on CPR? Anything else? We're starting to get some traction with more developers and I think doing a release sooner rather than later might be worth it for all parties involved. Reid
Chris Lattner
2004-Jul-15 22:43 UTC
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
On Fri, 16 Jul 2004, Henrik Bach wrote:> >There is currently support for building in non-cygwin windows environments > >protected by _MSC_VER. You just need to broaden the scope of the #ifndef > >to include internix. > > > > Sorry Chris, but my DataTypes.h.in seems to be outdated (due to I'm porting > LLVM 1.2), so I'm not at the moment able to edit the file. Anyway, at this > moment, I don't know how to hack it, before I know more about autoconf. I'll > edit later when 1.3 is released.Ah, suddenly everything makes sense. If you're interested in LLVM on the windows platform, *please* get CVS. Since 1.2, there has been a lot of work to make it work under cygwin and even mustly under the mingw environments. I suspect that your life will be a lot simpler. If you do that and this doesn't automatically work, then I'll add support for __INTERNIX. In any case, patches relative to LLVM 1.2 aren't very useful. Sorry! LLVM 1.3 will probably be out in a few weeks... -Chris> I've found that the min and max values for integral data types, for Interix > 3.5 (gcc automatic macro is __INTERIX), are defined in the system header > file: '/usr/include/limits.h': > > --- /usr/include/limits.h --------------------- > ... > #define SCHAR_MIN (-128) /* min value for a signed char */ > #define SCHAR_MAX 127 /* max value for a signed char */ > #define UCHAR_MAX 0xff /* max value for a unsigned char */ > > #if defined(_CHAR_UNSIGNED) || defined(__CHAR_UNSIGNED__) > #define CHAR_MIN 0 > #define CHAR_MAX UCHAR_MAX > #else > #define CHAR_MIN SCHAR_MIN /* mim value for a char */ > #define CHAR_MAX SCHAR_MAX /* max value for a char */ > #endif /* _CHAR_UNSIGNED */ > > > #define SHRT_MIN (-32768) /* min value for (signed) short */ > #define SHRT_MAX 32767 /* max value for (signed) short */ > #define USHRT_MAX 0xffff /* max value for unsigned short */ > > #define INT_MIN (-2147483647-1) /* min value for (signed) int */ > #define INT_MAX 2147483647 /* max value for (signed) int */ > #define UINT_MAX 0xffffffff /* max value for unsigned int */ > > #define LONG_MIN (-2147483647L-1) /* minimum (signed) long */ > #define LONG_MAX 2147483647L /* maximum (signed) long */ > #define ULONG_MAX 0xffffffffUL /* maximum unsigned long */ > > #if defined(_ALL_SOURCE) \ > || (__STDC__ - 0 == 0) && !defined(_POSIX_C_SOURCE) \ > && !defined(_XOPEN_SOURCE) > /* > * Minimum and maximum values for 64-bit types > * Define all the various well-known flavors of symbols > * > */ > #define ULLONG_MAX ((u_quad_t)0-1) /* 0xffffffffffffffff */ > #define LLONG_MAX ((quad_t)(ULLONG_MAX>>1)) /* 0x7fffffffffffffff */ > #define LLONG_MIN ((quad_t)((-LLONG_MAX)-1)) /* 0x8000000000000000 */ > > > #define LONG_LONG_MIN LLONG_MIN > #define LONG_LONG_MAX LLONG_MAX > #define ULONG_LONG_MAX ULLONG_MAX > > > #define QUAD_MIN LLONG_MIN > #define QUAD_MAX LLONG_MAX > #define UQUAD_MAX ULLONG_MAX > ... > --- /usr/include/limits.h --------------------- > > Which defintions do you think encompasses LLVMs expectations?: > > INT8_MAX - SCHAR_MAX //signed > INT8_MIN - SCHAR_MIN //signed > INT16_MAX - SHRT_MAX //signed > INT16_MIN - SHRT_MIN //signed > INT32_MAX - LONG_MAX //signed > INT32_MIN - LONG_MIN //signed > ... > UINT8_MAX - CHAR_MIN //unsigned - #define _CHAR_UNSIGNED || > __CHAR_UNSIGNED__ > UINT8_MIN - (implicitly 0?) > UINT16_MAX - USHRT_MAX //unsigned > UINT16_MIN - (implicitly 0?) > UINT32_MAX - ULONG_MAX //unsigned > UINT32_MIN - (implicitly 0?) > > > /Henrik > > _________________________________________________________________ > F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://llvm.cs.uiuc.edu/ http://nondot.org/sabre/
Maybe Matching Threads
- [LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
- [LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared(firstuse this function)
- [LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (firstuse this function)
- [LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (firstuse this function)
- [LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (firstuse this function)