[tree-ssa] libmudflap/mf-hooks.c breaks bootstrap

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Tue May 20 10:12:00 GMT 2003


In libmudflap/mf-hooks.c we have:

  /* To avoid dynamic memory allocation, use static array.
     This should be defined in <limits.h>.  */
  #ifndef PTHREAD_THREADS_MAX
  #define PTHREAD_THREADS_MAX 1000
  #endif

  static struct pthread_info __mf_pthread_info[PTHREAD_THREADS_MAX];

This looks harmless, but it isn't, due to the following in
/usr/include/pthread.h on FreeBSD -STABLE:

  #define PTHREAD_THREADS_MAX ULONG_MAX

which leads to

  .../libmudflap/mf-hooks.c:933: error: size of array `__mf_pthread_info'
                                        is too large

Gerald
-- 
Gerald "Jerry"   pfeifer@dbai.tuwien.ac.at   http://www.pfeifer.com/gerald/



More information about the Gcc mailing list