Menu

#379 Compilation error in math functions (C++)

v1.0 (example)
closed-fixed
nobody
None
5
2015-02-19
2014-02-01
maki
No

The following error occurs when using g++.


[mingw-w64 version]
trunk r6470

[test code - test.cpp]

#include <cmath>
int main ()
{
  float f; isnan(f);
  return 0;
}

[command line]
g++ test.cpp

[error log]

In file included from d:\dev\msys32\mingw\i686-w64-mingw32\include\c++\4.8.2\cmath:44:0,
                 from test.cpp:1:
test.cpp: In function 'int main()':
test.cpp:5:10: error: expected primary-expression before '__typeof__'
 float f; isnan(f);
          ^
test.cpp:5:10: error: expected primary-expression before 'double'
 float f; isnan(f);
          ^
test.cpp:5:10: error: '__builtin_types_compatible_p' was not declared in this scope
 float f; isnan(f);
          ^
test.cpp:5:10: error: expected primary-expression before '__typeof__'
 float f; isnan(f);
          ^
test.cpp:5:10: error: expected primary-expression before 'float'
 float f; isnan(f);
          ^
test.cpp:5:10: error: expected primary-expression before '__typeof__'
 float f; isnan(f);
          ^
test.cpp:5:10: error: expected primary-expression before 'long'
 float f; isnan(f);
          ^
test.cpp:5:10: error: '__builtin_choose_expr' was not declared in this scope
 float f; isnan(f);
          ^
test.cpp:5:10: error: '__builtin_choose_expr' was not declared in this scope
 float f; isnan(f);
          ^
test.cpp:5:10: error: redeclaration of '<typeprefixerror>__builtin_choose_expr'
test.cpp:5:10: note: previous declaration '<typeprefixerror>__builtin_choose_expr'
 float f; isnan(f);
          ^
test.cpp:5:10: error: '__builtin_choose_expr' was not declared in this scope
 float f; isnan(f);
          ^
test.cpp:5:10: error: redeclaration of '<typeprefixerror>__builtin_choose_expr'
test.cpp:5:10: note: previous declaration '<typeprefixerror>__builtin_choose_expr'
 float f; isnan(f);
          ^

This error was ocurred in configure script of llvm-3.4.
Please confirm attached files.

Thank you.

2 Attachments

Discussion

  • Kai Tietz

    Kai Tietz - 2014-02-10
    • status: open --> closed-fixed
     
  • Kai Tietz

    Kai Tietz - 2014-02-10

    Issue fixed on trunk at rev. 6476 & rev. 6477

     

Log in to post a comment.