[BUG] gcc-4 is not supported in release after 1.8.0

Aperta
#1,639 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cmake, cpp

Direzione di ricerca

Riprodurre la build della release 1.8.0 usando il comando CMake segnalato e gcc 4.8.5. Ispezionare src/benchmark.cc in corrispondenza degli avvisi di shadowing segnalati, quindi controllare nella documentazione del progetto la dichiarazione relativa al supporto dei compilatori. Il lavoro è completato quando la release viene compilata con gcc-4 oppure la documentazione dichiara chiaramente che gcc-4 non è supportato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug
The project is not compilable with gcc-4 since release 1.8.0, is gcc-4 no longer supported or the documentation need modification?

System
Which OS, compiler, and compiler version are you using:

  • OS: CentOS 7.6.1810
  • Compiler and version: gcc 4.8.5

To reproduce
Steps to reproduce the behavior:

  1. checkout release version 1.8.0
  2. cd ${source_code_folder} && mkdir build && cd build && cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ../
  3. make
  4. See error
[  1%] Building CXX object src/CMakeFiles/benchmark.dir/benchmark.cc.o
/home/test/test/benchmark-1.8.0/src/benchmark.cc: In constructor ‘benchmark::State::State(std::string, benchmark::IterationCount, const std::vector<long int>&, int, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*, benchmark::internal::PerfCountersMeasurement*)’:
/home/test/test/benchmark-1.8.0/src/benchmark.cc:163:74: error: declaration of ‘name’ shadows a member of 'this' [-Werror=shadow]
              internal::PerfCountersMeasurement* perf_counters_measurement)
                                                                          ^
/home/test/test/benchmark-1.8.0/src/benchmark.cc: In member function ‘void benchmark::State::PauseTiming()’:
/home/test/test/benchmark-1.8.0/src/benchmark.cc:230:12: error: declaration of ‘name’ shadows a member of 'this' [-Werror=shadow]
       auto name = name_and_measurement.first;
            ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/benchmark.dir/benchmark.cc.o] Error 1
make[1]: *** [src/CMakeFiles/benchmark.dir/all] Error 2
make: *** [all] Error 2

Expected behavior
The project should be compilable in gcc-4 or the document need an update that gcc-4 is no longer supported.

Lingua principale
C++
Stelle
10.5k
Fork
1.8k
Merge medio
2g 1h
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/benchmark

Tutte le issue di google/benchmark

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.