#include nested too deeply

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

#include nested too deeply

1,272 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rkiryanov on Fri Feb 05 06:05:22 MST 2010
#include <limits.h>
#include <stddef.h>

int main(void)
{
    return 0;
}
0 Kudos
Reply
2 Replies

1,148 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rkiryanov on Fri Feb 05 08:05:01 MST 2010
#include <stddef.h>
#include <limits.h>
unsigned const Q = CHAR_BIT;


error: 'CHAR_BIT' was not declared in this scope
0 Kudos
Reply

1,148 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri Feb 05 07:32:53 MST 2010
Hi

Thanks for reporting this. This will be fixed in the next version of lpcxpresso

In the meantime, you can fix this by replacing the contents of
C:\nxp\lpcxpresso_3.2\Tools\lib\gcc\arm-none-eabi\4.3.3\include-fixed\limits.h

with:
#if defined(__REDLIB__)
#  include_next <limits.h>
#else
#  include_next <include-fixed/newlib/limits.h>
#  if !defined(__NEWLIB__) && !defined(__LIBRARY_WARNING_MESSAGE__)
#    warning "Either __NEWLIB__ or __REDLIB__ should be defined when using the C library. Defaulting to __NEWLIB__"
#    define __LIBRARY_WARNING_MESSAGE__
#   endif
#endif
0 Kudos
Reply