#201 Gcc preprocessor MinGW specific bug

Known_bugs
closed
gcc (462)
2002-10-08
2002-10-08
No

This file builds okay with gcc 3.2 on Linux, but does not
build with your compiler. Instead producing syntax
errors.

A version pre-processed using your compiler exhibits
the same fault when compiled under Linux. This
therefore leads us to suspect that your preprocessor is
at fault.

You can obtain the package the file came from at:
ftp://ftp.worldforge.org/pub/worldforge/libs/wfmath/wfmath
-0.2.9.tar.gz

If you require any further info pls feel free to mail me.

Command line:
$ c++ -DHAVE_CONFIG_H -I. -I. -I.. -I.. -O2 -Wall -
DWFMATH_DEPRECATE_OLD_INTERSECT -g -O2 -E
polygon.cpp -DDLL_EXPORT -DPIC -o polygon.lo

Error:
polygon.cpp:79: syntax error before `::' token
polygon.cpp:84: syntax error before `::' token
polygon.cpp:97: syntax error before `::' token
polygon.cpp:99: syntax error before `!=' token
polygon.cpp:107: syntax error before `::' token
polygon.cpp:114: parse error before `=' token
polygon.cpp:129: syntax error before `&' token
polygon.cpp:131: syntax error before `!=' token
polygon.cpp:138: syntax error before `&' token
polygon.cpp:140: syntax error before `!=' token

System Type:
MinGW 2.0.0
on WinXP with a P4 - 1800 and 512 mb ram

$ gcc --version
gcc.exe (GCC) 3.2 (mingw special 20020817-1)

Discussion

  • Martin Pollard

    Martin Pollard - 2002-10-08

    Logged In: YES
    user_id=59163

    Hmm this didn't attach properly

     
  • Martin Pollard

    Martin Pollard - 2002-10-08

    Logged In: YES
    user_id=59163

    Lets try attaching again.

     
  • Martin Pollard

    Martin Pollard - 2002-10-08

    Preprocessed version of the file causing the bug

     
  • Martin Pollard

    Martin Pollard - 2002-10-08

    Preprocessed version of the file causing the bug

     
  • Martin Pollard

    Martin Pollard - 2002-10-08

    Logged In: YES
    user_id=59163

    Lets try attaching again.

     
  • Danny Smith

    Danny Smith - 2002-10-08

    Logged In: YES
    user_id=11494

    This is not a preprocessor bug per se, but a mingw-
    specific bug in libstc++ implementation.

    The problem is pollution of namespace by windows
    identifiers, included from C++ thread support header .
    In your case Polygon clashes with the function Polygon
    declared in winuser.h. (line 5101 in polygon.ii

    Try building with -D__GTHREAD_HIDE_WIN32API.
    This will be default in future releases

    Danny

     
  • Danny Smith

    Danny Smith - 2002-10-08
    • milestone: --> Known_bugs
    • status: open --> closed
     

Log in to post a comment.