libretro / parallel-n64

Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.
309 stars 128 forks source link

fix build with GCC 13 #769

Closed FabioLolix closed 5 months ago

FabioLolix commented 8 months ago

Hello, simple commit that fix

In file included from mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:1:
mupen64plus-rsp-paraLLEl/rsp_disasm.hpp:8:25: error: 'uint32_t' was not declared in this scope
    8 | std::string disassemble(uint32_t pc, uint32_t instr);
      |                         ^~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.hpp:5:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <string>
  +++ |+#include <cstdint>
    5 | 
mupen64plus-rsp-paraLLEl/rsp_disasm.hpp:8:38: error: 'uint32_t' was not declared in this scope
    8 | std::string disassemble(uint32_t pc, uint32_t instr);
      |                                      ^~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.hpp:8:38: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:30:13: error: redefinition of 'std::string RSP::disassemble'
   30 | std::string disassemble(uint32_t pc, uint32_t instr)
      |             ^~~~~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.hpp:8:13: note: 'std::string RSP::disassemble' previously declared here
    8 | std::string disassemble(uint32_t pc, uint32_t instr);
      |             ^~~~~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:30:25: error: 'uint32_t' was not declared in this scope
   30 | std::string disassemble(uint32_t pc, uint32_t instr)
      |                         ^~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:3:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    2 | #include <assert.h>
  +++ |+#include <cstdint>
    3 | 
mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:30:38: error: 'uint32_t' was not declared in this scope
   30 | std::string disassemble(uint32_t pc, uint32_t instr)
      |                                      ^~~~~~~~
mupen64plus-rsp-paraLLEl/rsp_disasm.cpp:30:38: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
make: *** [Makefile:1055: mupen64plus-rsp-paraLLEl/rsp_disasm.o] Error 1
immolo commented 7 months ago

mupen64plus-rsp-paraLLEl/rsp_disasm.cpp also needs the same fix (at least on GCC14)

Seeings as you already have the PR started did you want to include both otherwise I can submit it.

FabioLolix commented 7 months ago

GCC 14 haven't been released yet so I have to build it from gcc-git from AUR first, I'll check in some days

immolo commented 7 months ago

That's fine, it's likely the same patch as this though https://github.com/libretro/mupen64plus-libretro-nx/pull/506