On Mon, 4 Dec 2023 11:29:07 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> Julian Waters has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 78 commits:
>> 
>>  - Merge branch 'openjdk:master' into patch-10
>>  - Fix awt_Window.cpp
>>  - Fix awt_PrintJob.cpp
>>  - -Zc:stringStrings no longer needed with -permissive- flags-cflags.m4
>>  - Fix awt_Window.cpp
>>  - awt_Window.cpp
>>  - awt_PrintJob.cpp
>>  - awt_Frame.cpp
>>  - Whitespace awt_Component.cpp
>>  - awt_Frame.cpp
>>  - ... and 68 more: https://git.openjdk.org/jdk/compare/ed5b8c3a...fda1ab0f
>
> 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-

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

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

Reply via email to