This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: src/winsup/cygwin ChangeLog Makefile.in autolo ...
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Sat, 23 Apr 2011 15:17:42 +0200
- Subject: Re: src/winsup/cygwin ChangeLog Makefile.in autolo ...
- References: <20110419100207.5415.qmail@sourceware.org> <1303501798.2364.2.camel@YAAKOV04> <4DB2B131.2030607@cs.utoronto.ca>
- Reply-to: cygwin-developers at cygwin dot com
On Apr 23 07:00, Ryan Johnson wrote:
> On 22/04/2011 3:49 PM, Yaakov (Cygwin/X) wrote:
> >>CVSROOT: /cvs/src
> >>Module name: src
> >>Changes by: corinna@... 2011-04-19 10:02:07
> >>
> >> * registry.cc (reg_key): Rewrite reg_key class to use native NT registry
> >> functions. Use WCHAR string parameters throughout. Use PCWSTR rather
> >> than const WCHAR. Drop multibyte char functionality. Drop unused
> >> methods.
> >This change introduced a compiler warning with GCC 4.5:
> >
> >cc1plus: warnings being treated as errors
> >registry.cc: In member function âint reg_key::get_int(const WCHAR*,
> >int)â:
> >registry.cc:145:32: error: dereferencing type-punned pointer will break
> >strict-aliasing rules
> For the benefit of folks reading the archives later:
>
> *(DWORD*) is asking for trouble, and technically, even the cast from
> alloca's void* breaks C++ strict aliasing rules.
Did I ever mention how much I loath the strict aliasing rule stuff?
When I cast something, I cast something. The compiler should accept
that I (think I) know what I'm doing.
I shut up the compiler warning in CVS.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat