From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Check for redundancy Date: Fri, 3 Jul 2015 17:48:28 +0600 Message-ID: References: <87si9bl7k7.fsf@nl106-137-147.student.uu.se> <87mvzerv09.fsf@robertthorpeconsulting.com> <83y4ixzqsd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1435924148 26923 80.91.229.3 (3 Jul 2015 11:49:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Jul 2015 11:49:08 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 03 13:49:07 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZAzSs-0003oc-GT for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 13:49:06 +0200 Original-Received: from localhost ([::1]:40615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzSr-0001di-Si for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Jul 2015 07:49:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzSd-0001dC-47 for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:48:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAzSc-0000iC-6d for help-gnu-emacs@gnu.org; Fri, 03 Jul 2015 07:48:51 -0400 Original-Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]:33513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAzSa-0000hJ-Lg; Fri, 03 Jul 2015 07:48:48 -0400 Original-Received: by laar3 with SMTP id r3so82355292laa.0; Fri, 03 Jul 2015 04:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=dGo7UF16DKCoxLiYepZV5f3C+Gj4VQn+eIeQvlrjPKA=; b=GiqrGMu6JWHnRoilpY/94apnGSEmulN9HiFGd4Mbc2K5dK+Ak5tvbTBagSRhrMiZRT e+USlbrpvTXm1A5r9PGar9h1jmpu0+7Pblimh5tPghiLBuLkelg5FFknZinYLfsQaaMH auS3OMYC2m0iwdZnCAVpb/K+evM3yVr4woIdvge4j7pU7oSO1I2K1ZwkkigUt1VPowKu ZJvRxSjVvnbYTIVFpGXPuRvno5pAyVut+qDtMVuBKNaQW/kY38Tje4r9pRxGPp7sZHKy S9NewLCM18vUnBQ3+MNAFEvTlk5FO+mkiA2RZp70lJ09k9OnwoqjWv25jKj7ozCO05u/ ENMA== X-Received: by 10.112.147.201 with SMTP id tm9mr35505836lbb.40.1435924127714; Fri, 03 Jul 2015 04:48:47 -0700 (PDT) Original-Received: by 10.25.43.65 with HTTP; Fri, 3 Jul 2015 04:48:28 -0700 (PDT) In-Reply-To: <83y4ixzqsd.fsf@gnu.org> X-Google-Sender-Auth: lVL56LNqV4zlNECVQb-xcLKtEJo X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105385 Archived-At: On Fri, Jul 3, 2015 at 12:41 PM, Eli Zaretskii wrote: >> Nowadays (since =E2=89=882002?) the SDK defines a strict mode, where dif= ferent >> kinds of handles become pointers to different tag structure types: >> >> struct tagWND; // declared but not defined >> typedef struct tagWND* HWND; > > Perhaps in MSVC compiler, not in MinGW. With MinGW, something similar > happens only if you compile with -DSTRICT (which is rarely, if ever, > done). And even in MSVC headers I see something significantly > different from what you show above, and it's also conditioned by > STRICT being defined. Yes. -DSTRICT has been the default setting for new projects created in MSVC++ since version 7 or so. Is there some problem enabling STRICT on MinGW, or a reason why it is done rarely? How is it significantly different? Here=E2=80=99s what I see in some ancien= t copy: // in winnt.h #ifdef STRICT typedef void *HANDLE; #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name #else typedef PVOID HANDLE; #define DECLARE_HANDLE(name) typedef HANDLE name #endif // in windef.h DECLARE_HANDLE (HWND); DECLARE_HANDLE (HHOOK); OK, it=E2=80=99s not an undefined struct, it=E2=80=99s a struct with a uniq= ue type name and a single unused int field. This does not affect the type system, as neither C nor C++ have structural typing. Leaving the struct undefined would probably be a bit safer.