Skip to content

Compiler warnings with gcc 14 on Windows #56579

Open
@inkydragon

Description

@inkydragon
D:/jl/julia/src/module.c:16:30: warning: redeclaration of 'jl_bpart_get_kind' with different visibility (old visibility preserved)
   16 | EXTERN_INLINE_DEFINE uint8_t jl_bpart_get_kind(jl_binding_partition_t *bpart) JL_NOTSAFEPOINT;
      |                              ^~~~~~~~~~~~~~~~~
In file included from D:/jl/julia/src/module.c:8:
D:/jl/julia/src/julia_internal.h:962:31: note: previous definition of 'jl_bpart_get_kind' with type 'uint8_t(jl_binding_partition_t *)' {aka 'unsigned char(struct _jl_binding_partition_t *)'}
  962 | EXTERN_INLINE_DECLARE uint8_t jl_bpart_get_kind(jl_binding_partition_t *bpart) JL_NOTSAFEPOINT {
      |                               ^~~~~~~~~~~~~~~~~


D:/jl/julia/src/dlload.c: In function 'ijl_load_dynamic_library':
D:/jl/julia/src/dlload.c:333:54: warning: '%s' directive output may be truncated writing 4 bytes into a region of size between 1 and 4096 [-Wformat-truncation=]
   29 | static char const *const extensions[] = { "", ".dll" };
      | ~~~~~~                                                
......
  333 |                         snprintf(path, PATHBUF, "%s%s%s", relocated, modname, ext);
      |                                                      ^~
D:/jl/julia/src/dlload.c:333:25: note: 'snprintf' output 5 or more bytes (assuming 4100) into a destination of size 4096
  333 |                         snprintf(path, PATHBUF, "%s%s%s", relocated, modname, ext);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


D:/jl/julia/src/sys.c:500:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  500 | extern char **environ;
      | ^~~~~~
In file included from D:/jl/julia/src/sys.c:8:
D:/jl/julia/src/sys.c:500:15: warning: '__p__environ' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
  500 | extern char **environ;
      |               ^~~~~~~


D:/jl/julia/src/task.c: In function 'restore_stack3':
D:/jl/julia/src/task.c:280:33: warning: infinite recursion detected [-Winfinite-recursion]
  280 | JL_NO_ASAN static void NOINLINE restore_stack3(jl_ucontext_t *t, jl_ptls_t ptls, char *p)
      |                                 ^~~~~~~~~~~~~~
D:/jl/julia/src/task.c:290:9: note: recursive call
  290 |         restore_stack3(t, ptls, p); // pass p to ensure the compiler can't tailcall this or avoid the alloca
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~


In file included from D:/jl/julia/src/codegen.cpp:155:
D:/jl/julia/src/jitlayers.h:71:26: warning: 'jl_default_cgparams' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   71 | extern "C" jl_cgparams_t jl_default_cgparams;
      |                          ^~~~~~~~~~~~~~~~~~~


D:/jl/julia/src/debuginfo.cpp: In member function 'void JITDebugInfoRegistry::registerJITObject(const llvm::object::ObjectFile&, std::function<long long unsigned int(const llvm::StringRef&)>)':
D:/jl/julia/src/debuginfo.cpp:302:14: warning: variable 'catchjmp' set but not used [-Wunused-but-set-variable]
  302 |     uint8_t *catchjmp = NULL;
      |              ^~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildingBuild system, or building Julia or its dependenciessystem:windowsAffects only Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions