This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [wwwdocs] Entry for PR 18160 in changes.html


Gerald Pfeifer writes:
> This I had to read a couple of times until I remembered the details
> of the discussion on this list -- providing a short example would be
> useful, for the notion of "explicit register variable" is not
> immediate.

Gerald,

How about this?  It still passes the validator.

Adam

Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.0/changes.html,v
retrieving revision 1.13
diff -c -p -r1.13 changes.html
*** changes.html	12 Oct 2004 07:11:52 -0000	1.13
--- changes.html	14 Nov 2004 05:26:32 -0000
***************
*** 100,105 ****
--- 100,108 ----
          deprecated in 3.4, has been removed.</li>
      <li><code>#pragma pack()</code> semantics have been brought closer to
          those used by other compilers. This also applies to C++.</li>
+     <li>Taking the address of a variable with <code>register</code>
+         storage is invalid in C.  GCC now issues an error instead of a
+         warning.</li>
    </ul>
  
  <h3>C++</h3>
***************
*** 138,143 ****
--- 141,156 ----
          want to disable this by specifying
          <code>-fno-threadsafe-statics</code> for a small savings in code
          size.</li>
+ 
+     <li>Taking the address of an explicit register variable is no
+ 	longer supported.  Note that C++ allows taking the address of
+ 	variables with <code>register</code> storage so this will
+ 	continue to compile with a warning.  For example, assuming
+ 	that <code>r0</code> is a machine register:
+ 	<pre>register int foo asm ("r0");
+ register int bar;
+ &amp;foo; // error, no longer accepted
+ &amp;bar; // OK, with a warning</pre></li>
    </ul>
  
  <h3>Java</h3>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]