libelfin autopkgtests fail against newer clang

Bug #2060786 reported by Simon Chopin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libelfin (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The autopkgtests are failing due to clang warnings:

101s autopkgtest [09:01:23]: test test-build-libdwarf++: [-----------------------
101s Output from pkg-config --cflags libdwarf++:
101s -I/usr/include/libelfin
101s success: pkg-config call succeeded
101s success: Compilation with cc and c++ produced x.o
101s success: Linking with c++ produced x
101s In file included from x.cpp:1:
101s In file included from /usr/include/libelfin/dwarf/dwarf++.hh:14:
101s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
101s 96 | char *newbuf = new char[sizeof(T[target])];
101s | ^~~~~~
101s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
101s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
101s 90 | size_type target = cap - base;
101s | ^
101s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
101s 96 | char *newbuf = new char[sizeof(T[target])];
101s | ^~~~~~
101s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
101s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
101s 90 | size_type target = cap - base;
101s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^~~~~~
102s /usr/include/libelfin/dwarf/small_vector.hh:68:17: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::reserve' requested here
102s 68 | reserve(osize);
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:43:31: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::operator=' requested here
102s 43 | *this = o;
102s | ^
102s /usr/include/libelfin/dwarf/dwarf++.hh:344:9: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::small_vector' requested here
102s 344 | die(die &&o) = default;
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
102s 90 | size_type target = cap - base;
102s | ^
102s 3 warnings generated.
102s success: Compilation with clang and clang++ produced x.o
102s success: Linking with clang++ produced x
102s info: test exiting
102s autopkgtest [09:01:24]: test test-build-libdwarf++: -----------------------]
102s autopkgtest [09:01:24]: test test-build-libdwarf++: - - - - - - - - - - results - - - - - - - - - -
102s test-build-libdwarf++ FAIL stderr: In file included from x.cpp:1:
102s autopkgtest [09:01:24]: test test-build-libdwarf++: - - - - - - - - - - stderr - - - - - - - - - -
102s In file included from x.cpp:1:
102s In file included from /usr/include/libelfin/dwarf/dwarf++.hh:14:
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^~~~~~
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
102s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
102s 90 | size_type target = cap - base;
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^~~~~~
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
102s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
102s 90 | size_type target = cap - base;
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^~~~~~
102s /usr/include/libelfin/dwarf/small_vector.hh:68:17: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::reserve' requested here
102s 68 | reserve(osize);
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:43:31: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::operator=' requested here
102s 43 | *this = o;
102s | ^
102s /usr/include/libelfin/dwarf/dwarf++.hh:344:9: note: in instantiation of member function 'dwarf::small_vector<unsigned long, 6>::small_vector' requested here
102s 344 | die(die &&o) = default;
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:96:50: note: read of non-const variable 'target' is not allowed in a constant expression
102s 96 | char *newbuf = new char[sizeof(T[target])];
102s | ^
102s /usr/include/libelfin/dwarf/small_vector.hh:90:27: note: declared here
102s 90 | size_type target = cap - base;
102s | ^
102s 3 warnings generated.

Simon Chopin (schopin)
Changed in libelfin (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libelfin - 0.3-3.1ubuntu1

---------------
libelfin (0.3-3.1ubuntu1) noble; urgency=medium

  * Fix autopkgtests against newer clang (Closes: 1065084, LP: #2060786)

 -- Simon Chopin <email address hidden> Wed, 10 Apr 2024 11:33:31 +0200

Changed in libelfin (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.