[SERVER-37909] Fix building of ASSERT_THROWS on GCC-8 Created: 02/Nov/18  Updated: 29/Oct/23  Resolved: 13/Nov/18

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.1.6

Type: Improvement Priority: Major - P3
Reporter: ADAM Martin (Inactive) Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2018-11-05, Service Arch 2018-11-19
Participants:

 Description   

GCC-8 doesn't handle `_Pragma` expansions in macros with respect to `[[nodiscard]]` and similar attributes.  Instead we'll convert to a void-cast, and eliminate variable declarations in `ASSERT_THROWS` statements.



 Comments   
Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-37909 fix lint
Branch: master
https://github.com/mongodb/mongo/commit/c9ba97851eb8dc39f5f2bc5626d08e0f1d099cca

Comment by Githook User [ 08/Nov/18 ]

Author:

{'name': 'ADAM David Alan Martin', 'email': 'adam@recursive.engineer'}

Message: SERVER-37909 Fix GCC-8 in some tests.

GCC-8 doesn't treat `_Pragma(...)` ignore directives in
macros the way that Clang does. Instead of this technique, we'll
make the requirement on `ASSERT_THROWS`' parameter an expression,
not a statement.
Branch: master
https://github.com/mongodb/mongo/commit/77ea0900b59de5f49953d4e1c2f0be4532e448c4

Generated at Thu Feb 08 04:47:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.