public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18447] New: memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing
@ 2015-05-22  7:26 darlingm at gmail dot com
  2015-05-22  7:34 ` [Bug libc/18447] " darlingm at gmail dot com
  2015-05-22 10:24 ` schwab@linux-m68k.org
  0 siblings, 2 replies; 3+ messages in thread
From: darlingm at gmail dot com @ 2015-05-22  7:26 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18447

            Bug ID: 18447
           Summary: memstream.c:92 dereferencing type-punned pointer
                    -Werror=strict-aliasing
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: darlingm at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Under gcc trunk (6.0.0, 20150521):

In file included from memstream.c:18:0:
memstream.c: In function `open_memsteam':
memstream.c:92:22: error: dereferencing type-punned pointer will break
strict-aliasing rules [-Werror=strict-aliasing]
   _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp._sf._sbf) = &_IO_mem_jumps;

libioP.h:107:26: note: in definition of macro `_IO_JUMPS`
 #define _IO_JUMPS(THIS) (THIS)->vtable

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/18447] memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing
  2015-05-22  7:26 [Bug libc/18447] New: memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing darlingm at gmail dot com
@ 2015-05-22  7:34 ` darlingm at gmail dot com
  2015-05-22 10:24 ` schwab@linux-m68k.org
  1 sibling, 0 replies; 3+ messages in thread
From: darlingm at gmail dot com @ 2015-05-22  7:34 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18447

--- Comment #1 from darlingm at gmail dot com ---
Attempted a temporary workaround of configure
CFLAGS="-Wno-error=strict-aliasing", which errored saying "glibc cannot be
compiled without optimization"

Tried CFLAGS="-Wno-error=strict-aliasing -fno-strict-aliasing" with the same
error.

Ran across that these cflags conflict with -O2, and was able to get past it by
using CFLAGS="-Wno-error=strict-aliasing -fno-strict-aliasing -O2"

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/18447] memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing
  2015-05-22  7:26 [Bug libc/18447] New: memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing darlingm at gmail dot com
  2015-05-22  7:34 ` [Bug libc/18447] " darlingm at gmail dot com
@ 2015-05-22 10:24 ` schwab@linux-m68k.org
  1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2015-05-22 10:24 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18447

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.22

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
Fixed by e69dcccbcb53b2c0f3fbe3f6c3e04aadae7e9265.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-22 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22  7:26 [Bug libc/18447] New: memstream.c:92 dereferencing type-punned pointer -Werror=strict-aliasing darlingm at gmail dot com
2015-05-22  7:34 ` [Bug libc/18447] " darlingm at gmail dot com
2015-05-22 10:24 ` schwab@linux-m68k.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).