1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Interacting with C</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="numerics.html" title="Chapter��12.�� Numerics" /><link rel="prev" href="generalized_numeric_operations.html" title="Generalized Operations" /><link rel="next" href="io.html" title="Chapter��13.�� Input and Output" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Interacting with C</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a>��</td><th width="60%" align="center">Chapter��12.�� 3 Numerics 4 5</th><td width="20%" align="right">��<a accesskey="n" href="io.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="std.numerics.c"></a>Interacting with C</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.c.array"></a>Numerics vs. Arrays</h3></div></div></div><p>One of the major reasons why FORTRAN can chew through numbers so well 6 is that it is defined to be free of pointer aliasing, an assumption 7 that C89 is not allowed to make, and neither is C++98. C99 adds a new 8 keyword, <code class="code">restrict</code>, to apply to individual pointers. The 9 C++ solution is contained in the library rather than the language 10 (although many vendors can be expected to add this to their compilers 11 as an extension). 12 </p><p>That library solution is a set of two classes, five template classes, 13 and "a whole bunch" of functions. The classes are required 14 to be free of pointer aliasing, so compilers can optimize the 15 daylights out of them the same way that they have been for FORTRAN. 16 They are collectively called <code class="code">valarray</code>, although strictly 17 speaking this is only one of the five template classes, and they are 18 designed to be familiar to people who have worked with the BLAS 19 libraries before. 20 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.c.c99"></a>C99</h3></div></div></div><p>In addition to the other topics on this page, we'll note here some 21 of the C99 features that appear in libstdc++. 22 </p><p>The C99 features depend on the <code class="code">--enable-c99</code> configure flag. 23 This flag is already on by default, but it can be disabled by the 24 user. Also, the configuration machinery will disable it if the 25 necessary support for C99 (e.g., header files) cannot be found. 26 </p><p>As of GCC 3.0, C99 support includes classification functions 27 such as <code class="code">isnormal</code>, <code class="code">isgreater</code>, 28 <code class="code">isnan</code>, etc. 29 The functions used for 'long long' support such as <code class="code">strtoll</code> 30 are supported, as is the <code class="code">lldiv_t</code> typedef. Also supported 31 are the wide character functions using 'long long', like 32 <code class="code">wcstoll</code>. 33 </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="generalized_numeric_operations.html">Prev</a>��</td><td width="20%" align="center"><a accesskey="u" href="numerics.html">Up</a></td><td width="40%" align="right">��<a accesskey="n" href="io.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Generalized Operations��</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">��Chapter��13.�� 34 Input and Output 35 36</td></tr></table></div></body></html>