L
Lew Pitcher
In K&R C ("The C Programming Language", Appendix A, section 8.2 "Type
Specifiers"), the authors enumerate the uses of the "long" type specifier
thusly:
The words long, short, and unsigned may be thought of as adjectives; the
following combinations are acceptable.
short int
long int
unsigned int
long float
The meaning of the last is the same as double.
Does "long float" still mean "double" in ISO Standard C (any vintage)?
FWIW, both GCC v4.2.4 and v4.7.1 complain with the same sort of error when
presented with a long float:
error: both 'long' and 'float' in declaration specifiers
~/Code/clc $ cat lf.c
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
long float should_be_double;
should_be_double = 1.0;
return EXIT_SUCCESS;
}
~/Code/clc $ gcc -o lf lf.c
lf.c: In function 'main':
lf.c:5:8: error: both 'long' and 'float' in declaration specifiers
Specifiers"), the authors enumerate the uses of the "long" type specifier
thusly:
The words long, short, and unsigned may be thought of as adjectives; the
following combinations are acceptable.
short int
long int
unsigned int
long float
The meaning of the last is the same as double.
Does "long float" still mean "double" in ISO Standard C (any vintage)?
FWIW, both GCC v4.2.4 and v4.7.1 complain with the same sort of error when
presented with a long float:
error: both 'long' and 'float' in declaration specifiers
~/Code/clc $ cat lf.c
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
long float should_be_double;
should_be_double = 1.0;
return EXIT_SUCCESS;
}
~/Code/clc $ gcc -o lf lf.c
lf.c: In function 'main':
lf.c:5:8: error: both 'long' and 'float' in declaration specifiers