Skip to content
Snippets Groups Projects
  1. Feb 14, 2016
  2. Feb 13, 2016
  3. Feb 12, 2016
  4. Feb 10, 2016
  5. Feb 08, 2016
  6. Dec 28, 2015
  7. Oct 09, 2015
  8. Sep 24, 2015
  9. Sep 12, 2015
  10. Sep 01, 2015
  11. Aug 25, 2015
  12. Aug 19, 2015
    • Carsten Gräser's avatar
      Add file with prevented cherry-picks · 6539ef5a
      Carsten Gräser authored
      This lists all commits marked tagged as bugfix or release
      that where explicitly not cherry-picked. Possible reasons for this:
      
      * commits from a branch that was also merged to the release
      * commits from a branch where the merge was cherry-picked
      * bugfixes for code new to master
      * commits that where picked but are not recognized as such
      6539ef5a
  13. Aug 03, 2015
  14. Jul 07, 2015
    • Jö Fahlke's avatar
      [release][matrixmarket][ODR] Give the name MatrixMarketImpl to the anonymous · d6769b77
      Jö Fahlke authored
      namespace.
      
      This namespace was probably meant to mark implementation details.  However it
      led to violations of the ODR (one definition rule), and to warnings about
      defined-but-unused functions (see below).
      
      To illustrate the problem consider the function template
      Dune::readMatrixMarket:
      
        template<typename T, typename A, int brows, int bcols>
        void readMatrixMarket(Dune::BCRSMatrix<Dune::FieldMatrix<T,brows,bcols>,A>& matrix,
                              std::istream& istr)
        {
          // ...
          readSparseEntries(matrix, istr, entries, header, NumericWrapper<T>());
        }
      
      The ODR states (§3.2/5):
      
        There can be more than one definition of a [...] non-static function
        template (14.5.6) [...] in a program provided that each definition appears
        in a different translation unit, and provided the definitions satisfy the
        following requirements.  Given such an entity named D defined in more than
        one translation unit, then
      
        - each definition of D shall consist of the same sequence of tokens; and
      
        - in each definition of D, corresponding names, looked up according to 3.4,
          shall refer to an entity defined within the definition of D, or shall
          refer to the same entity, after overload resolution (13.3) and after
          matching of partial template specialization (14.8.3), except that a name
          can refer to a const object with internal or no linkage if the object has
          the same literal type in all definitions of D, and the object is
          initialized with a constant expression (5.19), and the value (but not the
          address) of the object is used, and the object has the same value in all
          definitions of D; and
      
        [...]
      
      This is violated by e.g. both readSparseEntries, which is defined in the
      anonymous namespace.  Since it is not defined within readMatrixMarket, it must
      refer to the same entity in all translation units.  However, its name is
      effectively Dune::<unique>::readSparseEntries, where <unique> is unique to
      each translation unit, and thus it effectively refers to a different entity in
      each translation unit, and the program is ill-formed as soon as move than one
      translation unit does #include <dune/istl/matrixmarket.hh>.
      
      The warnings by g++-4.9 looked like this:
      ======================================================================
      g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../..  -pthread -I/home/joe/Projekte/pdelab-2.4/dune-common -I/home/joe/Projekte/pdelab-2.4/dune-common -I../../.. -I/usr/lib/openmpi/include -I/usr/lib/openmpi/include/openmpi -pthread -DMPIPP_H -DENABLE_MPI=1   -g -O3 -Wall -MT matrixmarkettest-matrixmarkettest.o -MD -MP -MF .deps/matrixmarkettest-matrixmarkettest.Tpo -c -o matrixmarkettest-matrixmarkettest.o `test -f 'matrixmarkettest.cc' || echo './'`matrixmarkettest.cc
      [...]
      In file included from matrixmarkettest.cc:11:0:
      ../../../dune/istl/matrixmarket.hh:501:10: warning: ‘void Dune::{anonymous}::readNextLine(std::istream&, std::ostringstream&, Dune::{anonymous}::LineType&)’ defined but not used [-Wunused-function]
           void readNextLine(std::istream& file, std::ostringstream&, LineType& type)
                ^
      In file included from matrixmarkettest.cc:11:0:
      ../../../dune/istl/matrixmarket.hh:601:19: warning: ‘std::istream& Dune::{anonymous}::operator>>(std::istream&, Dune::{anonymous}::NumericWrapper<Dune::{anonymous}::PatternDummy>&)’ defined but not used [-Wunused-function]
           std::istream& operator>>(std::istream& is, NumericWrapper<PatternDummy>& num)
                         ^
      ======================================================================
      
      (cherry picked from commit 1a19f1c1)
      Signed-off-by: default avatarCarsten Gräser <graeser@dune-project.org>
Loading