From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32622 invoked by alias); 11 Jun 2019 07:48:28 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 32606 invoked by uid 89); 11 Jun 2019 07:48:28 -0000 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 Received: from mail-ed1-f46.google.com (HELO mail-ed1-f46.google.com) (209.85.208.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Jun 2019 07:48:26 +0000 Received: by mail-ed1-f46.google.com with SMTP id p15so18556833eds.8 for ; Tue, 11 Jun 2019 00:48:26 -0700 (PDT) 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: In-Reply-To: From: Keith Thompson Date: Tue, 11 Jun 2019 07:48:00 -0000 Message-ID: Subject: Re: g++ doesn't diagnose implicit int error To: cygwin@cygwin.com Cc: Keith Thompson Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2019-06/txt/msg00121.txt.bz2 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