]> git.lyx.org Git - features.git/commitdiff
make lyx compile with gcc 3.4. remove some warnings.
authorLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 18 Jul 2003 08:46:00 +0000 (08:46 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 18 Jul 2003 08:46:00 +0000 (08:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7314 a592a061-630c-0410-9148-cb99ea01b6c8

21 files changed:
boost/ChangeLog
boost/boost/config/compiler/gcc.hpp
boost/libs/regex/src/c_regex_traits.cpp
boost/libs/regex/src/cpp_regex_traits.cpp
config/ChangeLog
config/lyxinclude.m4
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlDialog.tmpl
src/frontends/controllers/ControlGraphics.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QDialogView.h
src/frontends/qt2/Qt2Base.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormDialogView.h
src/mathed/ChangeLog
src/mathed/math_parser.C
src/support/BoostFormat.h
src/support/ChangeLog
src/tex2lyx/ChangeLog
src/tex2lyx/texparser.C

index 1ff319a6379dc660e7b7985fb61d08de004d21a0..dfe2e52813df520a1f8d80330685bf31d821fdc0 100644 (file)
@@ -1,3 +1,13 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * libs/regex/src/cpp_regex_traits.cpp (message_data): cast to safe
+       types 
+
+       * libs/regex/src/c_regex_traits.cpp (do_update_ctype): cast to
+       safe types.
+
+       * boost/config/compiler/gcc.hpp: allow for gcc 2.4
+
 2003-05-01  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * boost/type_traits/detail/wrap.hpp: add file
index 168ee9c548bb925b41a0d25d131240f9c9015083..3b5c5d02fc6aec2e63aa47ee40dc2e3663696ca7 100644 (file)
@@ -59,7 +59,7 @@
 #endif
 //
 // last known and checked version is 3.2:
-#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3))
+#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 4))
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
index 1b1bcdd9e5dd4105b949c7866a6cddb30182c569..1ca5f8b52a90e2c722c3ad1a48b57358f3f7cb49 100644 (file)
@@ -8,11 +8,11 @@
  * provided that the above copyright notice appear in all copies and
  * that both that copyright notice and this permission notice appear
  * in supporting documentation.  Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.  
+ * about the suitability of this software for any purpose.
  * It is provided "as is" without express or implied warranty.
  *
  */
+
  /*
   *   LOCATION:    see http://www.boost.org for most recent version.
   *   FILE         c_regex_traits.cpp
@@ -514,9 +514,9 @@ void BOOST_REGEX_CALL c_traits_base::do_update_ctype()
       if(std::isxdigit(i))
          class_map[i] |= char_class_xdigit;
    }
-   class_map['_'] |= char_class_underscore;
-   class_map[' '] |= char_class_blank;
-   class_map['\t'] |= char_class_blank;
+   class_map[(unsigned char)('_')] |= char_class_underscore;
+   class_map[(unsigned char)(' ')] |= char_class_blank;
+   class_map[(unsigned char)('\t')] |= char_class_blank;
    for(i = 0; i < map_size; ++i)
    {
       lower_case_map[i] = (char)std::tolower(i);
@@ -1068,6 +1068,3 @@ std::size_t BOOST_REGEX_CALL c_regex_traits<wchar_t>::strwiden(wchar_t *s1, std:
 #endif // BOOST_NO_WREGEX
 
 } // namespace boost
-
-
-
index 0c89ad24462114bc263ba5130063401634c3a54a..a8f7c823a23a1f8795036d20b740c8c4e572ce8a 100644 (file)
@@ -8,11 +8,11 @@
  * provided that the above copyright notice appear in all copies and
  * that both that copyright notice and this permission notice appear
  * in supporting documentation.  Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.  
+ * about the suitability of this software for any purpose.
  * It is provided "as is" without express or implied warranty.
  *
  */
+
  /*
   *   LOCATION:    see http://www.boost.org for most recent version.
   *   FILE:        c_regex_traits.cpp
@@ -218,7 +218,7 @@ message_data<char>::message_data(const std::locale& l, const std::string& regex_
 #else
       BOOST_REGEX_NOEH_ASSERT(cat >= 0);
 #endif
-   } 
+   }
 #endif
    std::memset(syntax_map, cpp_regex_traits<char>::syntax_char, 256);
    unsigned i;
@@ -241,7 +241,7 @@ message_data<char>::message_data(const std::locale& l, const std::string& regex_
 #endif
       for(std::size_t j = 0; j < s.size(); ++j)
       {
-         syntax_map[s[j]] = (unsigned char)(i);
+         syntax_map[(unsigned char)s[j]] = (unsigned char)(i);
       }
    }
 
@@ -691,7 +691,7 @@ message_data<wchar_t>::message_data(const std::locale& l, const std::string& reg
 
    if((int)cat >= 0)
       msgs.close(cat);
-#endif      
+#endif
 }
 
 } // namespace re_detail
@@ -876,5 +876,3 @@ std::size_t BOOST_REGEX_CALL cpp_regex_traits<wchar_t>::strwiden(wchar_t *s1, st
 } // namespace boost
 
 #endif
-
-
index 9e902e038f743d07064c0e5b6c58e61dd131bd8d..8b23923fc260ed5de7efe380e7dcf63e62168ef5 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * lyxinclude.m4: add gcc 3.4
+
 2003-07-15  Angus Leeming  <leeming@lyx.org>
 
        * lyxinclude.m4: Do not pass the -Winline option to gcc.
index 396a701e93831d4c38d48cd5d280e4c715c41d23..f37f8f9c6b7813fb3eabe3466d7bd8956f5979ab 100644 (file)
@@ -211,6 +211,7 @@ if test x$GXX = xyes; then
       3.1*)    CXXFLAGS="$lyx_opt -finline-limit=500 -fno-exceptions";;
       3.2*)    CXXFLAGS="$lyx_opt -fno-exceptions";;
       3.3*)    CXXFLAGS="$lyx_opt -fno-exceptions";;
+      3.4*)    CXXFLAGS="$lyx_opt -fno-exceptions";;
       *)       CXXFLAGS="$lyx_opt";;
     esac
     if test x$enable_debug = xyes ; then
index b216c4de479051c29a465ac50b09fa380140cf35..e780b818e0887912b1c7810c140831bae6ffa3d2 100644 (file)
@@ -1,3 +1,12 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * ControlGraphics.C (dispatchParams): avoid some variable/function
+       shadowing.
+
+       * ControlDialog.tmpl (show): follow C++ rules more closely
+       (update): ditto
+       (hide): ditto
+
 2003-07-17  Angus Leeming  <leeming@lyx.org>
 
        * ControlChanges.h:
index 7135ac56f297250ce3d7456b30e330cb236075c2..ac9de2c99ea60e47632da278a05e4547774b3404 100644 (file)
@@ -27,13 +27,13 @@ ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
 template <class Base>
 void ControlDialog<Base>::show()
 {
-       if (isBufferDependent() && !bufferIsAvailable())
+       if (this->isBufferDependent() && !this->bufferIsAvailable())
                return;
 
-       connect();
+       this->connect();
 
        if (!dialog_built_) {
-               view().build();
+               this->view().build();
                dialog_built_ = true;
        }
 
@@ -43,17 +43,18 @@ void ControlDialog<Base>::show()
                return;
        }
 
-       bc().readOnly(bufferIsReadonly());
-       view().show();
+       this->bc().readOnly(this->bufferIsReadonly());
+       this->view().show();
 
        // The widgets may not be valid, so refresh the button controller
-       bc().refresh();
+       this->bc().refresh();
 }
 
+
 template <class Base>
 void ControlDialog<Base>::update()
 {
-       if (isBufferDependent() && !bufferIsAvailable())
+       if (this->isBufferDependent() && !this->bufferIsAvailable())
                return;
 
        setParams();
@@ -62,19 +63,20 @@ void ControlDialog<Base>::update()
                return;
        }
 
-       bc().readOnly(bufferIsReadonly());
-       view().update();
+       this->bc().readOnly(this->bufferIsReadonly());
+       this->view().update();
 
        // The widgets may not be valid, so refresh the button controller
-       bc().refresh();
+       this->bc().refresh();
 }
 
+
 template <class Base>
 void ControlDialog<Base>::hide()
 {
        this->emergency_exit_ = false;
        clearParams();
 
-       disconnect();
-       view().hide();
+       this->disconnect();
+       this->view().hide();
 }
index cd342c1ea6878ec5be9113a806439acddd5418d5..5671870de019f351f4d7cbe76770876baa32c4e3 100644 (file)
@@ -68,11 +68,11 @@ void ControlGraphics::clearParams()
 
 void ControlGraphics::dispatchParams()
 {
-       InsetGraphicsParams params(params());
+       InsetGraphicsParams tmp_params(params());
        // core requires absolute path during runtime
-       params.filename = MakeAbsPath(params.filename,
+       tmp_params.filename = MakeAbsPath(tmp_params.filename,
                kernel().buffer()->filePath());
-       string const lfun = InsetGraphicsMailer::params2string(params);
+       string const lfun = InsetGraphicsMailer::params2string(tmp_params);
        kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
 }
 
index 72c02a00587c5a2d1075d735a2f30996780d3f62..0699d1f47a323d3d2be95105d0f6c2f4c67b77d3 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * Qt2Base.h (controller): ditto
+
+       * QDialogView.h (controller): follow C++ rules more closely.
+
 2003-07-15  Juergen Spitzmueller  <j.spitzmueller@gmx.de>
 
        * QTabular.C:
index cf59c8fac525434854ef7edefe83cd150e601a52..8e79cd23a323ad76223435deef28d55321f3bb67 100644 (file)
@@ -167,14 +167,14 @@ QController<Controller, Base>::QController(Dialog & p, string const & t)
 template <class Controller, class Base>
 Controller & QController<Controller, Base>::controller()
 {
-       return static_cast<Controller &>(getController());
+       return static_cast<Controller &>(this->getController());
 }
 
 
 template <class Controller, class Base>
 Controller const & QController<Controller, Base>::controller() const
 {
-       return static_cast<Controller const &>(getController());
+       return static_cast<Controller const &>(this->getController());
 }
 
 
index 027911319f1485e35a55388626eaaa2055a9b2ed..6131f135040ffc83411e883c988dacf47d603cd8 100644 (file)
@@ -168,14 +168,14 @@ Qt2CB<Controller, Base>::Qt2CB(string const & t)
 template <class Controller, class Base>
 Controller & Qt2CB<Controller, Base>::controller()
 {
-       return static_cast<Controller &>(getController());
+       return static_cast<Controller &>(this->getController());
 }
 
 
 template <class Controller, class Base>
 Controller const & Qt2CB<Controller, Base>::controller() const
 {
-       return static_cast<Controller const &>(getController());
+       return static_cast<Controller const &>(this->getController());
 }
 
 
index 3470af1fc56556f22fb983432d0fb445cbbd11f3..4cf7a60a0365769d619a99459578c9d1d85e0b06 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * FormDialogView.h (controller): ditto
+
+       * FormBase.h (controller): follow C++ rules more closely.
+
 2003-07-16  Angus Leeming  <angus@localhost.localdomain>
 
        * FormDialogView.C (postMessage): remove preprocessor warning.
index bb0d481cade53fe549cc4765f9e9573270fc0e1f..6e4de184a08565206a794d267a2d6c0dae012a9b 100644 (file)
@@ -183,14 +183,14 @@ FormCB<Controller, Base>::FormCB(string const & t, bool allowResize)
 template <class Controller, class Base>
 Controller & FormCB<Controller, Base>::controller()
 {
-       return static_cast<Controller &>(getController());
+       return static_cast<Controller &>(this->getController());
 }
 
 
 template <class Controller, class Base>
 Controller const & FormCB<Controller, Base>::controller() const
 {
-       return static_cast<Controller const &>(getController());
+       return static_cast<Controller const &>(this->getController());
 }
 
 
index 30383241c4f087311caf2fb62814eebd80edd398..454c7ccb0eb03f0d10351111a001cd2e5ae19e70 100644 (file)
@@ -182,14 +182,14 @@ FormController<Controller, Base>::FormController(Dialog & p,
 template <class Controller, class Base>
 Controller & FormController<Controller, Base>::controller()
 {
-       return static_cast<Controller &>(getController());
+       return static_cast<Controller &>(this->getController());
 }
 
 
 template <class Controller, class Base>
 Controller const & FormController<Controller, Base>::controller() const
 {
-       return static_cast<Controller const &>(getController());
+       return static_cast<Controller const &>(this->getController());
 }
 
 
index bdad015eda48b705c7fb15a7e2f2075f733e7d63..546961bc1239172ede3a03ac9b3562460f470ad3 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * math_parser.C (catInit): dont use unprintable control chars in
+       source.
+
 2003-07-17  Angus Leeming  <leeming@lyx.org>
 
        * formulabase.C (localDispatch): return UNDISPATCHED for all
index 9ef17d6d3286e0db2d35c0bfa5c81c5281422e51..219db10b656b57ea877597bae6f8b9d90457f125 100644 (file)
@@ -160,7 +160,7 @@ void catInit()
        theCatcode[int('#')]  = catParameter;
        theCatcode[int('^')]  = catSuper;
        theCatcode[int('_')]  = catSub;
-       theCatcode[int('\7f')] = catIgnore;
+       theCatcode[int(0x7f)] = catIgnore;
        theCatcode[int(' ')]  = catSpace;
        theCatcode[int('\t')] = catSpace;
        theCatcode[int('\r')] = catNewline;
index 3be9a8afc1766d324e003b1b8761b8fd11cee857..1ef9b82bbd346b94d0ce810c337a254ce7642f58 100644 (file)
@@ -24,9 +24,6 @@
 namespace boost
 {
 
-extern
-template basic_format<char>;
-
 extern template
 std::ostream &
 operator<< <char, std::char_traits<char> >(std::ostream &,
index cf642607a31aa50c7fbd909c545b0d7703648478..51e71ee2d223757d6ef9310c6642ef5bc04fa8c0 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * BoostFormat.h (boost): remove one extern template. Gcc 3.4. does
+       not allow it (at least not in this form.)
+
 2003-07-01  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * os_win32.C: put namespace os in lyx::support.
index 40de758608bb515f5ace0ddf8f6bac220ad773af..c3579c5c34e844c701f267a299c635c4c59c9ad8 100644 (file)
@@ -1,9 +1,15 @@
+2003-07-18  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * texparser.C (catInit): same warning avoidance as in math_parser.C
+       (setCatCode): cast to safe type
+       (getCatCode): ditto
+
 2003-05-17  Joao Luis M. Assirati  <assirati@fma.if.usp.br>
 
        * texparser.C: fix paragraph parsing after comment
 
 2003-04-29  André Pönitz  <poenitz@gmx.net>
-       
+
        * Makefile.am:
          texparser.h: whitespace
 
@@ -13,7 +19,7 @@
        versions of gcc to compile the code.
 
 2003-04-17  André Pönitz  <poenitz@gmx.net>
-       
+
        * math.C:
          preamble.C:
          table.C:
@@ -50,4 +56,3 @@
 
        * Makefile.am: empty, dummy file so that autogen.sh and configure
        are happy.
-
index 0e4f79df702459f1463b87b8c1c3ecf758e7b9de..35e7c99fa45e10b4bfcc1342e0a79dc8bb19c452 100644 (file)
@@ -1,4 +1,3 @@
-
 #include <config.h>
 
 #include "texparser.h"
@@ -38,30 +37,30 @@ void catInit()
        fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter);
        fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter);
 
-       theCatcode['\\'] = catEscape;
-       theCatcode['{']  = catBegin;
-       theCatcode['}']  = catEnd;
-       theCatcode['$']  = catMath;
-       theCatcode['&']  = catAlign;
+       theCatcode[int('\\')] = catEscape;
+       theCatcode[int('{')]  = catBegin;
+       theCatcode[int('}')]  = catEnd;
+       theCatcode[int('$')]  = catMath;
+       theCatcode[int('&')]  = catAlign;
        theCatcode[10]   = catNewline;
-       theCatcode['#']  = catParameter;
-       theCatcode['^']  = catSuper;
-       theCatcode['_']  = catSub;
-       theCatcode['\7f'] = catIgnore;
-       theCatcode[' ']  = catSpace;
-       theCatcode['\t'] = catSpace;
+       theCatcode[int('#')]  = catParameter;
+       theCatcode[int('^')]  = catSuper;
+       theCatcode[int('_')]  = catSub;
+       theCatcode[0x7f] = catIgnore;
+       theCatcode[int(' ')]  = catSpace;
+       theCatcode[int('\t')] = catSpace;
        theCatcode[13]   = catIgnore;
-       theCatcode['~']  = catActive;
-       theCatcode['%']  = catComment;
+       theCatcode[int('~')]  = catActive;
+       theCatcode[int('%')]  = catComment;
 
        // This is wrong!
-       theCatcode['@']  = catLetter;
+       theCatcode[int('@')]  = catLetter;
 }
 
 }
 
 
-// 
+//
 // catcodes
 //
 
@@ -171,7 +170,7 @@ void Parser::skip_spaces()
        while (1) {
                if (next_token().cat() == catSpace || next_token().cat() == catNewline)
                        get_token();
-               else if (next_token().cat() == catComment) 
+               else if (next_token().cat() == catComment)
                        while (next_token().cat() != catNewline)
                                get_token();
                else
@@ -368,11 +367,11 @@ string Parser::verbatim_item()
 
 void Parser::setCatCode(char c, CatCode cat)
 {
-       theCatcode[c] = cat;    
+       theCatcode[(unsigned char)c] = cat;
 }
 
 
 CatCode Parser::getCatCode(char c) const
 {
-       return theCatcode[c];
+       return theCatcode[(unsigned char)c];
 }