delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/11/03:49:18

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-type; q=dns; s=default; b=v6Yn
Pu/R99av6XFM5r9jiK0UzfRXzNbYQyJhg+AVxEJxeAsMDGzl1dMLbESUnAXpdA6c
6rIReXMtjW93XGvcVcT4TKM0RHN2AcKzgckSjw3QZUL7o+5cupsS1eROiBxMUr6e
0Ikf7KnbxychZMX70vq3nOY8xubBYglVjY8CJVw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-type; s=default; bh=SH9mratq+3
80KlGTyZT8xfZu8CI=; b=wAECimkvJJHjSEp58U8bR1co2qD/ZzaQmhYR7jt9XA
PW34+eh8X2AwKsOBHidMVRABitGNJL/cqYOKifZRexfOYZk41IhYflSC5C2mc9rW
ugJH9KIyqFmUAxeqdOfZVHhWav/2HHxRsj7uOohtqDiNdFMoV2FRWG7VDOidsnO1
I=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:M, mm, HX-Languages-Length:973
X-HELO: mail-ed1-f46.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WwTG4Ucuy7SGFZBGdEKFO1254/F3EmWkqqAJdlIWzM0=; b=IXgSlHDJgDlcUBZRj5WFZbOFODu9tBV4todUl7iXpcdbvd4ZWp/Yzw8bDbiMutCD0F GoBBvx2YDj7TRos1eVErY0ZiyLb6k7CvadzfezmnAQYhO0RjzvN1GIC+Qj521GOOZm5w 8XKWZ/X3JGXkQmZrUuQJUJYrpybKXyfi5Pe78ZYpu669b8l7nZZFMYS/39PrUa4pFAJq tAS7A4luNcQlDg+iEKo+h+TJqWtImMo5oi5ca4/QPPZSfJXWawbgIbHbjpGAK0jXPg2f avualicZ/pr1/mkFLrAgRRoEVvhY9//vzSwexONPpCXcztU7g/3N+DgdKdJzpv4Vkuc+ vhHg==
MIME-Version: 1.0
References: <CAAHpriO62Lhm9-eGrmA17gFZNFGLEeUrAmeKE+yNvhvBjFgRAA AT mail DOT gmail DOT com>
In-Reply-To: <CAAHpriO62Lhm9-eGrmA17gFZNFGLEeUrAmeKE+yNvhvBjFgRAA@mail.gmail.com>
From: Keith Thompson <Keith DOT S DOT Thompson AT gmail DOT com>
Date: Tue, 11 Jun 2019 00:48:10 -0700
Message-ID: <CAAHpriNaC5YMpuBkNuf92ABTZUAxJ6xi8pQo3kxuxNgqSywPFA@mail.gmail.com>
Subject: Re: g++ doesn't diagnose implicit int error
To: cygwin AT cygwin DOT com
Cc: Keith Thompson <Keith DOT S DOT Thompson AT gmail DOT com>

I believe this answer by user "M.M" on Stack Overflow explains the issue:
https://stackoverflow.com/a/56537459/827263

On Windows targets (including Cygwin and MinGW), the "-fms-extensions"
option is enabled by default.  This option enables certain Microsoft
extensions -- and apparently inhibits any diagnostics for implicit int.

It is unfortunate, and arguably a bug, that this means that
"g++ -std=c++11 -pedantic" fails to diagnose implicit int errors.
I'm not sure whether this is a bug in gcc or in the way Windows
versions of gcc are built.

Meanwhile, this can be worked around by using "g++ -fno-ms-extensions ...".
This which might cause problems when compiling some Windows headers,
but M.M reports being able to compile some large Windows projects
this way without running into problems.

There's also a "-fms-extensions" option for C, but gcc warns about
implicit int declarations in C with or without that option.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019