On Mon, 4 Dec 2023 11:33:09 GMT, Julian Waters <jwat...@openjdk.org> wrote:

>> make/autoconf/flags-cflags.m4 line 565:
>> 
>>> 563:     # The -utf-8 option sets source and execution character sets to 
>>> UTF-8 to enable correct
>>> 564:     # compilation of all source files regardless of the active code 
>>> page on Windows.
>>> 565:     TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor 
>>> -Zc:strictStrings -Zc:inline -permissive- -utf-8 -MP"
>> 
>> What is the rationale for removing `-Zc:strictStrings`? That seems like a 
>> step backwards. Also, this will affect *all* files compiled, both hotspot 
>> and all native JDK libraries.
>> 
>> If there is a single file that cannot (for some reason) be fixed to have the 
>> compiler stop complaining about const strings, that individual file should 
>> have `-Zc:strictStrings-` added to its CFLAGS.
>
> @magicus -permissive- automatically turns on -Zc:strictStrings, so specifying 
> it manually becomes redundant when -permissive- is also specified
> https://learn.microsoft.com/en-us/cpp/build/reference/zc-strictstrings-disable-string-literal-type-conversion?view=msvc-170
> 
>> The -Zc:strictStrings option is off by default. The 
>> [-permissive-](https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170)
>>  compiler option implicitly sets this option, but it can be overridden by 
>> using -Zc:strictStrings-

I see. Then I guess this is okay. If/when you are finally ready for 
integration, and turning on -permissive-, let me know so I can take the patch 
for a spin in our CI systems before integration.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1413756555

Reply via email to