X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org X-Spam-Score: -63.653 Message-ID: <490AD8D0.9030200@sh.cvut.cz> Date: Fri, 31 Oct 2008 11:07:12 +0100 From: =?windows-1252?Q?V=E1clav_Haisman?= User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin g++ strictness References: <000201c93ac7$38265930$4001a8c0 AT mycomputer> <490A30C8 DOT 5000107 AT sh DOT cvut DOT cz> <001601c93b31$a961b940$4001a8c0 AT mycomputer> In-Reply-To: <001601c93b31$a961b940$4001a8c0@mycomputer> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----BEGIN PGP SIGNED MESSAGE----- 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 AT fiona)[1010] /cygdrive/c/wilx $ cat pebkac.cxx #include using namespace std; typedef int gint; typedef int int32; void foo (gint x) { cout << x; } int main () { int32 x = 2; foo (x); } (vhaisman AT fiona)[1011] /cygdrive/c/wilx $ g++ -Wall -Wextra -ansi -pedantic -o pebkac pebkac.cxx (vhaisman AT 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. - -- wilx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iFYEAREIAAYFAkkK2M8ACgkQhQBMvHf/WHktsQDfUCmfLwof8JgmiBUCjnAhxVlB 1UeClAO5B70OcADgx8k5fi00xozHySX/fSdcXwCwLmPRKNET3y7gDA== =HrNG -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/