Author Topic: Error when compiling parser.cpp in svn 13708  (Read 1447 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 827
Error when compiling parser.cpp in svn 13708
« on: August 16, 2025, 11:25:47 am »
Quote
C:\Users\Gerard\Documents\CodeBlocks_SVN\CodeBlocks_src\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp|1662|error: operands to '?:' have different types 'size_t' {aka 'long long unsigned int'} and 'std::nullptr_t'|
This error is obtained with MingW64 / Msys2 g++ 15.2 on Windows. Adding an explicit cast to site_t before nullptr corrects the compilation error. But is it the correct solution ?
Windows 11 64 bits (24H2), svn C::B (last version or almost!), wxWidgets 3.3.1, Msys2 Compilers 15.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline christo

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: Error when compiling parser.cpp in svn 13708
« Reply #1 on: August 16, 2025, 12:20:33 pm »
In the patch I provided in https://sourceforge.net/p/codeblocks/code/13708 it was
Code
size_t remainingToParse = pParser ? pParser->GetFilesRemainingToParse() : 0;

I think we should change nullptr back to 0 as above.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1764
Re: Error when compiling parser.cpp in svn 13708
« Reply #2 on: August 16, 2025, 12:58:33 pm »
Fixed in r13710.