[Webkit-unassigned] [Bug 187737] TestWTF.WTF_Expected.Unexpected is not MSVC-safe

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 17 15:29:50 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187737

--- Comment #3 from Ross Kirsling <ross.kirsling at sony.com> ---
(In reply to JF Bastien from comment #2)
> This is a test of constexpr. Dropping constexpr defeats the purpose of the
> test. When I compile your second link with /O1 I get two identical
> functions. Seems like an MSVC bug? This is comparing the const char *
> pointers held in the unexpected object, they really should be the same.

I agree that it seems like an MSVC bug...

It seems allowable for the compiler to decide whether to keep one or two strings for the following:
> constexpr auto foo = "oops";
> constexpr auto bar = "oops";
(In fact, MSVC has a compiler option to control this: https://msdn.microsoft.com/en-us/library/s0s0asdt.aspx)
But to convert `constexpr auto bar(foo);` into `constexpr auto bar = "oops";` and thereby treat it as a new string seems questionable.

I certainly figured that constexpr was crucial to this test case, I just wondered whether changing the type or making it constexpr const (which evidently works) would be allowable. Either way, we can try submitting an MSVC issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180717/92ff4472/attachment.html>


More information about the webkit-unassigned mailing list