bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: limits.h and LONG_LONG macros


From: Andreas Jaeger
Subject: Re: limits.h and LONG_LONG macros
Date: Wed, 25 Jul 2001 09:47:51 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.1 (Cuyahoga Valley)

address@hidden writes:

> 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
gcc -D_GNU_SOURCE works:

gee:~/tmp:[0]$ gcc -Wall limits.c -D_GNU_SOURCE 
limits.c: In function `main':
limits.c:12: warning: control reaches end of non-void function
gee:~/tmp:[0]$ gcc -Wall limits.c    
limits.c: In function `main':
limits.c:7: `LONG_LONG_MIN' undeclared (first use in this function)
limits.c:7: (Each undeclared identifier is reported only once
limits.c:7: for each function it appears in.)
limits.c:8: `LONG_LONG_MAX' undeclared (first use in this function)
limits.c:11: `ULONG_LONG_MAX' undeclared (first use in this function)
limits.c:12: warning: control reaches end of non-void function

SuSE 7.2, glibc 2.2.2, gcc 2.95.3

Read the glibc manual about feature test macros,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden
    http://www.suse.de/~aj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]