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]

[wwwdocs] updates for 4.4 changes and porting_to


Updates since the last pass.

-benjamin
Index: gcc-4.4/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.4/changes.html,v
retrieving revision 1.67
diff -c -p -r1.67 changes.html
*** gcc-4.4/changes.html	5 Apr 2009 22:37:36 -0000	1.67
--- gcc-4.4/changes.html	16 Apr 2009 19:31:50 -0000
***************
*** 362,375 ****
    
    <h4>Runtime Library (libstdc++)</h4>
    <ul>
!     <li><a href="cxx0x_status.html">Improved experimental support for
!     the upcoming ISO C++ standard, C++0x</a>. Including support for
      &lt;chrono&gt;, &lt;condition_variable&gt;, &lt;cstdatomic&gt;,
      &lt;forward_list&gt;, &lt;initializer_list&gt;, &lt;mutex&gt;,
      &lt;ratio&gt;, &lt;system_error&gt;, and
      &lt;thread&gt;. Plus <code>unique_ptr</code>, &lt;algorithm&gt;
      additions, exception propagation, and some support for the new
      character types.
      </li>
      <li>Experimental support for non-standard pointer types in containers.</li>
    </ul>
--- 362,377 ----
    
    <h4>Runtime Library (libstdc++)</h4>
    <ul>
!     <li>Added experimental support for
!     the upcoming ISO C++ standard, C++0x. Including support for
      &lt;chrono&gt;, &lt;condition_variable&gt;, &lt;cstdatomic&gt;,
      &lt;forward_list&gt;, &lt;initializer_list&gt;, &lt;mutex&gt;,
      &lt;ratio&gt;, &lt;system_error&gt;, and
      &lt;thread&gt;. Plus <code>unique_ptr</code>, &lt;algorithm&gt;
      additions, exception propagation, and some support for the new
      character types.
+     (<a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#id476343";>Implementation status of C++0x library</a>)
+ 
      </li>
      <li>Experimental support for non-standard pointer types in containers.</li>
    </ul>
Index: gcc-4.4/porting_to.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.4/porting_to.html,v
retrieving revision 1.3
diff -c -p -r1.3 porting_to.html
*** gcc-4.4/porting_to.html	5 Apr 2009 12:02:25 -0000	1.3
--- gcc-4.4/porting_to.html	16 Apr 2009 19:31:50 -0000
*************** The file &lt;stdint.h&gt; is no longer i
*** 129,134 ****
--- 129,207 ----
  &lt;string&gt; or&lt;ios&gt;.
  </p>
  
+ <h4>Strict null-terminated sequence utilities</h4>
+ 
+ <p>
+ Some of the standard C++ library include files have been edited to use
+ replacement overloads for some common C library functions (if
+ available), with the goal of improving const-correctness: functions
+ passed a <code>const char*</code> return <code>const char*</code>.
+ </p>
+ 
+ <p>
+ The table below shows the functions and files that have been changed.
+ </p>
+ 
+ <table title="" border="1">
+   <tr>
+     <th>Header</th>
+     <th>Functions</th>
+   </tr>
+   <tr>
+     <td>&lt;cstring&gt;</td>
+     <td>
+       <code>strchr</code>,
+       <code>strpbrk</code>,
+       <code>strrchr</code>,
+       <code>strstr</code>,
+       <code>memchr</code>
+     </td>
+   </tr>
+   <tr>
+     <td>&lt;cwchar&gt;</td>
+     <td>
+       <code>wcschr</code>
+       <code>wcspbrk</code>,
+       <code>wcsrchr</code>,
+       <code>wcsstr</code>,
+       <code>wmemchr</code>
+     </td>
+   </tr>
+ </table>
+ 
+ <p>
+ An example.
+ <p>
+ 
+ <pre>
+ #include &lt;cstring&gt;
+ 
+ const char* str1;
+ char* str2 = strchr(str1, 'a');
+ </pre>
+ 
+ <p>
+ Gives the following compiler error:
+ </p>
+ 
+ <pre>
+ error: invalid conversion from â??const char*â?? to â??char*â??
+ </pre>
+ 
+ <p>Fixing this is easy, as demonstrated below.
+ </p>
+ <pre>
+ #include &lt;cstring&gt;
+ 
+ const char* str1;
+ const char* str2 = strchr(str1, 'a');
+ </pre>
+ 
+ <p>
+ More information about the C++ standard requirements can be found in
+ chapter 21, section "Null-terminated sequence utilities."
+ </p>
+ 
  <h4>Initialization changes</h4>
  <p>
  GCC by default no longer accepts code such as

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