1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
diff -uNr a/doc/FAQ b/doc/FAQ
--- a/doc/FAQ 2010-12-27 04:55:02.000000000 -0500
+++ b/doc/FAQ 2012-04-07 15:52:33.787036254 -0400
@@ -34,6 +34,7 @@
Q 2.6 Why does the include file name have the complete path name?
Q 2.7 Why does the include file name have the wrong path name?
Q 2.8 Why does cxref put in links to system include files?
+Q 2.9 Why does xcref segfault processing some old K&R source files?
--------------------
@@ -293,6 +294,35 @@
Since cxref uses gcc for the pre-processing, this option can be passed through
using 'cxref file.c -- -isystem DIRNAME'.
+--------------------
+
+Q 2.9 Why does xcref segfault processing some old K&R source files?
+
+Quite possibly this is due a known issue with K&R function definitions that
+include a function pointer as an argument. To attempt a fix for this in the
+parser this might likely break something else in the parser.
+Here is an example:
+
+int
+caller (s1, s2, comp)
+char *s1;
+char *s2;
+int (*comp)(void*,void*);
+{
+/*....*/
+}
+
+Change to ansi C syntax, such as:
+
+int
+caller (char *s1, char *s2, int (*comp)(void*,void*))
+{
+/*...*/
+}
+
+Now, barring syntax errors else where in the source file, this should parse
+without problems.
+
--------------------------------------------------------------------------------
Section 3 - How to make cxref do what you want
|