Skip to content

Commit 073dc08

Browse files
Disable invalid error message in gcc builds
1 parent c2c7d03 commit 073dc08

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/ecolab.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,15 @@ namespace ecolab
164164
DeviceType(A... args): model(new SyclType<M>(std::forward<A>(args)...)) {}
165165
DeviceType(const DeviceType& x): model(new SyclType<M>(*x.model)) {}
166166
DeviceType& operator=(const DeviceType& x) {*model=*x.model; return *this;}
167+
#if defined(__GNUC__) && !defined(__clang__)
168+
#pragma GCC diagnostic push
169+
// gcc incorrectly infers SyclType is polymorphic, which is quite plainly is not
170+
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
171+
#endif
167172
~DeviceType() {delete model;}
173+
#if defined(__GNUC__) && !defined(__clang__)
174+
#pragma GCC diagnostic pop
175+
#endif
168176
M& operator*() {return *model;}
169177
const M& operator*() const {return *model;}
170178
M* operator->() {return model;}

0 commit comments

Comments
 (0)