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

Bug#247112: long long double should be rejected



Package: g++
Version: 3.3.3-2
Severity: normal

 $ g++ -Wall prog.cpp

 prog.cpp is as follows:

----

#include <iostream>

using namespace std;

int main()
{
    cout << "float: "            << sizeof(float)            << '\n';
    cout << "double: "           << sizeof(double)           << '\n';
    cout << "long double: "      << sizeof(long double)      << '\n';
    cout << "long long double: " << sizeof(long long double) << '\n';

    return (0);
}

----

 Output is:

----

float: 4
double: 8
long double: 12
long long double: 8

----

 There is no "long long double"; the compiler should reject the
code. g++ apparently misparses this as "long long". The bug is still
present in the new parser.
 (comment from debian-gcc@lists.debian.org, Falk Hueffner)

----

 Running on a intel P4, debian unstable.
 g++ --version is as follows:

 g++ (GCC) 3.3.3 (Debian 20040401)



Reply to: