public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33068]  New: volatile struct bit fields not treated as volatile
@ 2007-08-14 17:20 Steve at Zook dot com
  2007-08-14 17:28 ` [Bug c++/33068] " Steve at Zook dot com
  0 siblings, 1 reply; 3+ messages in thread
From: Steve at Zook dot com @ 2007-08-14 17:20 UTC (permalink / raw)
  To: gcc-bugs

When individual bit field members of a struct/class are declared as volatile,
the generated code may not treat them as volatile (code varies with -O and
-m<processor> choices). Non-bit field volatile members and bit field members of
volatile structs are always treated as volatile. The problem can be worked
around by declaring the entire structure volatile.
m68k-elf-g++ and m68k-elf-gcc both generate the bad code when compiling C++,
however, m68k-elf-gcc generates good code when compiling the same test code as
C. I will attach a test.c file which can be compiled as C or C++.


-- 
           Summary: volatile struct bit fields not treated as volatile
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Steve at Zook dot com
  GCC host triplet: i686-pc-cygwin
GCC target triplet: m68k-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33068


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

end of thread, other threads:[~2024-04-04  1:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-33068-4@http.gcc.gnu.org/bugzilla/>
2013-04-09 17:05 ` [Bug c++/33068] volatile struct bit fields not treated as volatile paolo.carlini at oracle dot com
2024-04-04  1:44 ` pinskia at gcc dot gnu.org
2007-08-14 17:20 [Bug c++/33068] New: " Steve at Zook dot com
2007-08-14 17:28 ` [Bug c++/33068] " Steve at Zook dot com

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).