[CDRIVER-2278] Add messages to deprecation warnings in GCC and Clang Created: 12/Sep/17  Updated: 31/Mar/22

Status: Backlog
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Improve BSON_GNUC_DEPRECATED to support Clang and MSVC. (Right now only GCC is supported.) Add a message with some guidance about what the upgrade path is, perhaps just use BSON_GNUC_DEPRECATED_FOR in more places.

Also, it's no longer "GNU" once this work is done.



 Comments   
Comment by Hannes Magnusson [ 14/Sep/17 ]

Clang does define all the GNUC version constants, but unfortunately it is reported as _GNUC_ as 4.2.1, while the deprecation check is for 4,3 :|

clang does have _clang_major_ & _clang_minor_ which report correct versions.

Note that since clang 4.3.3 and gcc 4.3.3 do not support the same features in the same versions, the version check can't just be replaced in the check, rather a real feature check should be done I guess

Generated at Wed Feb 07 21:14:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.