> Hi all,
> File src/java.base/share/native/libjli/java.c compile error: control reaches
> end of non-void function [-Werror=return-type] with gcc options
> -fsanitize=address -O0. The function int JavaMain(void* _args) in this file
> will execute return ret in LEAVE() macro, but gcc with -O0 is
On Mon, 31 Mar 2025 12:57:38 GMT, Magnus Ihse Bursie wrote:
> While I normally advocate using DISABLE_WARNING in makefiles instead of
> pragmas, in this particular case I wonder if not a pragma in the `LEAVE`
> macro would be better?
PR has been changed to use `#pragma GCC diagnostic ignored "
On Mon, 31 Mar 2025 12:57:38 GMT, Magnus Ihse Bursie wrote:
>> Hi all,
>> File src/java.base/share/native/libjli/java.c compile error: control reaches
>> end of non-void function [-Werror=return-type] with gcc options
>> -fsanitize=address -O0. The function int JavaMain(void* _args) in this fil
On Tue, 1 Apr 2025 12:07:09 GMT, SendaoYan wrote:
>> Hi all,
>> File src/java.base/share/native/libjli/java.c compile error: control reaches
>> end of non-void function [-Werror=return-type] with gcc options
>> -fsanitize=address -O0. The function int JavaMain(void* _args) in this file
>> will
On Tue, 1 Apr 2025 12:07:09 GMT, SendaoYan wrote:
>> Hi all,
>> File src/java.base/share/native/libjli/java.c compile error: control reaches
>> end of non-void function [-Werror=return-type] with gcc options
>> -fsanitize=address -O0. The function int JavaMain(void* _args) in this file
>> will
> Hi all,
> File src/java.base/share/native/libjli/java.c compile error: control reaches
> end of non-void function [-Werror=return-type] with gcc options
> -fsanitize=address -O0. The function int JavaMain(void* _args) in this file
> will execute return ret in LEAVE() macro, but gcc with -O0 is
On Mon, 31 Mar 2025 12:57:38 GMT, Magnus Ihse Bursie wrote:
> in this particular case I wonder if not a pragma in the LEAVE macro would be
> better?
I will try it later.
-
PR Comment: https://git.openjdk.org/jdk/pull/24318#issuecomment-2766150226
On Sun, 30 Mar 2025 15:07:36 GMT, SendaoYan wrote:
> Hi all,
> File src/java.base/share/native/libjli/java.c compile error: control reaches
> end of non-void function [-Werror=return-type] with gcc options
> -fsanitize=address -O0. The function int JavaMain(void* _args) in this file
> will exe
On Tue, 26 Nov 2024 02:12:39 GMT, David Holmes wrote:
> may trigger an unreachable statement warning in a smarter compiler.
Agree. I will close this PR and the related issue as won't fix.
-
PR Comment: https://git.openjdk.org/jdk/pull/22355#issuecomment-2499500253
On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan wrote:
> Hi all,
> File `src/java.base/share/native/libjli/java.c` compile `error: control
> reaches end of non-void function [-Werror=return-type]` with gcc options
> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
> file
On Mon, 25 Nov 2024 07:11:25 GMT, Jaikiran Pai wrote:
> Do you mean that the `if (JNI_TRUE)` block which has the `return ret;`
> wouldn't be used by the preprocessor when using `-O0`?
I make a misunderstand for the do-while(false) loop prior. Actually the
do-while(false) loop will execute at l
On Mon, 25 Nov 2024 07:08:56 GMT, David Holmes wrote:
>> Hi all,
>> File `src/java.base/share/native/libjli/java.c` compile `error: control
>> reaches end of non-void function [-Werror=return-type]` with gcc options
>> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
On Mon, 25 Nov 2024 07:19:54 GMT, David Holmes wrote:
> I think the sanitizer is just not smart enough to see that control flow can
> never reach beyond the do/while loop of the macro.
I think you are right, the sanitizer of gcc is not smart enough at some
situations. I found the similar code
On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan wrote:
> Hi all,
> File `src/java.base/share/native/libjli/java.c` compile `error: control
> reaches end of non-void function [-Werror=return-type]` with gcc options
> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
> file
On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan wrote:
> Hi all,
> File `src/java.base/share/native/libjli/java.c` compile `error: control
> reaches end of non-void function [-Werror=return-type]` with gcc options
> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
> file
On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan wrote:
> Hi all,
> File `src/java.base/share/native/libjli/java.c` compile `error: control
> reaches end of non-void function [-Werror=return-type]` with gcc options
> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
> file
On Mon, 25 Nov 2024 06:17:23 GMT, SendaoYan wrote:
> Hi all,
> File `src/java.base/share/native/libjli/java.c` compile `error: control
> reaches end of non-void function [-Werror=return-type]` with gcc options
> `-fsanitize=address -O0`. The function `int JavaMain(void* _args)` in this
> file
17 matches
Mail list logo