Closed Bug 1880007 Opened 2 years ago Closed 2 years ago

Notification server can't be compiled as C++20 because Windows' <filesystem> header is not compatible with C++20's char8_t

Categories

(Toolkit :: Alerts Service, task, P3)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr115 --- disabled
firefox122 --- disabled
firefox123 --- disabled
firefox124 --- disabled
firefox125 --- fixed

People

(Reporter: cpeterson, Unassigned)

References

Details

Attachments

(1 obsolete file)

Windows' <filesystem> system header file is not compatible with C++20's char8_t, as documented in the clang issue tracker:

https://bugs.llvm.org/show_bug.cgi?id=41132

Instead of compiling the notification server as C++17, just disable char8_t support.

ERROR - /builds/worker/fetches/vs/VC/Tools/MSVC/14.16.27023/include/experimental/filesystem(45,1): error: declaration of anonymous struct must be a definition
INFO - struct char8_t; /* flag for UTF8 */

Component: MFBT → Alerts Service
Product: Core → Toolkit
Summary: Disable C++20's char8_t support in Windows notification server → Disable C++20's char8_t support in notification server

Windows' <filesystem> system header file is not compatible with C++20's char8_t, as documented in the clang issue tracker:

https://bugs.llvm.org/show_bug.cgi?id=41132

Instead of compiling the notification server as C++17, just disable char8_t support.

ERROR - /builds/worker/fetches/vs/VC/Tools/MSVC/14.16.27023/include/experimental/filesystem(45,1): error: declaration of anonymous struct must be a definition
INFO - struct char8_t; /* flag for UTF8 */

Attachment #9379856 - Attachment is obsolete: true

Good news! I downloaded that latest MSVC SDK (version 14.39.33519) and its filesystem header has changed the incompatible struct char8_t; // flag for UTF8 declaration to a C++20 compatible name: struct _Char8_t; // flag for UTF8. Since updating the VS SDK will fix this C++20 build error, this workaround isn't necessary.

Since updating the VS SDK will fix this C++20 build error, this workaround isn't necessary.

But I will leave this bug open as a placeholder for this issue until the VS SDK is updated.

Assignee: cpeterson → nobody
OS: Unspecified → Windows
Summary: Disable C++20's char8_t support in notification server → Notification server can't be compiled as C++20 because Windows' <filesystem> header is not compatible with C++20's char8_t

Fixed by bug 1880919.

Status: NEW → RESOLVED
Closed: 2 years ago
Depends on: 1880919
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: