OK, this is definitely a bug, and I'm surprised that NXP QC allowed this to go out the door.
I encountered this exact same issue when I was upgrading my RT1050 project from MCUX 10.3.1 to MCUX v11.0.0. MCUX 11 uses the new version of the GCC 8 compiler, and apparently the C++ compiler is more strict about certain things that are generally OK in C code. Specifically, it is no longer a fan of dereferencing a null pointer in order to manually determine the offset of a struct member. Here are the offending macros in fsl_clock.h in your SDK:
#define CLK_MUX_DEFINE(reg, mux) (((((uint32_t)(&((SYSCON_Type *)0U)->reg)) & 0xFFU) << 8U) | ((mux)&0xFFU))
[...]
#define CLK_DIV_DEFINE(reg) (((uint32_t)(&((SYSCON_Type *)0U)->reg)) & 0xFFFU)
Each of those macros pretends that there is a SYSCON_Type struct located at address 0, then references the "reg" (macro parameter) field of that struct, takes the address of that field, and then converts the address to a uint32_t. Apparently this played nice in GCC 7 with C++ code, but GCC 8 flags this as an error (and correctly so):
../drivers/fsl_clock.h:173:64: note: in definition of macro 'CLK_DIV_DEFINE'
../drivers/fsl_clock.h:173:78: error: dereferencing a null pointer in '*0'
And since the value is borked, it then flags each and every enumeration value below, because now that value isn't a proper constant.
When I encountered this issue with my RT1050 project and MCUX 11, I was still using SDK 2.5.1. So I upgraded my SDK, and magically the issue went away... because NXP redefined those macros. Here's the "before":
#define CCM_TUPLE(reg, shift, mask, busyShift) \
(int)((((uint32_t)(&((CCM_Type *)0U)->reg)) & 0xFFU) | ((shift) << 8U) | \
((((mask) >> (shift)) & 0x1FFFU) << 13U) | ((busyShift) << 26U))
[...]
#define CCM_ANALOG_TUPLE(reg, shift) ((((uint32_t)(&((CCM_ANALOG_Type *)0U)->reg) & 0xFFFU) << 16U) | (shift))
And here's the "after":
#define CCM_TUPLE(reg, shift, mask, busyShift) \
(int)((reg & 0xFFU) | ((shift) << 8U) | \
((((mask) >> (shift)) & 0x1FFFU) << 13U) | ((busyShift) << 26U))
[...]
#define CCM_ANALOG_TUPLE(reg, shift) (((reg & 0xFFFU) << 16U) | (shift))
Basically, they just got rid of the "offset of" operation altogether. Now in the LPC845 code, I'm not sure if the same trick works. But, there's really no need to explicitly do a null pointer dereference... there's a standard C construct for this, offsetof() (located in stddef.h). If you look in stddef.h, you'll see that it's not defined the way it is in the Wikipedia article, but rather to call the intrinsic function of the compiler:
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
Replace the two offending macros in fsl_clock.h with these:
#define CLK_MUX_DEFINE(reg, mux) (((offsetof(SYSCON_Type, reg) & 0xFFU) << 8U) | ((mux)&0xFFU))
#define CLK_DIV_DEFINE(reg) (offsetof(SYSCON_Type, reg) & 0xFFFU)
I did this, and a basic C++ project for the LPC845 (using your supplied SDK) builds fine. Hope this helps.
NXP, you need to scrub all of your libraries for all of your supported parts, find every place where you explicitly dereference a null pointer to calculate the offset of a member, and use the "offsetof()" macro instead. Otherwise, that code will generate a compiler error whenever it's used in C++ code.