Lightning Talk: Finding My First Compiler Bug - Braden Ganetsky - CppNow 2023
Vložit
- čas přidán 3. 06. 2024
- www.cppnow.org
/ cppnow
---
Lightning Talk: Finding My First Compiler Bug - Braden Ganetsky - CppNow 2023
Slides: github.com/boostcon/cppnow_pr...
---
It's an exciting part of a C++ developer's early career. I found my first compiler bug! A piece of data is getting zeroed out at run time even though it's fine at compile time. For my first ever lightning talk, I want to take you on the journey of reproducing this bug involving some of our favourite C++ features, including concepts, lambdas, and non-type template parameters.
---
Braden Ganetsky
Braden Ganetsky graduated from the University of Manitoba with a degree in mechanical engineering, but soon pivoted to C++. Now he spends his days working on supply chain simulation software, and spends his nights working on parser combinators and getting involved in the C++ community.
---
Video Sponsors: think-cell and Bloomberg Engineering
Audience Audio Sponsors: Innoplex and Maryland Research Institute
---
Videos Filmed & Edited By Bash Films: bashfilms.com/
CZcams Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
CppNow 2024
www.cppnow.org
/ cppnow
---
#boost #cpp #cppprogramming - Věda a technologie
This is a great kind of content for a lightning talk. An explanation for the fix if/when it happens would be cool to see too.
People always say"it's not a compiler bug, check your code again"
But every now and then, it actually is a compiler bug!
I've found one compiler bug in older versions of clang, though it was fixed before I found it.
Never did dig too deep into it, but an older version of clang really didn't like a static member variable template declared as `auto` when the type depended on a template template parameter of the class and on a type template parameter of the variable template itself. A redundant `decltype` is an effective workaround.
Clang 11 and 12 I believe I found that on, with C++17 mode, on 64-bit Linux.
Fun stuff!