www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
X-Trace: | 97143456/mk-filter-4.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/79.66.2.206/None/johne53 AT tiscali DOT co DOT uk |
X-SBRS: | None |
X-RemoteIP: | 79.66.2.206 |
X-IP-MAIL-FROM: | johne53 AT tiscali DOT co DOT uk |
X-MUA: | Microsoft Outlook Express 6.00.2900.2180Produced By Microsoft MimeOLE V6.00.2900.2180 |
X-IP-BHB: | Once |
X-IronPort-Anti-Spam-Filtered: | true |
X-IronPort-Anti-Spam-Result: | AqwEAOt4CklPQgLO/2dsb2JhbACEG1XIPINR |
X-IronPort-AV: | E=Sophos;i="4.33,521,1220223600"; d="scan'208";a="97143456" |
Message-ID: | <003e01c93b42$e92a17a0$4001a8c0@mycomputer> |
From: | "John Emmas" <johne53 AT tiscali DOT co DOT uk> |
To: | <cygwin AT cygwin DOT com> |
References: | <000201c93ac7$38265930$4001a8c0 AT mycomputer> <490A30C8 DOT 5000107 AT sh DOT cvut DOT cz> <001601c93b31$a961b940$4001a8c0 AT mycomputer> |
Subject: | Re: cygwin g++ strictness |
Date: | Fri, 31 Oct 2008 10:24:51 -0000 |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Outlook Express 6.00.2900.2180 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
----- Original Message ----- From: "John Emmas" Sent: 31 October 2008 08:21 Subject: Re: cygwin g++ strictness > > adding the compiler flag -fpermissive seems to have solved the problem. > ----- Original Message ----- From: "Václav Haisman" Sent: 31 October 2008 10:07 Subject: Re: cygwin g++ strictness > > It just works. You are doing something wrong. There is nothing wrong > with GCC 3.4 in this respect. > It seems like I spoke to soon..... -fpermissive seems to have helped in some cases but not in every case. I'll give an example. Please can someone tell me if I'm misunderstanding something here. Consider the following function prototype (where 'gint' is typedef'd as an int in gtypes.h):- #include <gtypes.h> int AddTwoInts (gint& a, gint& b); This code compiles under both Linux/gcc4.4 and also under Cygwin:- gint x = 4; gint y = 5; int z = AddTwoInts (x, y); This code compiles under Linux/gcc4.4 but not under Cygwin:- #include <sys/types.h> // typedefs int32_t as int int32_t x = 4; int32_t y = 5; int z = AddTwoInts (x, y); The last example produces this error on my system:- error: no matching function for call to `AddTwoInts(int32_t&, int32_t&)' note: candidates are: int AddTwoInts(gint&, gint&) :: === Build finished: 2 errors, 0 warnings === Here's the compiler's command line:- gcc.exe -Wall -DXTHREADS -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -mwindows -g -IC:/cygwin/include -IC:/cygwin/usr/include/gtk-2.0 -IC:/cygwin/usr/include/glib-2.0 -IC:/cygwin/usr/include/pango-1.0 -IC:/cygwin/lib/glib-2.0/include -IC:/cygwin/lib/gtk-2.0/include -IC:/cygwin/usr/include/atk-1.0 -IC:/cygwin/usr/include/cairo -IC:/cygwin/usr/include/libgnomecanvas-2.0 -IF:/GTK/HelloWorld -c F:/GTK/HelloWorld/Test.c -o obj/Debug/Test.o This is an example where adding -fpermissive doesn't help (in fact, I don't even think it's relevant for plain old 'C'). So can anyone see what I'm doing wrong? Thanks, John -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |