This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fwd: bug in limits.h]


Hi all!
I'm student at computer science university of Milan, in Italy.
Firstly, big thanx for your patient work on all GNU sw,
that's rocks.
Secondly ;), I tell you that I've found a bug in "limits.h"
of mingw -- gcc 2.95: I don't know if this is the right
place to post this bugs announce, but the mail of the maintainer
seems to not exists anymore.

on line 83 of this file there is
#define USHRT_MAX       ((unsigned short)  2U * SHRT_MAX + 1)

that's an error (i think).
So bug free ANSI C code like this :) cannot  be compiled:

#include <stdio.h>
#include <limits.h>

#if (USHRT_MAX < 1)
#define EHI SEEMSTOWORK
#endif

int main (){
printf("hello, corrected limits.h!!", USHRT_MAX);
return 1;
}

I hope that you can fix this problem.
I've already fixed this on my machine and all seems to run fine.

Hope this help.
Thanks for your attention -- bye,
Lonewolf.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]