r889 - trunk

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Sun Sep 19 11:32:41 PDT 2004


Author: tushar
Date: 2004-09-19 12:32:39 -0600 (Sun, 19 Sep 2004)
New Revision: 889

Modified:
   trunk/errors.txt
Log:
Updated Hint: errors

Modified: trunk/errors.txt
===================================================================
--- trunk/errors.txt	2004-09-19 18:32:03 UTC (rev 888)
+++ trunk/errors.txt	2004-09-19 18:32:39 UTC (rev 889)
@@ -52,7 +52,7 @@
                                                   , Compiling (gcc) ...
                               , ... not found ---<- Dependencies (depmod)
           Compile-time Error < -,                   ` Linking (ld)
-        /                     `. `- label at end*
+        /                     `. `- gcc-3.4.x*
        /                        \
 Error <                          Segfault
        `.                     ,'
@@ -61,7 +61,8 @@
                                         ` Prog 
         				  only
 ____
-* gcc-3.4 and later don't accept labels at the end of compound statements
+* gcc-3.4 and later don't accept labels at the end of compound statements 
+  nor the usage of protected functions from within other files.
 
 That looks pretty simple, eh? But that is only the beginning. We will have a 
 look at each of these error types closely!
@@ -230,8 +231,14 @@
 are compiling the modules with the same compiler as you used when compiling the
 kernel.
 
-1.2 Label at the end of compound statement
+1.2 gcc-3.4.x
 
+The version 3.4.x introduces some new errors, which compiled fine using earlier 
+version of the same compiler. Instead of resorting to an older version, it 
+should be easier to fix them.
+
+1.2.1 gcc-3.4.x: label at the end of compound statement
+
 Since gcc-3.4.x, labels at the end of a compound statement are treated as 
 errors, though they are widely used in spite of their scruffyness. Certainly 
 this problem is easily solved: just replace the ocurrences of
@@ -242,8 +249,26 @@
 
   return;
 
-and remove the label from the source or comment it out.
+and remove the label from the source or comment it out. As a rule, avoid goto 
+statements in your C code.
 
+1.2.2 gcc-3.4.x: protected functions
+
+The message
+
+  Error: `foo::bar function(pointer*)' is protected
+
+shows that somewhere in the code there is a function prefixed with
+
+  protected:
+
+Though this has a meaning, it stops our application from compiling, so we can
+easily comment this out:
+
+  // protected:
+
+and continue the compilation.
+
 1.3 Segmentation Fault
 
 This is most annoying. It means an application tries to get something from a 
@@ -382,6 +407,9 @@
     * Minor corrections, added gcc-3.4 inability to accept labels at the end of
       a compound statement and it's solution.
 
+  [2004-09-08]
+    * Another minor corrections plus gcc-3.4 stuff about protected functions.
+
 CREDITS:
 Thanks to teemu for reminding me on "-I" and "-l" as much as Tushar for the 
 warning about warnings and ringing the bell of the "-w" option, not to




More information about the hints mailing list