[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
limits.h and LONG_LONG macros
From: |
martin |
Subject: |
limits.h and LONG_LONG macros |
Date: |
Wed, 25 Jul 2001 00:47:15 +0200 |
The following program doesn't compile (the other macros work).
#include <stdio.h>
#include <limits.h>
int main ()
{
/* Minimum and maximum values a `signed long long int' can hold. */
printf ("LONG_LONG_MIN (-LONG_LONG_MAX-1) = %Ld\n", LONG_LONG_MIN);
printf ("LONG_LONG_MAX __LONG_LONG_MAX__ = %Ld\n", LONG_LONG_MAX);
/* Maximum value an `unsigned long long int' can hold. (Minimum is 0). */
printf ("ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1) = %Lu\n", ULONG_LONG_MAX);
}
gcc lim.c
lim.c: In function `main':
lim.c:7: `LONG_LONG_MIN' undeclared (first use this function)
lim.c:7: (Each undeclared identifier is reported only once
lim.c:7: for each function it appears in.)
lim.c:8: `LONG_LONG_MAX' undeclared (first use this function)
lim.c:11: `ULONG_LONG_MAX' undeclared (first use this function)
Tested gcc versions (Linux), all give the same result:
gcc --version
2.7.2.3 (Red Hat)
gcc --version
2.95.2 (SuSE)
gcc --version
2.96 (Red Hat)
--
****************************************************************
E-mail: address@hidden
Web: http://pvhwsdte.ped.hisingensvux.educ.goteborg.se/martinf/
****************************************************************
- limits.h and LONG_LONG macros,
martin <=