comparison gcc/doc/trouble.texi @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1 @c Copyright (C) 1988-2017 Free Software Foundation, Inc.
2 @c 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
3 @c Free Software Foundation, Inc.
4 @c This is part of the GCC manual. 2 @c This is part of the GCC manual.
5 @c For copying conditions, see the file gcc.texi. 3 @c For copying conditions, see the file gcc.texi.
6 4
7 @node Trouble 5 @node Trouble
8 @chapter Known Causes of Trouble with GCC 6 @chapter Known Causes of Trouble with GCC
18 missing features that are too much work to add, and some are places 16 missing features that are too much work to add, and some are places
19 where people's opinions differ as to what is best. 17 where people's opinions differ as to what is best.
20 18
21 @menu 19 @menu
22 * Actual Bugs:: Bugs we will fix later. 20 * Actual Bugs:: Bugs we will fix later.
23 * Cross-Compiler Problems:: Common problems of cross compiling with GCC.
24 * Interoperation:: Problems using GCC with other compilers, 21 * Interoperation:: Problems using GCC with other compilers,
25 and with certain linkers, assemblers and debuggers. 22 and with certain linkers, assemblers and debuggers.
26 * Incompatibilities:: GCC is incompatible with traditional C. 23 * Incompatibilities:: GCC is incompatible with traditional C.
27 * Fixed Headers:: GCC uses corrected versions of system header files. 24 * Fixed Headers:: GCC uses corrected versions of system header files.
28 This is necessary, but doesn't always work smoothly. 25 This is necessary, but doesn't always work smoothly.
29 * Standard Libraries:: GCC uses the system C library, which might not be 26 * Standard Libraries:: GCC uses the system C library, which might not be
30 compliant with the ISO C standard. 27 compliant with the ISO C standard.
31 * Disappointments:: Regrettable things we can't change, but not quite bugs. 28 * Disappointments:: Regrettable things we cannot change, but not quite bugs.
32 * C++ Misunderstandings:: Common misunderstandings with GNU C++. 29 * C++ Misunderstandings:: Common misunderstandings with GNU C++.
33 * Non-bugs:: Things we think are right, but some others disagree. 30 * Non-bugs:: Things we think are right, but some others disagree.
34 * Warnings and Errors:: Which problems in your code get warnings, 31 * Warnings and Errors:: Which problems in your code get warnings,
35 and which get errors. 32 and which get errors.
36 @end menu 33 @end menu
42 @item 39 @item
43 The @code{fixincludes} script interacts badly with automounters; if the 40 The @code{fixincludes} script interacts badly with automounters; if the
44 directory of system header files is automounted, it tends to be 41 directory of system header files is automounted, it tends to be
45 unmounted while @code{fixincludes} is running. This would seem to be a 42 unmounted while @code{fixincludes} is running. This would seem to be a
46 bug in the automounter. We don't know any good way to work around it. 43 bug in the automounter. We don't know any good way to work around it.
47 @end itemize
48
49 @node Cross-Compiler Problems
50 @section Cross-Compiler Problems
51
52 You may run into problems with cross compilation on certain machines,
53 for several reasons.
54
55 @itemize @bullet
56 @item
57 At present, the program @file{mips-tfile} which adds debug
58 support to object files on MIPS systems does not work in a cross
59 compile environment.
60 @end itemize 44 @end itemize
61 45
62 @node Interoperation 46 @node Interoperation
63 @section Interoperation 47 @section Interoperation
64 48
85 69
86 @item 70 @item
87 On some BSD systems, including some versions of Ultrix, use of profiling 71 On some BSD systems, including some versions of Ultrix, use of profiling
88 causes static variable destructors (currently used only in C++) not to 72 causes static variable destructors (currently used only in C++) not to
89 be run. 73 be run.
90
91 @item
92 On some SGI systems, when you use @option{-lgl_s} as an option,
93 it gets translated magically to @samp{-lgl_s -lX11_s -lc_s}.
94 Naturally, this does not happen when you use GCC@.
95 You must specify all three options explicitly.
96 74
97 @item 75 @item
98 On a SPARC, GCC aligns all values of type @code{double} on an 8-byte 76 On a SPARC, GCC aligns all values of type @code{double} on an 8-byte
99 boundary, and it expects every @code{double} to be so aligned. The Sun 77 boundary, and it expects every @code{double} to be so aligned. The Sun
100 compiler usually gives @code{double} values 8-byte alignment, with one 78 compiler usually gives @code{double} values 8-byte alignment, with one
696 does not conform to the standard: @command{g++} reports as undefined 674 does not conform to the standard: @command{g++} reports as undefined
697 symbols any static data members that lack definitions. 675 symbols any static data members that lack definitions.
698 676
699 677
700 @node Name lookup 678 @node Name lookup
701 @subsection Name lookup, templates, and accessing members of base classes 679 @subsection Name Lookup, Templates, and Accessing Members of Base Classes
702 680
703 @cindex base class members 681 @cindex base class members
704 @cindex two-stage name lookup 682 @cindex two-stage name lookup
705 @cindex dependent name lookup 683 @cindex dependent name lookup
706 684
763 741
764 In @code{get_i()}, @code{i} is not used in a dependent context, so the 742 In @code{get_i()}, @code{i} is not used in a dependent context, so the
765 compiler will look for a name declared at the enclosing namespace scope 743 compiler will look for a name declared at the enclosing namespace scope
766 (which is the global scope here). It will not look into the base class, 744 (which is the global scope here). It will not look into the base class,
767 since that is dependent and you may declare specializations of 745 since that is dependent and you may declare specializations of
768 @code{Base} even after declaring @code{Derived}, so the compiler can't 746 @code{Base} even after declaring @code{Derived}, so the compiler cannot
769 really know what @code{i} would refer to. If there is no global 747 really know what @code{i} would refer to. If there is no global
770 variable @code{i}, then you will get an error message. 748 variable @code{i}, then you will get an error message.
771 749
772 In order to make it clear that you want the member of the base class, 750 In order to make it clear that you want the member of the base class,
773 you need to defer lookup until instantiation time, at which the base 751 you need to defer lookup until instantiation time, at which the base