public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/25521]  New: change semantics of const volatile variables
@ 2005-12-21 18:57 drepper at redhat dot com
  2005-12-21 19:17 ` [Bug middle-end/25521] " gdr at integrable-solutions dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2005-12-21 18:57 UTC (permalink / raw)
  To: gcc-bugs

In math code we often have to make sure the compiler does not fold operations
at compile time.  In glibc we use variable declared as

  static const volatile double foo = 42.0;

The problem is that gcc moves such variables into .data.  But we could achieve
that easily by leaving out the 'const'.  What is needed is a method to achieve
volatile behavior while having the variable in .rodata (and .rodata.cst8 etc).

I therefore would like to ask for a change in the compiler which preserves the
'const' in the presence of 'volatile' and place the variable in read-only
memory.


-- 
           Summary: change semantics of const volatile variables
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drepper at redhat dot com


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


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

end of thread, other threads:[~2022-09-29 11:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-25521-4@http.gcc.gnu.org/bugzilla/>
2011-12-22  1:16 ` [Bug middle-end/25521] change semantics of const volatile variables pinskia at gcc dot gnu.org
2011-12-22  1:18 ` pinskia at gcc dot gnu.org
2022-07-10 20:06 ` jose.marchesi at oracle dot com
2022-07-10 20:19 ` jose.marchesi at oracle dot com
2022-07-11  1:53 ` jose.marchesi at oracle dot com
2022-08-03 18:21 ` jose.marchesi at oracle dot com
2022-09-29 11:14 ` cvs-commit at gcc dot gnu.org
2005-12-21 18:57 [Bug middle-end/25521] New: " drepper at redhat dot com
2005-12-21 19:17 ` [Bug middle-end/25521] " gdr at integrable-solutions dot net
2005-12-21 19:38 ` drepper at redhat dot com
2005-12-21 19:54 ` gdr at integrable-solutions dot net

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