Repository navigation
EDG incorrectly diagnoses static_casts to references as narrowing conversions
#580
StephanTLavavej
started this conversation in
Issue Triage - Compilation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue Summary
I'm the primary maintainer of microsoft/STL, and we've encountered a bug in EDG, which we're working around in the STL. Using VS Insiders / MSVC Build Tools Preview, the following code is correctly accepted by the MSVC Compiler 19.53.36930 and Clang 22.1.3, but incorrectly rejected by EDG 7.0. This is using MSVC's undocumented
/BEoption to invoke VS's copy of the EDG frontend used for IntelliSense.Reproducing Source Code
Compiler output showing how MSVC and Clang accept while EDG rejects:
Command-line Options
cl /EHsc /nologo /W4 /std:c++latest /c /BE /dE--version meow.cpp
Type of Issue
[Front End] This code SHOULD compile with these options.
Additional Details
N5054 [dcl.init.list]/7.4.2 says:
The source is clearly a constant expression (it can initialize an
intjust fine), and its value 1729 can clearly fit intounsigned int.Reproducing (Standard) Configuration(s)
windows-msvc-release
Reproducing (Non-standard) Configuration
dump_configuration.txt
I acknowledge that:
LICENSE.txtfile in my.zipor.tar.gzupload. If I included aLICENSE.txtfile, any tests created using the reproducing source code will be governed by the terms of the license I provided instead.All reactions