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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=emn9fF7mYoiHo6UW 1YMinHZm0lTtp9Pu/DcasPza4VNHIEfsUVdcm/UOhyoLsS6RC8zfmx3fQ27Er6AA F4BMua20icqagnxQlKzs8HX3imWK2ozbj93m0QVDcE345/JZUp7uq5aXwur/Xri6 6DORpRcEdBHo3D9O45YN8+Ggu+k= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=57KK6XzWMHksFtqHaCUT4L tVHzk=; b=UvqE1Lt/9kpM9MfLia922Cr/Rv97x++BN4lxJ6ExeDR4Dk+VjPIVcX VFtUeMkLi6ExJzAhfVyuDdREUIcUCfDo2VUgTETxEM+yz6zNKT5MByIIAUYsdODD ByAes4mU3e3foLvRoKWKTlooMYRPvApm6fibPHWZnABPOVa0TmISQ= 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 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1389 X-HELO: smtp-out-no.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: g++ doesn't diagnose implicit int error To: cygwin AT cygwin DOT com References: <87imtcnik5 DOT fsf AT Rainer DOT invalid> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Tue, 11 Jun 2019 12:35:15 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <87imtcnik5.fsf@Rainer.invalid> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 2019-06-11 11:22, Achim Gratz wrote: > Keith Thompson writes: >> 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. > > In the case of Cygwin it is quite certainly a bug as Cygwin is not a > Windows target. Seems like ms-extensions is enabled if the target is x86 with MS ABI, or plan9-extensions is enabled. The former allows use of struct/union member names the same as typedef names, and the latter allows passing pointers to structs/unions and typedefs with anonymous fields, and referring to anonymous fields declared using typedefs. Cygwin may require these extensions to handle Windows structure definitions in a Windows compatible way, to allow compilation of the Windows C and C++ modules under winsup. That it enables C++ implicit int is unfortunate. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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