summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mklibs/files/remove-deprecated-exception-specification-cpp17.patch
blob: f96cc7d302ce053bb8bd8fd89be1f6e58aa8b19f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
From 597c7a8333df84a87cc48fb8477b603ffbf372a6 Mon Sep 17 00:00:00 2001
From: Andrej Valek <andrej.valek@siemens.com>
Date: Mon, 23 Aug 2021 12:45:11 +0200
Subject: [PATCH] feat(cpp17): remove deprecated exception specifications for
 C++ 17

Upstream-Status: Submitted [https://salsa.debian.org/installer-team/mklibs/-/merge_requests/2]

based on: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
---
 src/mklibs-readelf/elf.cpp      | 48 ++++++++++++++++++++---------------------
 src/mklibs-readelf/elf.hpp      | 18 ++++++++--------
 src/mklibs-readelf/elf_data.hpp | 36 +++++++++++++++----------------
 3 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/src/mklibs-readelf/elf.cpp b/src/mklibs-readelf/elf.cpp
index 0e4c0f3..2e6d0f6 100644
--- a/src/mklibs-readelf/elf.cpp
+++ b/src/mklibs-readelf/elf.cpp
@@ -36,7 +36,7 @@ file::~file () throw ()
     delete *it;
 }
 
-file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_error)
+file *file::open (const char *filename) throw ()
 {
   struct stat buf;
   int fd;
@@ -72,7 +72,7 @@ file *file::open (const char *filename) throw (std::bad_alloc, std::runtime_erro
 }
 
 template<typename _class>
-file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
+file *file::open_class(uint8_t *mem, size_t len) throw ()
 {
   switch (mem[EI_DATA])
   {
@@ -86,7 +86,7 @@ file *file::open_class(uint8_t *mem, size_t len) throw (std::bad_alloc, std::run
 }
 
 template <typename _class, typename _data>
-file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw (std::bad_alloc, std::runtime_error)
+file_data<_class, _data>::file_data(uint8_t *mem, size_t len) throw ()
 : file(mem, len)
 {
   if (mem[EI_CLASS] != _class::id)
@@ -190,7 +190,7 @@ section_data<_class, _data>::section_data(Shdr *shdr, uint8_t *mem) throw ()
 }
 
 template <typename _class, typename _data>
-void section_data<_class, _data>::update(const file &file) throw (std::bad_alloc)
+void section_data<_class, _data>::update(const file &file) throw ()
 {
   const section_type<section_type_STRTAB> &section =
     dynamic_cast<const section_type<section_type_STRTAB> &>(file.get_section(file.get_shstrndx()));
@@ -204,7 +204,7 @@ section_type<section_type_DYNAMIC>::~section_type() throw ()
 }
 
 template <typename _class, typename _data>
-section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, uint8_t *mem) throw ()
 : section_data<_class, _data>(header, mem)
 {
   if (this->type != SHT_DYNAMIC)
@@ -221,7 +221,7 @@ section_real<_class, _data, section_type_DYNAMIC>::section_real(Shdr *header, ui
 }
 
 template <typename _class, typename _data>
-void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw (std::bad_alloc)
+void section_real<_class, _data, section_type_DYNAMIC>::update(const file &file) throw ()
 {
   section_data<_class, _data>::update(file);
 
@@ -243,7 +243,7 @@ section_type<section_type_DYNSYM>::~section_type() throw ()
 }
 
 template <typename _class, typename _data>
-section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uint8_t *mem) throw ()
 : section_data<_class, _data>(header, mem)
 {
   if (this->type != SHT_DYNSYM)
@@ -260,7 +260,7 @@ section_real<_class, _data, section_type_DYNSYM>::section_real(Shdr *header, uin
 }
 
 template <typename _class, typename _data>
-void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw (std::bad_alloc)
+void section_real<_class, _data, section_type_DYNSYM>::update(const file &file) throw ()
 {
   section_data<_class, _data>::update (file);
 
@@ -285,7 +285,7 @@ const version_definition *section_type<section_type_GNU_VERDEF>::get_version_def
 }
 
 template <typename _class, typename _data>
-section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header, uint8_t *mem) throw ()
 : section_data<_class, _data>(header, mem)
 {
   if (this->type != SHT_GNU_verdef)
@@ -307,7 +307,7 @@ section_real<_class, _data, section_type_GNU_VERDEF>::section_real(Shdr *header,
 }
 
 template <typename _class, typename _data>
-void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw (std::bad_alloc)
+void section_real<_class, _data, section_type_GNU_VERDEF>::update(const file &file) throw ()
 {
   section_data<_class, _data>::update(file);
 
@@ -333,7 +333,7 @@ const version_requirement_entry *section_type<section_type_GNU_VERNEED>::get_ver
 
 template <typename _class, typename _data>
 section_real<_class, _data, section_type_GNU_VERNEED>::
-section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+section_real(Shdr *header, uint8_t *mem) throw ()
 : section_data<_class, _data> (header, mem)
 {
   if (this->type != SHT_GNU_verneed)
@@ -355,7 +355,7 @@ section_real(Shdr *header, uint8_t *mem) throw (std::bad_alloc)
 }
 
 template <typename _class, typename _data>
-void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw (std::bad_alloc)
+void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &file) throw ()
 {
   section_data<_class, _data>::update(file);
 
@@ -372,7 +372,7 @@ void section_real<_class, _data, section_type_GNU_VERNEED>::update(const file &f
 
 template <typename _class, typename _data>
 section_real<_class, _data, section_type_GNU_VERSYM>::
-section_real (Shdr *header, uint8_t *mem) throw (std::bad_alloc)
+section_real (Shdr *header, uint8_t *mem) throw ()
 : section_data<_class, _data> (header, mem)
 {
   if (this->type != SHT_GNU_versym)
@@ -399,7 +399,7 @@ segment_data<_class, _data>::segment_data (Phdr *phdr, uint8_t *mem) throw ()
 }
 
 template <typename _class, typename _data>
-segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw (std::bad_alloc)
+segment_real<_class, _data, segment_type_INTERP>::segment_real (Phdr *header, uint8_t *mem) throw ()
 : segment_data<_class, _data> (header, mem)
 {
   if (this->type != PT_INTERP)
@@ -429,13 +429,13 @@ dynamic_data<_class, _data>::dynamic_data (Dyn *dyn) throw ()
 }
 
 template <typename _class, typename _data>
-void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
+void dynamic_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
 {
   if (is_string)
     val_string = section.get_string(val);
 }
 
-std::string symbol::get_version () const throw (std::bad_alloc)
+std::string symbol::get_version () const throw ()
 {
   if (verneed)
     return verneed->get_name();
@@ -445,7 +445,7 @@ std::string symbol::get_version () const throw (std::bad_alloc)
   return "Base";
 }
 
-std::string symbol::get_version_file () const throw (std::bad_alloc)
+std::string symbol::get_version_file () const throw ()
 {
   if (verneed)
     return verneed->get_file();
@@ -453,7 +453,7 @@ std::string symbol::get_version_file () const throw (std::bad_alloc)
   return "None";
 }
 
-std::string symbol::get_name_version () const throw (std::bad_alloc)
+std::string symbol::get_name_version () const throw ()
 {
   std::string ver;
 
@@ -478,13 +478,13 @@ symbol_data<_class, _data>::symbol_data (Sym *sym) throw ()
 }
 
 template <typename _class, typename _data>
-void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
+void symbol_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
 {
   name_string = section.get_string(name);
 }
 
 template <typename _class, typename _data>
-void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw (std::bad_alloc)
+void symbol_data<_class, _data>::update_version(const file &file, uint16_t index) throw ()
 {
   if (!file.get_section_GNU_VERSYM())
     return;
@@ -531,13 +531,13 @@ version_definition_data<_class, _data>::version_definition_data (Verdef *verdef)
 }
 
 template <typename _class, typename _data>
-void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
+void version_definition_data<_class, _data>::update_string(const section_type<section_type_STRTAB> &section) throw ()
 {
   for (std::vector<uint32_t>::iterator it = names.begin(); it != names.end(); ++it)
     names_string.push_back(section.get_string(*it));
 }
 
-version_requirement::version_requirement() throw (std::bad_alloc)
+version_requirement::version_requirement() throw ()
 : file_string("None")
 { }
 
@@ -561,7 +561,7 @@ version_requirement_data<_class, _data>::version_requirement_data (Verneed *vern
 
 template <typename _class, typename _data>
 void version_requirement_data<_class, _data>::
-update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
+update_string(const section_type<section_type_STRTAB> &section) throw ()
 {
   file_string = section.get_string(file);
 
@@ -596,7 +596,7 @@ version_requirement_entry_data(Vernaux *vna, const version_requirement &verneed)
 
 template <typename _class, typename _data>
 void version_requirement_entry_data<_class, _data>::
-update_string(const section_type<section_type_STRTAB> &section) throw (std::bad_alloc)
+update_string(const section_type<section_type_STRTAB> &section) throw ()
 {
   name_string = section.get_string(name);
 }
diff --git a/src/mklibs-readelf/elf.hpp b/src/mklibs-readelf/elf.hpp
index 70e61cd..afb0c9e 100644
--- a/src/mklibs-readelf/elf.hpp
+++ b/src/mklibs-readelf/elf.hpp
@@ -49,7 +49,7 @@ namespace Elf
       const uint16_t get_shstrndx() const throw () { return shstrndx; }
 
       const std::vector<section *> get_sections() const throw () { return sections; };
-      const section &get_section(unsigned int i) const throw (std::out_of_range) { return *sections.at(i); };
+      const section &get_section(unsigned int i) const throw () { return *sections.at(i); };
       const section_type<section_type_DYNAMIC> *get_section_DYNAMIC() const throw () { return section_DYNAMIC; };
       const section_type<section_type_DYNSYM> *get_section_DYNSYM() const throw () { return section_DYNSYM; };
       const section_type<section_type_GNU_VERDEF> *get_section_GNU_VERDEF() const throw () { return section_GNU_VERDEF; };
@@ -59,13 +59,13 @@ namespace Elf
       const std::vector<segment *> get_segments() const throw () { return segments; };
       const segment_type<segment_type_INTERP> *get_segment_INTERP() const throw () { return segment_INTERP; };
 
-      static file *open(const char *filename) throw (std::bad_alloc, std::runtime_error);
+      static file *open(const char *filename) throw ();
 
     protected:
-      file(uint8_t *mem, size_t len) throw (std::bad_alloc) : mem(mem), len(len) { }
+      file(uint8_t *mem, size_t len) throw () : mem(mem), len(len) { }
 
       template<typename _class>
-        static file *open_class(uint8_t *, size_t) throw (std::bad_alloc, std::runtime_error);
+        static file *open_class(uint8_t *, size_t) throw ();
 
       uint16_t type;
       uint16_t machine;
@@ -128,7 +128,7 @@ namespace Elf
     class section_type<section_type_STRTAB> : public virtual section
     {
       public:
-        std::string get_string(uint32_t offset) const throw (std::bad_alloc)
+        std::string get_string(uint32_t offset) const throw ()
         {
           return std::string(reinterpret_cast<const char *> (mem + offset));
         }
@@ -263,10 +263,10 @@ namespace Elf
       uint8_t get_bind () const throw () { return bind; }
       uint8_t get_type () const throw () { return type; }
       const std::string &get_name_string() const throw () { return name_string; }
-      std::string get_version() const throw (std::bad_alloc);
-      std::string get_version_file() const throw (std::bad_alloc);
+      std::string get_version() const throw ();
+      std::string get_version_file() const throw ();
       uint16_t get_version_data() const throw () { return versym; }
-      std::string get_name_version() const throw (std::bad_alloc);
+      std::string get_name_version() const throw ();
 
     protected:
       uint32_t name;
@@ -305,7 +305,7 @@ namespace Elf
   class version_requirement
   {
     public:
-      version_requirement() throw (std::bad_alloc);
+      version_requirement() throw ();
       virtual ~version_requirement () throw () { }
 
       const std::string &get_file() const throw () { return file_string; }
diff --git a/src/mklibs-readelf/elf_data.hpp b/src/mklibs-readelf/elf_data.hpp
index 05effee..3871982 100644
--- a/src/mklibs-readelf/elf_data.hpp
+++ b/src/mklibs-readelf/elf_data.hpp
@@ -94,7 +94,7 @@ namespace Elf
     class file_data : public file
     {
       public:
-        file_data(uint8_t *, size_t len) throw (std::bad_alloc, std::runtime_error);
+        file_data(uint8_t *, size_t len) throw ();
 
         const uint8_t get_class() const throw () { return _class::id; }
         const uint8_t get_data() const throw () { return _data::id; }
@@ -109,7 +109,7 @@ namespace Elf
       public:
         section_data(Shdr *, uint8_t *) throw ();
 
-        virtual void update(const file &) throw (std::bad_alloc);
+        virtual void update(const file &) throw ();
     };
 
   template <typename _class, typename _data, typename _type>
@@ -133,9 +133,9 @@ namespace Elf
         typedef typename _elfdef<_class>::Shdr Shdr;
 
       public:
-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
+        section_real(Shdr *, uint8_t *) throw ();
 
-        void update(const file &) throw (std::bad_alloc);
+        void update(const file &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -147,9 +147,9 @@ namespace Elf
         typedef typename _elfdef<_class>::Shdr Shdr;
 
       public:
-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
+        section_real(Shdr *, uint8_t *) throw ();
 
-        void update(const file &) throw (std::bad_alloc);
+        void update(const file &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -161,9 +161,9 @@ namespace Elf
         typedef typename _elfdef<_class>::Shdr Shdr;
 
       public:
-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
+        section_real(Shdr *, uint8_t *) throw ();
 
-        void update(const file &) throw (std::bad_alloc);
+        void update(const file &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -175,9 +175,9 @@ namespace Elf
         typedef typename _elfdef<_class>::Shdr Shdr;
 
       public:
-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
+        section_real(Shdr *, uint8_t *) throw ();
 
-        void update(const file &) throw (std::bad_alloc);
+        void update(const file &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -189,7 +189,7 @@ namespace Elf
         typedef typename _elfdef<_class>::Shdr Shdr;
 
       public:
-        section_real(Shdr *, uint8_t *) throw (std::bad_alloc);
+        section_real(Shdr *, uint8_t *) throw ();
     };
 
   template <typename _class, typename _data>
@@ -220,7 +220,7 @@ namespace Elf
         typedef typename _elfdef<_class>::Phdr Phdr;
 
       public:
-        segment_real (Phdr *, uint8_t *) throw (std::bad_alloc);
+        segment_real (Phdr *, uint8_t *) throw ();
     };
 
   template <typename _class, typename _data>
@@ -232,7 +232,7 @@ namespace Elf
       public:
         dynamic_data (Dyn *) throw ();
 
-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
+        void update_string(const section_type<section_type_STRTAB> &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -244,8 +244,8 @@ namespace Elf
       public:
         symbol_data (Sym *) throw ();
 
-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
-        virtual void update_version (const file &, uint16_t) throw (std::bad_alloc);
+        void update_string(const section_type<section_type_STRTAB> &) throw ();
+        virtual void update_version (const file &, uint16_t) throw ();
     };
 
   template <typename _class, typename _data>
@@ -257,7 +257,7 @@ namespace Elf
 
         version_definition_data (Verdef *) throw ();
 
-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
+        void update_string(const section_type<section_type_STRTAB> &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -269,7 +269,7 @@ namespace Elf
 
         version_requirement_data (Verneed *) throw ();
 
-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
+        void update_string(const section_type<section_type_STRTAB> &) throw ();
     };
 
   template <typename _class, typename _data>
@@ -280,7 +280,7 @@ namespace Elf
 
         version_requirement_entry_data (Vernaux *, const version_requirement &) throw ();
 
-        void update_string(const section_type<section_type_STRTAB> &) throw (std::bad_alloc);
+        void update_string(const section_type<section_type_STRTAB> &) throw ();
     };
 }
 
-- 
2.11.0