cygwin g++ strictness

Václav Haisman
Fri Oct 31 10:25:00 GMT 2008

Hash: SHA256

John Emmas wrote:
> ----- Original Message ----- From: "Larry Hall (Cygwin)"
> Sent: 30 October 2008 22:23
> Subject: Re: cygwin g++ strictness
>> This is gcc/g++ question, not a Cygwin one.  Please find an appropriate
>> forum to ask this question if you can't find it in the available
>> documentation.
> ----- Original Message ----- From: "Vaclav Haisman"
> Sent: 30 October 2008 22:10
> Subject: Re: cygwin g++ strictness
>> I think the problem is between keyboard and chair. GCC, no matter how
>> ancient version, just does not do that.
> Regardless of your ascerbic comments, adding the compiler flag -fpermissive
> seems to have solved the problem.   Cygwin's version of gcc seems to be 3.4
> on my system whereas my Linux box is running 4.4.  Maybe this is something
> that got relaxed between the two of them?  Whatever the explanation, the
> exact same code compiles fine under Linux/gcc4.4 without needing that flag.
> Maybe it wouldn't have done under Linux/gcc3.4?
> John

Watch this:

(vhaisman@fiona)[1010] /cygdrive/c/wilx
$ cat pebkac.cxx
#include <iostream>

using namespace std;

typedef int gint;
typedef int int32;
void foo (gint x)
  cout << x;

int main ()
  int32 x = 2;
  foo (x);

(vhaisman@fiona)[1011] /cygdrive/c/wilx
$ g++ -Wall -Wextra -ansi -pedantic -o pebkac pebkac.cxx

(vhaisman@fiona)[1012] /cygdrive/c/wilx
$ g++ -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with:
/usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose
- --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
- --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
- --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
- --without-included-gettext --enable-version-specific-runtime-libs
- --without-x --enable-libgcj --disable-java-awt --with-system-zlib
- --enable-interpreter --disable-libgcj-debug --enable-threads=posix
- --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions
- --enable-hash-synchronization --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)

It just works. You are doing something wrong. There is nothing wrong
with GCC 3.4 in this respect.

- --
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list