From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/compiler.html | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 reference/C/compiler.html (limited to 'reference/C/compiler.html') diff --git a/reference/C/compiler.html b/reference/C/compiler.html new file mode 100644 index 0000000..ad6f3d8 --- /dev/null +++ b/reference/C/compiler.html @@ -0,0 +1,170 @@ +GCC compiler error messages. + + + + + + +
+
+

GCC compiler error messages.

+
+
+

+ +This is a list of compiler error messages I have hit and the method used +to clear them. + +

+


+ +
warning: comparison between pointer and integer
+Maybe OK. This was generated from 'if (strstr(line,"word") != NULL )' +strstr returns NULL or pointers, I was only interested in the fact that a +string had been found, not where it was. + +

+


+ +
`floppyto.c:782: parse error at end of input
+floppyto.c is the program name, 782 is the line number but it is one +greater then the file length. This is because of unbalanced {} or unbalanced +comments /* */ + +

+


+ +
parse error before `printf'
+Missing ; before this statement. + +

+


+ +
Segmentation error.
+You have attempted to access protected storage or overwritten something +important! + +

+


+ +
subscripted value is neither array nor pointer
+Attempted to subscript a scalar variable. + +

+


+ +
`j' undeclared (first use this function)
+Declare the variable. + +

+


+ +
/usr/lib/crt0.o: Undefined symbol _main referenced from text segment
+ +Generated when main() is missing. I have seen this twice. +
    +
  1. When there was a syntax error in an included header file. +
  2. And when the C source file was missing in the gcc command! +
+ +

+


+ +
Undefined symbol _initscr referenced from text segment
+Called a function but have not supplied it or the library +that contains it with an #include statement. + +

+


+ +
unterminated `#if' conditional
+#endif preprocessor required. + +

+


+ +
warning: passing arg 1 of `cpystr' makes integer from pointer
+without a cast
+
+This is the code causing the problem: +
+void cpystr( char item);
+main()
+{
+   char src[]="martin leslie";
+   cpystr(src);
+}
+   cpystr(char item)
+{
+}
+
+ +It should be.... + +
+void cpystr( char item[]);
+main()
+{
+   char src[]="martin leslie";
+   cpystr(src);
+}
+   cpystr(char item[])
+{
+}
+
+ +

+


+ +
+conflicting types for `Alex'
+previous declaration of `Alex'
+
+ +Alex has been declared in two enum +statements. Here is the code + + +

+


+ +
+parse error before `1'
+At top level:
+warning: data definition has no type or storage class
+parse error before string constant
+warning: data definition has no type or storage class
+
+ +There is a conflict between +enum +and +#define +statements. +Here is the code + +

+


+

+ +

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ -- cgit v1.2.3-54-g00ecf