2003-07-25 13:04:06 +04:00
|
|
|
|
|
|
|
GCC Bugs
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The latest version of this document is always available at
|
2003-07-25 13:04:06 +04:00
|
|
|
[1]http://gcc.gnu.org/bugs.html.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
Table of Contents
|
|
|
|
|
|
|
|
* [2]Reporting Bugs
|
|
|
|
+ [3]What we need
|
|
|
|
+ [4]What we DON'T want
|
|
|
|
+ [5]Where to post it
|
|
|
|
+ [6]Detailed bug reporting instructions
|
|
|
|
+ [7]Detailed bug reporting instructions for GNAT
|
2004-03-01 10:27:18 +03:00
|
|
|
+ [8]Detailed bug reporting instructions when using a
|
2003-07-25 13:04:06 +04:00
|
|
|
precompiled header
|
|
|
|
* [9]Frequently Reported Bugs in GCC
|
2003-10-18 15:54:13 +04:00
|
|
|
+ [10]C++
|
2004-02-10 15:56:21 +03:00
|
|
|
o [11]Missing features
|
|
|
|
o [12]Bugs fixed in the upcoming 3.4 series
|
|
|
|
+ [13]Fortran
|
|
|
|
* [14]Non-bugs
|
|
|
|
+ [15]General
|
|
|
|
+ [16]C
|
|
|
|
+ [17]C++
|
|
|
|
o [18]Common problems when upgrading the compiler
|
2003-07-25 13:04:06 +04:00
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
Reporting Bugs
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The main purpose of a bug report is to enable us to fix the bug. The
|
|
|
|
most important prerequisite for this is that the report must be
|
2003-07-25 13:04:06 +04:00
|
|
|
complete and self-contained, which we explain in detail below.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Before you report a bug, please check the [19]list of well-known bugs
|
|
|
|
and, if possible in any way, try a current development snapshot. If
|
|
|
|
you want to report a bug with versions of GCC before 3.1 we strongly
|
2003-07-25 13:04:06 +04:00
|
|
|
recommend upgrading to the current release first.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Before reporting that GCC compiles your code incorrectly, please
|
|
|
|
compile it with gcc -Wall and see whether this shows anything wrong
|
2003-07-25 13:04:06 +04:00
|
|
|
with your code that could be the cause instead of a bug in GCC.
|
|
|
|
|
|
|
|
Summarized bug reporting instructions
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
After this summary, you'll find detailed bug reporting instructions,
|
|
|
|
that explain how to obtain some of the information requested in this
|
2003-07-25 13:04:06 +04:00
|
|
|
summary.
|
|
|
|
|
|
|
|
What we need
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Please include in your bug report all of the following items, the
|
2003-07-25 13:04:06 +04:00
|
|
|
first three of which can be obtained from the output of gcc -v:
|
|
|
|
* the exact version of GCC;
|
|
|
|
* the system type;
|
|
|
|
* the options given when GCC was configured/built;
|
|
|
|
* the complete command line that triggers the bug;
|
|
|
|
* the compiler output (error messages, warnings, etc.); and
|
2004-03-01 10:27:18 +03:00
|
|
|
* the preprocessed file (*.i*) that triggers the bug, generated by
|
2003-07-25 13:04:06 +04:00
|
|
|
adding -save-temps to the complete compilation command, or, in the
|
2004-03-01 10:27:18 +03:00
|
|
|
case of a bug report for the GNAT front end, a complete set of
|
2003-07-25 13:04:06 +04:00
|
|
|
source files (see below).
|
|
|
|
|
|
|
|
What we do not want
|
|
|
|
|
|
|
|
* A source file that #includes header files that are left out of the
|
|
|
|
bug report (see above)
|
|
|
|
* That source file and a collection of header files.
|
2004-03-01 10:27:18 +03:00
|
|
|
* An attached archive (tar, zip, shar, whatever) containing all (or
|
2003-07-25 13:04:06 +04:00
|
|
|
some :-) of the above.
|
2004-03-01 10:27:18 +03:00
|
|
|
* A code snippet that won't cause the compiler to produce the exact
|
|
|
|
output mentioned in the bug report (e.g., a snippet with just a
|
|
|
|
few lines around the one that apparently triggers the bug, with
|
|
|
|
some pieces replaced with ellipses or comments for extra
|
2003-07-25 13:04:06 +04:00
|
|
|
obfuscation :-)
|
2004-03-01 10:27:18 +03:00
|
|
|
* The location (URL) of the package that failed to build (we won't
|
2003-07-25 13:04:06 +04:00
|
|
|
download it, anyway, since you've already given us what we need to
|
|
|
|
duplicate the bug, haven't you? :-)
|
2004-03-01 10:27:18 +03:00
|
|
|
* An error that occurs only some of the times a certain file is
|
|
|
|
compiled, such that retrying a sufficient number of times results
|
|
|
|
in a successful compilation; this is a symptom of a hardware
|
2003-07-25 13:04:06 +04:00
|
|
|
problem, not of a compiler bug (sorry)
|
2004-03-01 10:27:18 +03:00
|
|
|
* E-mail messages that complement previous, incomplete bug reports.
|
|
|
|
Post a new, self-contained, full bug report instead, if possible
|
2003-07-25 13:04:06 +04:00
|
|
|
as a follow-up to the original bug report
|
2004-03-01 10:27:18 +03:00
|
|
|
* Assembly files (*.s) produced by the compiler, or any binary
|
|
|
|
files, such as object files, executables, core files, or
|
2003-07-25 13:04:06 +04:00
|
|
|
precompiled header files
|
2004-03-01 10:27:18 +03:00
|
|
|
* Duplicate bug reports, or reports of bugs already fixed in the
|
2003-07-25 13:04:06 +04:00
|
|
|
development tree, especially those that have already been reported
|
|
|
|
as fixed last week :-)
|
2004-03-01 10:27:18 +03:00
|
|
|
* Bugs in the assembler, the linker or the C library. These are
|
|
|
|
separate projects, with separate mailing lists and different bug
|
2003-07-25 13:04:06 +04:00
|
|
|
reporting procedures
|
2004-03-01 10:27:18 +03:00
|
|
|
* Bugs in releases or snapshots of GCC not issued by the GNU
|
2003-07-25 13:04:06 +04:00
|
|
|
Project. Report them to whoever provided you with the release
|
2004-03-01 10:27:18 +03:00
|
|
|
* Questions about the correctness or the expected behavior of
|
2003-07-25 13:04:06 +04:00
|
|
|
certain constructs that are not GCC extensions. Ask them in forums
|
|
|
|
dedicated to the discussion of the programming language
|
|
|
|
|
|
|
|
Where to post it
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Please submit your bug report directly to the [20]GCC bug database.
|
|
|
|
Alternatively, you can use the gccbug script that mails your bug
|
2004-02-10 15:56:21 +03:00
|
|
|
report to the bug database.
|
2004-03-01 10:27:18 +03:00
|
|
|
Only if all this is absolutely impossible, mail all information to
|
2004-02-10 15:56:21 +03:00
|
|
|
[21]gcc-bugs@gcc.gnu.org.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
|
|
|
Detailed bug reporting instructions
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Please refer to the [22]next section when reporting bugs in GNAT, the
|
|
|
|
Ada compiler, or to the [23]one after that when reporting bugs that
|
2003-07-25 13:04:06 +04:00
|
|
|
appear when using a precompiled header.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
In general, all the information we need can be obtained by collecting
|
|
|
|
the command line below, as well as its output and the preprocessed
|
2003-07-25 13:04:06 +04:00
|
|
|
file it generates.
|
|
|
|
|
|
|
|
gcc -v -save-temps all-your-options source-file
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Typically the preprocessed file (extension .i for C or .ii for C++,
|
2003-07-25 13:04:06 +04:00
|
|
|
and .f if the preprocessor is used on Fortran files) will be large, so
|
|
|
|
please compress the resulting file with one of the popular compression
|
2004-03-01 10:27:18 +03:00
|
|
|
programs such as bzip2, gzip, zip or compress (in decreasing order of
|
2003-07-25 13:04:06 +04:00
|
|
|
preference). Use maximum compression (-9) if available. Please include
|
2004-03-01 10:27:18 +03:00
|
|
|
the compressed preprocessor output in your bug report, even if the
|
|
|
|
source code is freely available elsewhere; it makes the job of our
|
2003-07-25 13:04:06 +04:00
|
|
|
volunteer testers much easier.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The only excuses to not send us the preprocessed sources are (i) if
|
|
|
|
you've found a bug in the preprocessor, (ii) if you've reduced the
|
|
|
|
testcase to a small file that doesn't include any other file or (iii)
|
|
|
|
if the bug appears only when using precompiled headers. If you can't
|
|
|
|
post the preprocessed sources because they're proprietary code, then
|
2003-07-25 13:04:06 +04:00
|
|
|
try to create a small file that triggers the same problem.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Since we're supposed to be able to re-create the assembly output
|
|
|
|
(extension .s), you usually should not include it in the bug report,
|
|
|
|
although you may want to post parts of it to point out assembly code
|
2003-07-25 13:04:06 +04:00
|
|
|
you consider to be wrong.
|
|
|
|
|
|
|
|
Whether to use MIME attachments or uuencode is up to you. In any case,
|
2004-03-01 10:27:18 +03:00
|
|
|
make sure the compiler command line, version and error output are in
|
2003-07-25 13:04:06 +04:00
|
|
|
plain text, so that we don't have to decode the bug report in order to
|
2004-03-01 10:27:18 +03:00
|
|
|
tell who should take care of it. A meaningful subject indicating
|
2003-07-25 13:04:06 +04:00
|
|
|
language and platform also helps.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Please avoid posting an archive (.tar, .shar or .zip); we generally
|
|
|
|
need just a single file to reproduce the bug (the .i/.ii/.f
|
|
|
|
preprocessed file), and, by storing it in an archive, you're just
|
2003-07-25 13:04:06 +04:00
|
|
|
making our volunteers' jobs harder. Only when your bug report requires
|
|
|
|
multiple source files to be reproduced should you use an archive. This
|
2004-03-01 10:27:18 +03:00
|
|
|
is, for example, the case if you are using INCLUDE directives in
|
|
|
|
Fortran code, which are not processed by the preprocessor, but the
|
|
|
|
compiler. In that case, we need the main file and all INCLUDEd files.
|
|
|
|
In any case, make sure the compiler version, error message, etc, are
|
|
|
|
included in the body of your bug report as plain text, even if
|
2003-07-25 13:04:06 +04:00
|
|
|
needlessly duplicated as part of an archive.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you fail to supply enough information for a bug report to be
|
|
|
|
reproduced, someone will probably ask you to post additional
|
|
|
|
information (or just ignore your bug report, if they're in a bad day,
|
|
|
|
so try to get it right on the first posting :-). In this case, please
|
2003-07-25 13:04:06 +04:00
|
|
|
post the additional information to the bug reporting mailing list, not
|
2004-03-01 10:27:18 +03:00
|
|
|
just to the person who requested it, unless explicitly told so. If
|
2003-07-25 13:04:06 +04:00
|
|
|
possible, please include in this follow-up all the information you had
|
2004-03-01 10:27:18 +03:00
|
|
|
supplied in the incomplete bug report (including the preprocessor
|
2003-07-25 13:04:06 +04:00
|
|
|
output), so that the new bug report is self-contained.
|
|
|
|
|
|
|
|
Detailed bug reporting instructions for GNAT
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
See the [24]previous section for bug reporting instructions for GCC
|
2003-07-25 13:04:06 +04:00
|
|
|
language implementations other than Ada.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Bug reports have to contain at least the following information in
|
2003-07-25 13:04:06 +04:00
|
|
|
order to be useful:
|
|
|
|
* the exact version of GCC, as shown by "gcc -v";
|
|
|
|
* the system type;
|
|
|
|
* the options when GCC was configured/built;
|
2004-03-01 10:27:18 +03:00
|
|
|
* the exact command line passed to the gcc program triggering the
|
|
|
|
bug (not just the flags passed to gnatmake, but gnatmake prints
|
2003-07-25 13:04:06 +04:00
|
|
|
the parameters it passed to gcc)
|
|
|
|
* a collection of source files for reproducing the bug, preferably a
|
|
|
|
minimal set (see below);
|
|
|
|
* a description of the expected behavior;
|
|
|
|
* a description of actual behavior.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If your code depends on additional source files (usually package
|
2003-07-25 13:04:06 +04:00
|
|
|
specifications), submit the source code for these compilation units in
|
2004-03-01 10:27:18 +03:00
|
|
|
a single file that is acceptable input to gnatchop, i.e. contains no
|
|
|
|
non-Ada text. If the compilation terminated normally, you can usually
|
2003-07-25 13:04:06 +04:00
|
|
|
obtain a list of dependencies using the "gnatls -d main_unit" command,
|
2004-03-01 10:27:18 +03:00
|
|
|
where main_unit is the file name of the main compilation unit (which
|
2003-07-25 13:04:06 +04:00
|
|
|
is also passed to gcc).
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you report a bug which causes the compiler to print a bug box,
|
2003-07-25 13:04:06 +04:00
|
|
|
include that bug box in your report, and do not forget to send all the
|
|
|
|
source files listed after the bug box along with your report.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you use gnatprep, be sure to send in preprocessed sources (unless
|
2003-07-25 13:04:06 +04:00
|
|
|
you have to report a bug in gnatprep).
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
When you have checked that your report meets these criteria, please
|
|
|
|
submit it according to our [25]generic instructions. (If you use a
|
|
|
|
mailing list for reporting, please include an "[Ada]" tag in the
|
2003-07-25 13:04:06 +04:00
|
|
|
subject.)
|
|
|
|
|
|
|
|
Detailed bug reporting instructions when using a precompiled header
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you're encountering a bug when using a precompiled header, the
|
2003-07-25 13:04:06 +04:00
|
|
|
first thing to do is to delete the precompiled header, and try running
|
2004-03-01 10:27:18 +03:00
|
|
|
the same GCC command again. If the bug happens again, the bug doesn't
|
|
|
|
really involve precompiled headers, please report it without using
|
2004-02-10 15:56:21 +03:00
|
|
|
them by following the instructions [26]above.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you've found a bug while building a precompiled header (for
|
|
|
|
instance, the compiler crashes), follow the usual instructions
|
2004-02-10 15:56:21 +03:00
|
|
|
[27]above.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you've found a real precompiled header bug, what we'll need to
|
|
|
|
reproduce it is the sources to build the precompiled header (as a
|
2003-07-25 13:04:06 +04:00
|
|
|
single .i file), the source file that uses the precompiled header, any
|
2004-03-01 10:27:18 +03:00
|
|
|
other headers that source file includes, and the command lines that
|
2003-07-25 13:04:06 +04:00
|
|
|
you used to build the precompiled header and to use it.
|
|
|
|
|
|
|
|
Please don't send us the actual precompiled header. It is likely to be
|
|
|
|
very large and we can't use it to reproduce the problem.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
Frequently Reported Bugs in GCC
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This is a list of bugs in GCC that are reported very often, but not
|
|
|
|
yet fixed. While it is certainly better to fix bugs instead of
|
|
|
|
documenting them, this document might save people the effort of
|
2003-10-18 15:54:13 +04:00
|
|
|
writing a bug report when the bug is already well-known.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
There are many reasons why a reported bug doesn't get fixed. It might
|
|
|
|
be difficult to fix, or fixing it might break compatibility. Often,
|
|
|
|
reports get a low priority when there is a simple work-around. In
|
2003-10-18 15:54:13 +04:00
|
|
|
particular, bugs caused by invalid code have a simple work-around: fix
|
|
|
|
the code.
|
2003-07-25 13:04:06 +04:00
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
C++
|
|
|
|
|
|
|
|
Missing features
|
|
|
|
|
|
|
|
The export keyword is not implemented.
|
2004-03-01 10:27:18 +03:00
|
|
|
Most C++ compilers (G++ included) do not yet implement export,
|
|
|
|
which is necessary for separate compilation of template
|
|
|
|
declarations and definitions. Without export, a template
|
|
|
|
definition must be in scope to be used. The obvious workaround
|
|
|
|
is simply to place all definitions in the header itself.
|
|
|
|
Alternatively, the compilation unit containing template
|
2003-07-25 13:04:06 +04:00
|
|
|
definitions may be included from the header.
|
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
Bugs fixed in the upcoming 3.4 series
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The following bugs are present up to (and including) GCC 3.3.x. They
|
2004-02-10 15:56:21 +03:00
|
|
|
have been fixed in 3.4.0.
|
|
|
|
|
|
|
|
Two-stage name-lookup.
|
2004-03-01 10:27:18 +03:00
|
|
|
GCC did not implement two-stage name-lookup (also see
|
2004-02-10 15:56:21 +03:00
|
|
|
[28]below).
|
|
|
|
|
|
|
|
Covariant return types.
|
|
|
|
GCC did not implement non-trivial covariant returns.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
Parse errors for "simple" code.
|
|
|
|
GCC gave parse errors for seemingly simple code, such as
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
struct A
|
|
|
|
{
|
2003-07-25 13:04:06 +04:00
|
|
|
A();
|
|
|
|
A(int);
|
|
|
|
};
|
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
struct B
|
|
|
|
{
|
2003-07-25 13:04:06 +04:00
|
|
|
B(A);
|
|
|
|
B(A,A);
|
2004-02-10 15:56:21 +03:00
|
|
|
void foo();
|
2003-07-25 13:04:06 +04:00
|
|
|
};
|
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
A bar()
|
|
|
|
{
|
|
|
|
B b(A(),A(1)); // Variable b, initialized with two temporaries
|
|
|
|
B(A(2)).foo(); // B temporary, initialized with A temporary
|
|
|
|
return (A()); // return A temporary
|
2003-07-25 13:04:06 +04:00
|
|
|
}
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Although being valid code, each of the three lines with a
|
|
|
|
comment was rejected by GCC. The work-arounds for older
|
2004-02-10 15:56:21 +03:00
|
|
|
compiler versions proposed below do not change the semantics of
|
|
|
|
the programs at all.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
The problem in the first case was that GCC started to parse the
|
2004-03-01 10:27:18 +03:00
|
|
|
declaration of b as a function called b returning B, taking a
|
2004-02-10 15:56:21 +03:00
|
|
|
function returning A as an argument. When it encountered the 1,
|
2004-03-01 10:27:18 +03:00
|
|
|
it was too late. To show the compiler that this should be
|
|
|
|
really an expression, a comma operator with a dummy argument
|
2004-02-10 15:56:21 +03:00
|
|
|
could be used:
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
B b((0,A()),A(1));
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The work-around for simpler cases like the second one was to
|
|
|
|
add additional parentheses around the expressions that were
|
2004-02-10 15:56:21 +03:00
|
|
|
mistaken as declarations:
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
(B(A(2))).foo();
|
2003-07-25 13:04:06 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
In the third case, however, additional parentheses were causing
|
2004-03-01 10:27:18 +03:00
|
|
|
the problems: The compiler interpreted A() as a function
|
2004-02-10 15:56:21 +03:00
|
|
|
(taking no arguments, returning A), and (A()) as a cast lacking
|
2004-03-01 10:27:18 +03:00
|
|
|
an expression to be casted, hence the parse error. The
|
2004-02-10 15:56:21 +03:00
|
|
|
work-around was to omit the parentheses:
|
|
|
|
|
|
|
|
return A();
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This problem occured in a number of variants; in throw
|
|
|
|
statements, people also frequently put the object in
|
2004-02-10 15:56:21 +03:00
|
|
|
parentheses.
|
2003-10-18 15:54:13 +04:00
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
Fortran
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Fortran bugs are documented in the G77 manual rather than explicitly
|
|
|
|
listed here. Please see [29]Known Causes of Trouble with GNU Fortran
|
2003-10-18 15:54:13 +04:00
|
|
|
in the G77 manual.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
Non-bugs
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The following are not actually bugs, but are reported often enough to
|
2003-10-18 15:54:13 +04:00
|
|
|
warrant a mention here.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
It is not always a bug in the compiler, if code which "worked" in a
|
|
|
|
previous version, is now rejected. Earlier versions of GCC sometimes
|
2003-10-18 15:54:13 +04:00
|
|
|
were less picky about standard conformance and accepted invalid source
|
2004-03-01 10:27:18 +03:00
|
|
|
code. In addition, programming languages themselves change, rendering
|
|
|
|
code invalid that used to be conforming (this holds especially for
|
|
|
|
C++). In either case, you should update your code to match recent
|
2003-10-18 15:54:13 +04:00
|
|
|
language standards.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
General
|
|
|
|
|
|
|
|
Problems with floating point numbers - the [30]most often reported
|
|
|
|
non-bug.
|
2004-03-01 10:27:18 +03:00
|
|
|
In a number of cases, GCC appears to perform floating point
|
2003-10-18 15:54:13 +04:00
|
|
|
computations incorrectly. For example, the C++ program
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
double a = 0.5;
|
|
|
|
double b = 0.01;
|
|
|
|
std::cout << (int)(a / b) << std::endl;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
might print 50 on some systems and optimization levels, and 49
|
2003-10-18 15:54:13 +04:00
|
|
|
on others.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The is the result of rounding: The computer cannot represent
|
2003-10-18 15:54:13 +04:00
|
|
|
all real numbers exactly, so it has to use approximations. When
|
2004-03-01 10:27:18 +03:00
|
|
|
computing with approximation, the computer needs to round to
|
2003-10-18 15:54:13 +04:00
|
|
|
the nearest representable number.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This is not a bug in the compiler, but an inherent limitation
|
|
|
|
of the floating point types. Please study [31]this paper for
|
2003-10-18 15:54:13 +04:00
|
|
|
more information.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
C
|
|
|
|
|
|
|
|
Casting does not work as expected when optimization is turned on.
|
2004-03-01 10:27:18 +03:00
|
|
|
This is often caused by a violation of aliasing rules, which
|
|
|
|
are part of the ISO C standard. These rules say that a program
|
2003-10-18 15:54:13 +04:00
|
|
|
is invalid if you try to access a variable through a pointer of
|
2004-03-01 10:27:18 +03:00
|
|
|
an incompatible type. This is happening in the following
|
|
|
|
example where a short is accessed through a pointer to integer
|
2003-10-18 15:54:13 +04:00
|
|
|
(the code assumes 16-bit shorts and 32-bit ints):
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
short a[2];
|
|
|
|
|
|
|
|
a[0]=0x1111;
|
|
|
|
a[1]=0x1111;
|
|
|
|
|
|
|
|
*(int *)a = 0x22222222; /* violation of aliasing rules */
|
|
|
|
|
|
|
|
printf("%x %x\n", a[0], a[1]);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The aliasing rules were designed to allow compilers more
|
|
|
|
aggressive optimization. Basically, a compiler can assume that
|
|
|
|
all changes to variables happen through pointers or references
|
|
|
|
to variables of a type compatible to the accessed variable.
|
|
|
|
Dereferencing a pointer that violates the aliasing rules
|
2003-10-18 15:54:13 +04:00
|
|
|
results in undefined behavior.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
In the case above, the compiler may assume that no access
|
|
|
|
through an integer pointer can change the array a, consisting
|
|
|
|
of shorts. Thus, printf may be called with the original values
|
2003-10-18 15:54:13 +04:00
|
|
|
of a[0] and a[1]. What really happens is up to the compiler and
|
|
|
|
may change with architecture and optimization level.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Recent versions of GCC turn on the option -fstrict-aliasing
|
|
|
|
(which allows alias-based optimizations) by default with -O2.
|
2003-10-18 15:54:13 +04:00
|
|
|
And some architectures then really print "1111 1111" as result.
|
2004-03-01 10:27:18 +03:00
|
|
|
Without optimization the executable will generate the
|
2003-10-18 15:54:13 +04:00
|
|
|
"expected" output "2222 2222".
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
To disable optimizations based on alias-analysis for faulty
|
|
|
|
legacy code, the option -fno-strict-aliasing can be used as a
|
2003-10-18 15:54:13 +04:00
|
|
|
work-around.
|
|
|
|
|
|
|
|
The option -Wstrict-aliasing (which is included in -Wall) warns
|
|
|
|
about some - but not all - cases of violation of aliasing rules
|
|
|
|
when -fstrict-aliasing is active.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
To fix the code above, you can use a union instead of a cast
|
|
|
|
(note that this is a GCC extension which might not work with
|
2003-10-18 15:54:13 +04:00
|
|
|
other compilers):
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
short a[2];
|
|
|
|
int i;
|
|
|
|
} u;
|
|
|
|
|
|
|
|
u.a[0]=0x1111;
|
|
|
|
u.a[1]=0x1111;
|
|
|
|
|
|
|
|
u.i = 0x22222222;
|
|
|
|
|
|
|
|
printf("%x %x\n", u.a[0], u.a[1]);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
Now the result will always be "2222 2222".
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
For some more insight into the subject, please have a look at
|
2003-10-18 15:54:13 +04:00
|
|
|
[32]this article.
|
|
|
|
|
|
|
|
Cannot use preprocessor directive in macro arguments.
|
2004-03-01 10:27:18 +03:00
|
|
|
Let me guess... you used an older version of GCC to compile
|
2003-10-18 15:54:13 +04:00
|
|
|
code that looks something like this:
|
|
|
|
|
|
|
|
memcpy(dest, src,
|
|
|
|
#ifdef PLATFORM1
|
|
|
|
12
|
|
|
|
#else
|
|
|
|
24
|
|
|
|
#endif
|
|
|
|
);
|
|
|
|
|
|
|
|
and you got a whole pile of error messages:
|
|
|
|
|
|
|
|
test.c:11: warning: preprocessing directive not recognized within macro arg
|
|
|
|
test.c:11: warning: preprocessing directive not recognized within macro arg
|
|
|
|
test.c:11: warning: preprocessing directive not recognized within macro arg
|
|
|
|
test.c: In function `foo':
|
|
|
|
test.c:6: undefined or invalid # directive
|
|
|
|
test.c:8: undefined or invalid # directive
|
|
|
|
test.c:9: parse error before `24'
|
|
|
|
test.c:10: undefined or invalid # directive
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This is because your C library's <string.h> happens to define
|
|
|
|
memcpy as a macro - which is perfectly legitimate. In recent
|
2003-10-18 15:54:13 +04:00
|
|
|
versions of glibc, for example, printf is among those functions
|
|
|
|
which are implemented as macros.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Versions of GCC prior to 3.3 did not allow you to put #ifdef
|
2003-10-18 15:54:13 +04:00
|
|
|
(or any other preprocessor directive) inside the arguments of a
|
|
|
|
macro. The code therefore would not compile.
|
|
|
|
|
|
|
|
As of GCC 3.3 this kind of construct is always accepted and the
|
2004-03-01 10:27:18 +03:00
|
|
|
preprocessor will probably do what you expect, but see the
|
2003-10-18 15:54:13 +04:00
|
|
|
manual for detailed semantics.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
However, this kind of code is not portable. It is "undefined
|
|
|
|
behavior" according to the C standard; that means different
|
|
|
|
compilers may do different things with it. It is always
|
|
|
|
possible to rewrite code which uses conditionals inside macros
|
2003-10-18 15:54:13 +04:00
|
|
|
so that it doesn't. You could write the above example
|
|
|
|
|
|
|
|
#ifdef PLATFORM1
|
|
|
|
memcpy(dest, src, 12);
|
|
|
|
#else
|
|
|
|
memcpy(dest, src, 24);
|
|
|
|
#endif
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This is a bit more typing, but I personally think it's better
|
2003-10-18 15:54:13 +04:00
|
|
|
style in addition to being more portable.
|
|
|
|
|
|
|
|
Cannot initialize a static variable with stdin.
|
2004-03-01 10:27:18 +03:00
|
|
|
This has nothing to do with GCC, but people ask us about it a
|
2003-10-18 15:54:13 +04:00
|
|
|
lot. Code like this:
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
FILE *yyin = stdin;
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
will not compile with GNU libc, because stdin is not a
|
|
|
|
constant. This was done deliberately, to make it easier to
|
|
|
|
maintain binary compatibility when the type FILE needs to be
|
2003-10-18 15:54:13 +04:00
|
|
|
changed. It is surprising for people used to traditional Unix C
|
|
|
|
libraries, but it is permitted by the C standard.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
This construct commonly occurs in code generated by old
|
|
|
|
versions of lex or yacc. We suggest you try regenerating the
|
|
|
|
parser with a current version of flex or bison, respectively.
|
|
|
|
In your own code, the appropriate fix is to move the
|
2003-10-18 15:54:13 +04:00
|
|
|
initialization to the beginning of main.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
There is a common misconception that the GCC developers are
|
|
|
|
responsible for GNU libc. These are in fact two entirely
|
|
|
|
separate projects; please check the [33]GNU libc web pages for
|
2003-10-18 15:54:13 +04:00
|
|
|
details.
|
|
|
|
_________________________________________________________________
|
|
|
|
|
|
|
|
C++
|
|
|
|
|
|
|
|
Nested classes can access private members and types of the containing
|
|
|
|
class.
|
2004-03-01 10:27:18 +03:00
|
|
|
Defect report 45 clarifies that nested classes are members of
|
|
|
|
the class they are nested in, and so are granted access to
|
2003-10-18 15:54:13 +04:00
|
|
|
private members of that class.
|
|
|
|
|
|
|
|
G++ emits two copies of constructors and destructors.
|
2004-03-01 10:27:18 +03:00
|
|
|
In general there are three types of constructors (and
|
2003-10-18 15:54:13 +04:00
|
|
|
destructors).
|
|
|
|
|
|
|
|
1. The complete object constructor/destructor.
|
|
|
|
2. The base object constructor/destructor.
|
|
|
|
3. The allocating constructor/deallocating destructor.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The first two are different, when virtual base classes are
|
2003-10-18 15:54:13 +04:00
|
|
|
involved.
|
|
|
|
|
|
|
|
Global destructors are not run in the correct order.
|
2004-03-01 10:27:18 +03:00
|
|
|
Global destructors should be run in the reverse order of their
|
|
|
|
constructors completing. In most cases this is the same as the
|
|
|
|
reverse order of constructors starting, but sometimes it is
|
|
|
|
different, and that is important. You need to compile and link
|
|
|
|
your programs with --use-cxa-atexit. We have not turned this
|
|
|
|
switch on by default, as it requires a cxa aware runtime
|
2003-10-18 15:54:13 +04:00
|
|
|
library (libc, glibc, or equivalent).
|
|
|
|
|
|
|
|
Classes in exception specifiers must be complete types.
|
2004-03-01 10:27:18 +03:00
|
|
|
[15.4]/1 tells you that you cannot have an incomplete type, or
|
|
|
|
pointer to incomplete (other than cv void *) in an exception
|
2003-10-18 15:54:13 +04:00
|
|
|
specification.
|
|
|
|
|
|
|
|
Exceptions don't work in multithreaded applications.
|
2004-03-01 10:27:18 +03:00
|
|
|
You need to rebuild g++ and libstdc++ with --enable-threads.
|
|
|
|
Remember, C++ exceptions are not like hardware interrupts. You
|
|
|
|
cannot throw an exception in one thread and catch it in
|
|
|
|
another. You cannot throw an exception from a signal handler
|
2003-10-18 15:54:13 +04:00
|
|
|
and catch it in the main thread.
|
|
|
|
|
|
|
|
Templates, scoping, and digraphs.
|
2004-03-01 10:27:18 +03:00
|
|
|
If you have a class in the global namespace, say named X, and
|
2003-10-18 15:54:13 +04:00
|
|
|
want to give it as a template argument to some other class, say
|
|
|
|
std::vector, then std::vector<::X> fails with a parser error.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The reason is that the standard mandates that the sequence <:
|
|
|
|
is treated as if it were the token [. (There are several such
|
|
|
|
combinations of characters - they are called digraphs.)
|
|
|
|
Depending on the version, the compiler then reports a parse
|
|
|
|
error before the character : (the colon before X) or a missing
|
2003-10-18 15:54:13 +04:00
|
|
|
closing bracket ].
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The simplest way to avoid this is to write std::vector< ::X>,
|
|
|
|
i.e. place a space between the opening angle bracket and the
|
2003-10-18 15:54:13 +04:00
|
|
|
scope operator.
|
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
Common problems when upgrading the compiler
|
|
|
|
|
|
|
|
ABI changes
|
2003-10-18 15:54:13 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The application binary interface (ABI) defines how the elements of
|
2004-02-10 15:56:21 +03:00
|
|
|
classes are laid out, how functions are called, how function names are
|
|
|
|
mangled etc. It usually changes with each major release (i.e. when the
|
2004-03-01 10:27:18 +03:00
|
|
|
first or second part of the version number changes). You must
|
|
|
|
recompile all C++ libraries, or you risk linker errors or
|
|
|
|
malfunctioning programs. However, the ABI is not changed with bug-fix
|
2004-02-10 15:56:21 +03:00
|
|
|
releases (i.e. when the third part of the version number changes). The
|
|
|
|
code should be binary compatible among these versions.
|
2003-10-18 15:54:13 +04:00
|
|
|
|
2004-02-10 15:56:21 +03:00
|
|
|
Standard conformance
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
With each release, we try to make G++ conform closer to the ISO C++
|
|
|
|
standard (available at [34]http://www.ncits.org/cplusplus.htm). We
|
|
|
|
have also implemented some of the core and library defect reports
|
2003-10-18 15:54:13 +04:00
|
|
|
(available at
|
2004-03-01 10:27:18 +03:00
|
|
|
[35]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html &
|
2003-10-18 15:54:13 +04:00
|
|
|
[36]http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html
|
|
|
|
respectively).
|
2004-02-10 15:56:21 +03:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Non-conforming legacy code that worked with older versions of GCC may
|
|
|
|
be rejected by more recent compilers. There is no command-line switch
|
|
|
|
to ensure compatibility in general, because trying to parse
|
|
|
|
standard-conforming and old-style code at the same time would render
|
|
|
|
the C++ frontend unmaintainable. However, some non-conforming
|
|
|
|
constructs are allowed when the command-line option -fpermissive is
|
2004-02-10 15:56:21 +03:00
|
|
|
used.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
Two milestones in standard conformance are GCC 3.0 (including a major
|
2004-02-10 15:56:21 +03:00
|
|
|
overhaul of the standard library) and the upcoming 3.4.0 version (with
|
|
|
|
its new C++ parser).
|
|
|
|
|
|
|
|
New in GCC 3.0
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
* The standard library is much more conformant, and uses the std::
|
2004-02-10 15:56:21 +03:00
|
|
|
namespace (which is now a real namespace, not an alias for ::).
|
2003-10-18 15:54:13 +04:00
|
|
|
* The standard header files for the c library don't end with .h, but
|
|
|
|
begin with c (i.e. <cstdlib> rather than <stdlib.h>). The .h names
|
|
|
|
are still available, but are deprecated.
|
|
|
|
* <strstream> is deprecated, use <sstream> instead.
|
2004-03-01 10:27:18 +03:00
|
|
|
* streambuf::seekoff & streambuf::seekpos are private, instead use
|
2003-10-18 15:54:13 +04:00
|
|
|
streambuf::pubseekoff & streambuf::pubseekpos respectively.
|
|
|
|
* If std::operator << (std::ostream &, long long) doesn't exist, you
|
|
|
|
need to recompile libstdc++ with --enable-long-long.
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
If you get lots of errors about things like cout not being found,
|
2004-02-10 15:56:21 +03:00
|
|
|
you've most likely forgotten to tell the compiler to look in the std::
|
|
|
|
namespace. There are several ways to do this:
|
|
|
|
* Say std::cout at the call. This is the most explicit way of saying
|
|
|
|
what you mean.
|
2004-03-01 10:27:18 +03:00
|
|
|
* Say using std::cout; somewhere before the call. You will need to
|
|
|
|
do this for each function or type you wish to use from the
|
2003-10-18 15:54:13 +04:00
|
|
|
standard library.
|
2004-03-01 10:27:18 +03:00
|
|
|
* Say using namespace std; somewhere before the call. This is the
|
|
|
|
quick-but-dirty fix. This brings the whole of the std:: namespace
|
|
|
|
into scope. Never do this in a header file, as every user of your
|
2004-02-10 15:56:21 +03:00
|
|
|
header file will be affected by this decision.
|
|
|
|
|
|
|
|
New in GCC 3.4.0
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
The new parser brings a lot of improvements, especially concerning
|
2004-02-10 15:56:21 +03:00
|
|
|
name-lookup.
|
2004-03-01 10:27:18 +03:00
|
|
|
* The "implicit typename" extension got removed (it was already
|
|
|
|
deprecated since GCC 3.1), so that the following code is now
|
2004-02-10 15:56:21 +03:00
|
|
|
rejected, see [14.6]:
|
|
|
|
|
|
|
|
template <typename> struct A
|
|
|
|
{
|
|
|
|
typedef int X;
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T> struct B
|
|
|
|
{
|
|
|
|
A<T>::X x; // error
|
|
|
|
typename A<T>::X y; // OK
|
|
|
|
};
|
|
|
|
|
|
|
|
B<void> b;
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
* For similar reasons, the following code now requires the template
|
2004-02-10 15:56:21 +03:00
|
|
|
keyword, see [14.2]:
|
|
|
|
|
|
|
|
template <typename> struct A
|
|
|
|
{
|
|
|
|
template <int> struct X {};
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T> struct B
|
|
|
|
{
|
|
|
|
typename A<T>::X<0> x; // error
|
|
|
|
typename A<T>::template X<0> y; // OK
|
|
|
|
};
|
|
|
|
|
|
|
|
B<void> b;
|
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
* We now have two-stage name-lookup, so that the following code is
|
2004-02-10 15:56:21 +03:00
|
|
|
rejected, see [14.6]/9:
|
|
|
|
|
|
|
|
template <typename T> int foo()
|
|
|
|
{
|
|
|
|
return i; // error
|
|
|
|
}
|
|
|
|
|
|
|
|
* This also affects members of base classes, see [14.6.2]:
|
|
|
|
|
|
|
|
template <typename> struct A
|
|
|
|
{
|
|
|
|
int i, j;
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T> struct B : A<T>
|
|
|
|
{
|
|
|
|
int foo1() { return i; } // error
|
|
|
|
int foo2() { return this->i; } // OK
|
|
|
|
int foo3() { return B<T>::i; } // OK
|
|
|
|
int foo4() { return A<T>::i; } // OK
|
|
|
|
|
|
|
|
using A<T>::j;
|
|
|
|
int foo5() { return j; } // OK
|
|
|
|
};
|
2003-10-18 15:54:13 +04:00
|
|
|
|
2004-03-01 10:27:18 +03:00
|
|
|
In addition to the problems listed above, the manual contains a
|
2003-10-18 15:54:13 +04:00
|
|
|
section on [37]Common Misunderstandings with GNU C++.
|
2003-07-25 13:04:06 +04:00
|
|
|
|
|
|
|
References
|
|
|
|
|
|
|
|
1. http://gcc.gnu.org/bugs.html
|
|
|
|
2. http://gcc.gnu.org/bugs.html#report
|
|
|
|
3. http://gcc.gnu.org/bugs.html#need
|
|
|
|
4. http://gcc.gnu.org/bugs.html#dontwant
|
|
|
|
5. http://gcc.gnu.org/bugs.html#where
|
|
|
|
6. http://gcc.gnu.org/bugs.html#detailed
|
|
|
|
7. http://gcc.gnu.org/bugs.html#gnat
|
|
|
|
8. http://gcc.gnu.org/bugs.html#pch
|
|
|
|
9. http://gcc.gnu.org/bugs.html#known
|
2003-10-18 15:54:13 +04:00
|
|
|
10. http://gcc.gnu.org/bugs.html#cxx
|
2004-02-10 15:56:21 +03:00
|
|
|
11. http://gcc.gnu.org/bugs.html#missing
|
|
|
|
12. http://gcc.gnu.org/bugs.html#fixed34
|
|
|
|
13. http://gcc.gnu.org/bugs.html#fortran
|
|
|
|
14. http://gcc.gnu.org/bugs.html#nonbugs
|
|
|
|
15. http://gcc.gnu.org/bugs.html#nonbugs_general
|
|
|
|
16. http://gcc.gnu.org/bugs.html#nonbugs_c
|
|
|
|
17. http://gcc.gnu.org/bugs.html#nonbugs_cxx
|
|
|
|
18. http://gcc.gnu.org/bugs.html#upgrading
|
|
|
|
19. http://gcc.gnu.org/bugs.html#known
|
|
|
|
20. http://gcc.gnu.org/bugzilla/
|
|
|
|
21. mailto:gcc-bugs@gcc.gnu.org
|
|
|
|
22. http://gcc.gnu.org/bugs.html#gnat
|
|
|
|
23. http://gcc.gnu.org/bugs.html#pch
|
|
|
|
24. http://gcc.gnu.org/bugs.html#detailed
|
|
|
|
25. http://gcc.gnu.org/bugs.html#where
|
|
|
|
26. http://gcc.gnu.org/bugs.html#detailed
|
2003-10-18 15:54:13 +04:00
|
|
|
27. http://gcc.gnu.org/bugs.html#detailed
|
2004-02-10 15:56:21 +03:00
|
|
|
28. http://gcc.gnu.org/bugs.html#new34
|
2003-10-18 15:54:13 +04:00
|
|
|
29. http://gcc.gnu.org/onlinedocs/g77/Trouble.html
|
|
|
|
30. http://gcc.gnu.org/PR323
|
|
|
|
31. http://www.validlab.com/goldberg/paper.ps
|
|
|
|
32. http://mail-index.NetBSD.org/tech-kern/2003/08/11/0001.html
|
2004-02-10 15:56:21 +03:00
|
|
|
33. http://www.gnu.org/software/libc/
|
2003-10-18 15:54:13 +04:00
|
|
|
34. http://www.ncits.org/cplusplus.htm
|
|
|
|
35. http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_defects.html
|
|
|
|
36. http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html
|
|
|
|
37. http://gcc.gnu.org/onlinedocs/gcc/C---Misunderstandings.html
|