|
| 1 | +# -*- org -*- |
| 2 | +#+CATEGORY: gccintro |
| 3 | + |
| 4 | +* Changes in GCC 4 |
| 5 | + |
| 6 | +compile time computation of constants affects quite a few examples: |
| 7 | + |
| 8 | +calc.c - fixed |
| 9 | +badpow.c |
| 10 | + |
| 11 | +* Updates for gcc 4.3 |
| 12 | + |
| 13 | +On other hand I've been testing examples of code. I'm using gcc 4.3 to do |
| 14 | +it. I've found more discrepances: |
| 15 | + |
| 16 | +** TODO Page 23 I can execute ./a.out without problems. |
| 17 | +** TODO One observation in page 43 is that only when ulimit -c unlimited |
| 18 | +is executed appears the core file. Another observation, in the chapter |
| 19 | +9 the tells about the number of version, we can update it. |
| 20 | +** TODO Pag 73: with "gcc -Wall -fsigned-char signed.c doesn't appear warnings |
| 21 | +** TODO Pag 77: there are error in gcc -Wall -g loop.c, I can't execute ./a.out |
| 22 | +** DONE Pag 91: I've updated some option in ld command: |
| 23 | +ld -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o |
| 24 | +/usr/lib/gcc/i486-linux-gnu/4.3/crtbegin.o -L/usr/lib/gcc/i486-linux-gnu/4.3 |
| 25 | +hello.o -lgcc -lgcc_eh -lc /usr/lib/gcc/i486-linux-gnu/4.3/crtend.o |
| 26 | +/usr/lib/crtn.o |
| 27 | +** TODO Pag 95: I'd include the strings command in this chapter. |
| 28 | +** TODO Pag 98: I've troubles to reproduce these error messages... |
| 29 | +** DONE Pages 53, 54 the source file is optim.c instead of test.c. |
| 30 | + CLOSED: [2009-06-03 mié 14:19] |
| 31 | +** File naming scheme |
| 32 | +These are controlled by the makeexamples.pl script, maybe we need a |
| 33 | +better scheme (perhaps using some kind of annotation in the file to |
| 34 | +indicate the correct filename) |
| 35 | +*** Pag 71: exists fptest2.c instead of fptest.c |
| 36 | +*** Pag 82,83: exist main3.c instead of main.c |
| 37 | +*** Pag 76: In examples-1.1/09 doesn't exist hello.c |
| 38 | +*** Pag 95: examples-1.1/12 doesn't exist |
| 39 | + |
| 40 | +* TODO Highlight important changes in release notes |
| 41 | +Another task you could do is to check all the changes in gcc-4 |
| 42 | +relevant to the book. |
| 43 | + |
| 44 | +They are documented in the following pages: |
| 45 | + |
| 46 | + http://gcc.gnu.org/gcc-4.0/changes.html |
| 47 | + http://gcc.gnu.org/gcc-4.1/changes.html |
| 48 | + http://gcc.gnu.org/gcc-4.2/changes.html |
| 49 | + http://gcc.gnu.org/gcc-4.3/changes.html |
| 50 | + http://gcc.gnu.org/gcc-4.3/porting_to.html |
| 51 | + |
| 52 | +which I've downloaded and put in the bzr repository in the changes/ |
| 53 | +subdirectory. |
| 54 | + |
| 55 | +! What you could do is edit the files and highlight the important |
| 56 | +! sections, e.g. by marking the start of the relevant lines (like this |
| 57 | +! paragraph). The important sections are the major new features, |
| 58 | +! changes and incompatibilities that affect the subjects covered by |
| 59 | +! the book. |
| 60 | + |
| 61 | +The changes I am interested in are: |
| 62 | + |
| 63 | + - EITHER a new feature of wide interest to general users and beginners |
| 64 | + - OR a change that is directly related to something in the book |
| 65 | + |
| 66 | +The "Caveats" and "Other significant improvements" sections are |
| 67 | +particularly important. You can ignore a lot of stuff: |
| 68 | + |
| 69 | + - The book doesn't cover java/fortran/ADA etc so these are irrelevant. |
| 70 | + - For C++ I only care if it affects something mentioned in the book |
| 71 | + (90% of changes related to the C++ language/library are therefore |
| 72 | + irrelevant) |
| 73 | + - I'm not interested interested in CPU specific changes unless |
| 74 | + specifically different from something in the book (e.g. x86 |
| 75 | + floating point) |
| 76 | + |
| 77 | +---------------------------------------------------------------------- |
| 78 | + |
| 79 | +* TODO Make a general web search for articles about GCC4 and its new features |
| 80 | + |
| 81 | +Restrict the search to articles published on reputable sites like |
| 82 | +Developerworks, LWN, O'Reilly and any others you can think of. |
| 83 | + |
| 84 | +Send me a list of any articles you find and also read them yourself. |
| 85 | + |
| 86 | +* TODO Scan the list archives for common errors and problems |
| 87 | +Scan the archives of the gcc-help mailing list for common errors |
| 88 | +reported by users since gcc4 was released (April 2005). I'd like a |
| 89 | +list of problems of interest to beginning users not covered in the |
| 90 | +book. |
| 91 | + |
| 92 | +Make a selection of months, and check all the messages in that month. |
| 93 | +There is no need to read every month. e.g. start with |
| 94 | + |
| 95 | +May 2005, May 2006, May 2007, May 2008, May 2009. |
| 96 | + |
| 97 | +For each month, create an entry in this file any links to the start of |
| 98 | +relevant threads and a 1-2 line description of what's interesting |
| 99 | +about it. |
| 100 | + |
| 101 | +You can find the archives in various formats at: |
| 102 | + |
| 103 | + http://gcc.gnu.org/ml/gcc-help/ |
| 104 | + http://dir.gmane.org/gmane.comp.gcc.help |
| 105 | + |
| 106 | +Note: a lot of things you can *ignore* are |
| 107 | + - GCC build/configuration issues |
| 108 | + - internal compiler errors |
| 109 | +(so there are a lot of messages you can skip). |
| 110 | + |
| 111 | +---------------------------------------------------------------------- |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | +* Brian's old notes |
| 116 | + not including a header file |
| 117 | +passing an argument of the incorrect type |
| 118 | +not turning on warnings |
| 119 | + |
| 120 | +not linking with the correct library |
| 121 | + |
| 122 | + |
| 123 | +warning: value computed is not used |
| 124 | +EXAMPLE; for (i = 0, i < 10; i++) |
| 125 | + |
| 126 | +instead of for (i = 0; i < 10; i++) |
| 127 | + |
| 128 | +forward.c:53: warning: assignment from incompatible pointer type |
| 129 | + |
| 130 | +---------------------------------------------------------------------- |
| 131 | + |
| 132 | +The best article is "Get to know GCC4" ( |
| 133 | +http://www.ibm.com/developerworks/linux/library/l-gcc4/index.html?S_TACT=105AGX01&S_CMP=LP). |
| 134 | +You've a summary of each release in the core changes, very useful. |
| 135 | + |
| 136 | +Tree SSA: A New Optimization Infrastructure for |
| 137 | +GCC<http://gcc.fyxm.net/summit/2003/Tree%20SSA%20-%20A%20New%20optimization%20infrastructure.pdf>, |
| 138 | +Autovectorization in |
| 139 | +GCC<ftp://gcc.gnu.org/pub/gcc/summit/2004/Autovectorization.pdf>and |
| 140 | +introduction |
| 141 | +to OpenMP <http://en.wikipedia.org/wiki/OpenMP> are interesting if you are |
| 142 | +excited with Get to know GCC4. |
| 143 | +Sun Studio 12 vs. GCC3 vs. GCC4 Benchmarks ( |
| 144 | +http://www.phoronix.com/scan.php?page=article&item=sun_studio_gcc&num=6) is |
| 145 | +a curious article to OpenSolaris users. Regards. |
0 commit comments