microsoft / SymCrypt

Cryptographic library
MIT License
660 stars 68 forks source link

Unit test build fails when setting C++ standard to C++20 #39

Closed mlindgren closed 3 months ago

mlindgren commented 4 months ago

Building SymCrypt fails with GCC11 or newer. It causes errors such as:

error: template-id not allowed for destructor
2683 | TlsCbcHmacImp<ImpXxx, AlgTlsCbcHmacSha384>::~TlsCbcHmacImp<ImpXxx, AlgTlsCbcHmacSha384>()

We'll track this internally, but I'm creating a public issue so that it's known that we're aware of it.

NielsFerguson commented 4 months ago

A quick search shows it is valid C++17 but they disallow it in C++20. Don't they care about backward compatibility?

Niels

From: Mitch Lindgren @.> Sent: Friday, May 3, 2024 16:49 To: microsoft/SymCrypt @.> Cc: Subscribed @.***> Subject: [microsoft/SymCrypt] Build fails on GCC11 and newer (Issue #39)

Building SymCrypt fails with GCC11 or newer. It causes errors such as:

error: template-id not allowed for destructor

2683 | TlsCbcHmacImp<ImpXxx, AlgTlsCbcHmacSha384>::~TlsCbcHmacImp<ImpXxx, AlgTlsCbcHmacSha384>()

We'll track this internally, but I'm creating a public issue so that it's known that we're aware of it.

- Reply to this email directly, view it on GitHubhttps://github.com/microsoft/SymCrypt/issues/39 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJJHWVWQVEIGPUWBM6BXDRDZAQO6PBFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLKRVGM2DOOBZG42TKN5ENZQW2ZNJNBQXGX3MMFRGK3ECUV3GC3DVMWSHI4TVMWSG4YLNMWXHOYLUMNUF6YLDORUXM2LUPGWHG5LCNJSWG5C7OR4XAZNFJFZXG5LFUZ2G64DJMNZZHAVEOR4XAZNKOJSXA33TNF2G64TZUV3GC3DVMWUTCNZVHEYDCNJWGWBKI5DZOBS2K2LTON2WLJLWMFWHKZNKGIZDOOBVHA2DCOJTQKSHI6LQMWSWYYLCMVWKK5TBNR2WLKRVGM2DOOBZG42TKN5HORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

mlindgren commented 3 months ago

You're right, this was actually a C++20 issue, not a GCC issue. It came up while we were working on integrating libcrux with the unit tests, but the change to C++20 was only temporary anyway; we don't want to require that.