tags 356439 +patch
thanks

In standard C++, friend functions that are only declared inside a class
can only be found by argument-dependent lookup (and can only be defined
inline, though it's not a syntax error to fail to do so!)

The attached patch fixes the compilation errors.

Ben.

-- 
Ben Hutchings
Teamwork is essential - it allows you to blame someone else.
diff -ur cmix-2.0.12.orig/src/analyzer/diagnostic.h cmix-2.0.12/src/analyzer/diagnostic.h
--- cmix-2.0.12.orig/src/analyzer/diagnostic.h	1999-10-20 22:53:20.000000000 +0000
+++ cmix-2.0.12/src/analyzer/diagnostic.h	2006-03-12 02:33:16.000000000 +0000
@@ -46,6 +46,11 @@
 // file_names.
 //
 
+class Position;
+
+// Position outputs itself with a trailing space.
+ostream& operator<<(ostream&,Position);
+
 class Position {
     friend class LexerTracker ;
     static const char* intern(const char*);
@@ -61,9 +66,6 @@
     friend ostream& operator<<(ostream&,Position);
 };
 
-// Position outputs itself with a trailing space.
-ostream& operator<<(ostream&,Position);
-
 //--------------------------------------------------------------
 // class PositionInUnion
 //
diff -ur cmix-2.0.12.orig/src/analyzer/fixiter.h cmix-2.0.12/src/analyzer/fixiter.h
--- cmix-2.0.12.orig/src/analyzer/fixiter.h	1999-06-18 16:02:44.000000000 +0000
+++ cmix-2.0.12/src/analyzer/fixiter.h	2006-03-12 02:35:49.000000000 +0000
@@ -67,6 +67,8 @@
 
 class FixpointSolver ;
 
+bool Fixpoint_lesseq(yg_datum,yg_datum) ;
+
 class FixpointPureVertex : public Numbered {
   friend class FixpointSolver ;
   friend bool Fixpoint_lesseq(yg_datum,yg_datum) ;
diff -ur cmix-2.0.12.orig/src/analyzer/gegen.h cmix-2.0.12/src/analyzer/gegen.h
--- cmix-2.0.12.orig/src/analyzer/gegen.h	2000-08-11 19:01:56.000000000 +0000
+++ cmix-2.0.12/src/analyzer/gegen.h	2006-03-12 02:34:21.000000000 +0000
@@ -23,6 +23,9 @@
 //  F O R   C A S C A D E S
 //                                                             gg-cascades.cc
 
+class ForCascade ;
+GegenStream &operator<<(GegenStream &,ForCascade const&) ;
+
 class ForCascade {
   unsigned depth ;
   unsigned indent ;
@@ -115,6 +118,13 @@
 #define AbstractDecl(t) EmitType(t,"",constvol())
 #define Unqualified(t,mt) EmitType(t,mt,constvol())
 
+class GegenStream ;
+void enter(GegenStream*) ;
+void userhole(GegenStream*) ;
+void exit(GegenStream*) ;
+void alwayscode(GegenStream*) ;
+void poptype(GegenStream*) ;
+
 class GegenStream {
   ostream &ost ;
   BTresult const &bt ;
diff -ur cmix-2.0.12.orig/src/analyzer/options.h cmix-2.0.12/src/analyzer/options.h
--- cmix-2.0.12.orig/src/analyzer/options.h	2000-04-05 16:12:17.000000000 +0000
+++ cmix-2.0.12/src/analyzer/options.h	2006-03-12 02:32:33.000000000 +0000
@@ -26,6 +26,7 @@
 void handleBasenameOption(const char *arg);
 
 void parse_options(int, char *const*);
+void ParseDebugOpt(const char*);
 
 void banner(ostream&);
 void handleNonOption(const char *arg);
diff -ur cmix-2.0.12.orig/src/analyzer/output.h cmix-2.0.12/src/analyzer/output.h
--- cmix-2.0.12.orig/src/analyzer/output.h	1999-10-13 16:19:02.000000000 +0000
+++ cmix-2.0.12/src/analyzer/output.h	2006-03-12 02:34:50.000000000 +0000
@@ -73,6 +73,10 @@
     };
 */
 
+class Output;
+Output* oconcat(Output*,Output*);
+Output* oconcat(const Output*,const Output*);
+
 class Output {
 public:
     enum Mark { Block,
@@ -150,6 +154,4 @@
     void do_export(ostream&) const;
 };
 
-Output* oconcat(Output*,Output*);
-
 #endif
diff -ur cmix-2.0.12.orig/src/analyzer/ygtree.h cmix-2.0.12/src/analyzer/ygtree.h
--- cmix-2.0.12.orig/src/analyzer/ygtree.h	1999-11-09 14:33:13.000000000 +0000
+++ cmix-2.0.12/src/analyzer/ygtree.h	2006-03-12 02:35:25.000000000 +0000
@@ -81,6 +81,10 @@
     void put(yg_datum) const;
 } ;
 
+#ifdef YG_STATISTICS
+void ygtree_statistics() ;
+#endif
+
 class yg_tree {
     friend class yg_iterator ;
     unsigned long version ;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to