[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] compile failure with recent versions



Vasil,

./docmsgs.h: In constructor `DocChangingMsg::DocChangingMsg(Document*, DocChangingMsg::DocState)':
./docmsgs.h:163: warning: `DocChangingMsg::pChangingDoc' will be initialized after
./docmsgs.h:160: warning:   `DocChangingMsg::DocState DocChangingMsg::State'
./docmsgs.h:171: warning:   when initialized here
./docmsgs.h: In constructor `DocChangingMsg::DocChangingMsg(Document*, Document*, DocChangingMsg::DocState)':
./docmsgs.h:167: warning: `DocChangingMsg::pNewDoc' will be initialized after
./docmsgs.h:160: warning:   `DocChangingMsg::DocState DocChangingMsg::State'
./docmsgs.h:174: warning:   when initialized here

That one is distinctly odd. The warning comes when you do not initialize
members in the same order as the constructor. I don't see the warnings
at all. The code is (with comments removed for readability):

	Document* pChangingDoc;
	Document* pOldDoc;
	Document* pNewDoc;
	DocState  State;
	DocChangingMsg(Document* pdoc, DocState state)
	  : pChangingDoc(pdoc), pOldDoc(NULL),
	    pNewDoc(NULL), State(state) { /* empty */ }

	DocChangingMsg(Document* pThisOldDoc, Document* pThisNewDoc,
                       DocState state)
	  : pChangingDoc(NULL), pOldDoc(pThisOldDoc),
            pNewDoc(pThisNewDoc), State(state) { /* empty */ }

As far as I can tell, they /are/ in the right order. This looks like
a compiler problem to me. gcc version? It is, on the other hand,
only a warning (and if I remember, only significant when there
are static members).

localenv.cpp: In static member function `static void LocalEnvironment::GetNumberOfDecimalPlaces(UINT32*)':
localenv.cpp:150: error: `FRAC_DIGITS' undeclared (first use this function)
localenv.cpp:150: error: (Each undeclared identifier is reported only once for each function it appears in.)
localenv.cpp:150: error: `nl_langinfo' undeclared (first use this function)
localenv.cpp: In static member function `static void LocalEnvironment::GetThousandsSeparator(StringBase*)':
localenv.cpp:187: error: `THOUSANDS_SEP' undeclared (first use this function)
localenv.cpp:187: error: `nl_langinfo' undeclared (first use this function)
localenv.cpp: In static member function `static void LocalEnvironment::GetDecimalPointChar(StringBase*)':
localenv.cpp:221: error: `DECIMAL_POINT' undeclared (first use this function)
localenv.cpp:221: error: `nl_langinfo' undeclared (first use this function)

See Luke's langinfo.h advice.

Alex