delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
Message-ID: | <f0e60a71050512125316987aa3@mail.gmail.com> |
Date: | Thu, 12 May 2005 14:53:18 -0500 |
From: | Raz <coolmandan AT gmail DOT com> |
Reply-To: | Raz <coolmandan AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Warnings for converting non-pointer types to NULL |
In-Reply-To: | <d5vqlp$k4$1@sea.gmane.org> |
Mime-Version: | 1.0 |
References: | <d5vqlp$k4$1 AT sea DOT gmane DOT org> |
X-IsSubscribed: | yes |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id j4CJrRuG009095 |
On 5/12/05, Mikael <mindcooler AT gmail DOT com> wrote: > I guess presume NULL is a macro evaulting to 0 in windows.h and a typedef > for (void *)0 in <cstddef>, or? No. Not in <cstddef>. Since you are using that header file, I assume you are using C++. In C++, NULL is 0, not (void *)0 as it is in C. > > Since I want to have this warning, the approach I've taken is to always > include <cstddef> after <windows.h>. Is approach correct and safe or can it > get me in trouble? Since marcos cannot be "overloaded" or "overridden", the <cstddef> marcos would take precedence over conflicting <windows.h> marcos as long as <cstddef> is included first. However, this should not make a different since, again assuming you are using C++, both marcos should be defined to the same value. > > Thanks for any replies > > / M > > -- > 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/ > > -- ------------------------------------------- Dan Day http://razzerblog.blogspot.com -- 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 |