Skip to content

Commit

Permalink
Update GCC diagnostic pragmas in QAHandleOps function for GCC version…
Browse files Browse the repository at this point in the history
… 12 and above
  • Loading branch information
dpasukhi committed Oct 12, 2024
1 parent 9d5a5e1 commit 8a7f59d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/QANCollection/QANCollection_Handle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI,
#endif
const Handle_Geom_Line& hTmpRef (Handle(Geom_Line)::DownCast (aCurve2));
CHECK(theDI, hTmpRef.get() == aCurve2.get(), "local reference to temporary object (Handle_)");
#if defined(__GNUC__) && (__GNUC__ > 11)
#pragma GCC diagnostic pop
#endif
// check lifetime of temporary object referenced by local variable (base type)
const Handle_Geom_Curve& hTmpRefBase (Handle(Geom_Line)::DownCast (aCurve2));
#if defined(__GNUC__) && (__GNUC__ > 11)
#pragma GCC diagnostic pop
#endif
// here we have different behavior for MSVC 2013+ where Handle_ is a class
// (compiler creates temporary object of approprtiate type and keeps it living
// until the reference is valid) and other compilers where Handle_ is
Expand Down

0 comments on commit 8a7f59d

Please sign in to comment.