| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-Spam-Check-By: | sourceware.org |
| X-Trace: | 81201218/mk-filter-1.mail.uk.tiscali.com/B2C/$b2c-THROTTLED-DYNAMIC/b2c-CUSTOMER-DYNAMIC-IP/79.74.17.85/None/johne53 AT tiscali DOT co DOT uk |
| X-SBRS: | None |
| X-RemoteIP: | 79.74.17.85 |
| X-IP-MAIL-FROM: | johne53 AT tiscali DOT co DOT uk |
| X-IP-BHB: | Once |
| X-IronPort-Anti-Spam-Filtered: | true |
| X-IronPort-Anti-Spam-Result: | AroEAB4e10hPShFV/2dsb2JhbACDf0+wfIFm |
| X-IronPort-AV: | E=Sophos;i="4.32,446,1217804400"; d="scan'208";a="81201218" |
| Message-ID: | <006801c91cae$8f89f4c0$4001a8c0@mycomputer> |
| From: | "John Emmas" <johne53 AT tiscali DOT co DOT uk> |
| To: | <cygwin AT cygwin DOT com> |
| References: | <002e01c91c9b$30fb6460$4001a8c0 AT mycomputer> |
| Subject: | Re: g_assertions |
| Date: | Mon, 22 Sep 2008 12:27:21 -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 |
Here's a simple example that fails to compile:-
#include <glib.h>
void my_func ()
{
int x = 3;
g_assert (x);
}
Can anyone reproduce this problem? Or am I missing something obvious?
Thanks,
John
----- Original Message -----
From: "John Emmas"
Sent: 22 September 2008 10:08
Subject: g_assertions
> Hi - I hope this is an appropriate place to ask this question. I'm just
> starting to use Cygwin. Firstly, the Cygwin web site says that the
> current
> version is 1.5.25-15 but my install log says that it installed 2.573.2.3
> so
> I'm a bit confused about that. Anyway, apart from that, the installation
> seemed to succeed and I've been using Cygwin, off & on, for a few weeks.
>
> I'm now starting to compile a project using glibmm. Inside glib.h there
> are
> some assertions, defined something like this:-
>
> #define g_assert(expr) G_STMT_START{ \
> if (!(expr)) \
> g_log (G_LOG_DOMAIN, \
> G_LOG_LEVEL_ERROR, \
> "file %s: line %d: assertion failed: (%s)", \
> __FILE__, \
> __LINE__, \
> #expr); }G_STMT_END
>
> These compile perfectly with my gcc compiler but when I try to use them
> with
> Cygwin I get this error:-
>
> error: stray '\' in program
>
> It's pretty obvious why this is happening - but terminating a line with
> '\'
> is valid code. Has anyone else experienced this problem? I can eliminate
> it by #defining G_DISABLE_ASSERT - but then I'll lose the assertion
> checks, which I'd really like to keep. Is there something else I could do
> to prevent this error?
>
> 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 |