Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test for C++ applications #1254

Merged
merged 10 commits into from
Jan 9, 2025
Merged

test: add test for C++ applications #1254

merged 10 commits into from
Jan 9, 2025

Conversation

alfredh
Copy link
Contributor

@alfredh alfredh commented Jan 7, 2025

Proposal to compile a C++ application to test libre api.

There are some build errors for ARM64-Windows:

FAILED: test/CMakeFiles/retest.dir/cplusplus.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1442~1.344\bin\Hostx64\arm64\cl.exe  /nologo /TP -DARCH=\"AMD64\" -DHAVE_ATOMIC -DHAVE_IO_H -DHAVE_PQOS_FLOWID -DHAVE_QOS_FLOWID -DHAVE_SELECT -DHAVE_UNIXSOCK=1 -DOS=\"Windows\" -DRE_VERSION=\"3.18.0\" -DVER_MAJOR=3 -DVER_MINOR=18 -DVER_PATCH=0 -DWIN32 -D_CRT_SECURE_NO_WARNINGS -D_GNU_SOURCE -D_WIN32_WINNT=0x0600 -Dretest_EXPORTS -ID:\a\re\re\test\. -ID:\a\re\re\include /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -MDd -Zi /W3 /showIncludes /Fotest\CMakeFiles\retest.dir\cplusplus.cpp.obj /Fdtest\CMakeFiles\retest.dir\ /FS -c D:\a\re\re\test\cplusplus.cpp
D:\a\re\re\include\re_atomic.h(602): error C2664: 'char __iso_volatile_load8(volatile const char *)': cannot convert argument 1 from 'const unsigned char *' to 'volatile const char *'
D:\a\re\re\include\re_atomic.h(602): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\intrin0.inl.h(273): note: see declaration of '__iso_volatile_load8'
D:\a\re\re\include\re_atomic.h(602): note: while trying to match the argument list '(const unsigned char *)'
D:\a\re\re\include\re_atomic.h(605): error C2664: 'short __iso_volatile_load16(volatile const short *)': cannot convert argument 1 from 'const unsigned short *' to 'volatile const short *'
D:\a\re\re\include\re_atomic.h(605): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\intrin0.inl.h(270): note: see declaration of '__iso_volatile_load16'
D:\a\re\re\include\re_atomic.h(605): note: while trying to match the argument list '(const unsigned short *)'
D:\a\re\re\include\re_atomic.h(608): error C2664: 'int __iso_volatile_load32(volatile const int *)': cannot convert argument 1 from 'const unsigned int *' to 'volatile const int *'
D:\a\re\re\include\re_atomic.h(608): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\intrin0.inl.h(271): note: see declaration of '__iso_volatile_load32'
D:\a\re\re\include\re_atomic.h(608): note: while trying to match the argument list '(const unsigned int *)'
D:\a\re\re\include\re_atomic.h(611): error C2664: '__int64 __iso_volatile_load64(volatile const __int64 *)': cannot convert argument 1 from 'const unsigned __int64 *' to 'volatile const __int64 *'
D:\a\re\re\include\re_atomic.h(611): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\intrin0.inl.h(272): note: see declaration of '__iso_volatile_load64'
D:\a\re\re\include\re_atomic.h(611): note: while trying to match the argument list '(const unsigned __int64 *)'
ninja: build stopped: subcommand failed.

@alfredh alfredh marked this pull request as draft January 7, 2025 16:55
@alfredh
Copy link
Contributor Author

alfredh commented Jan 8, 2025

@sreimers could you please review this ?

There is at least one fix in re_atomic.h that we could merge ...

@sreimers
Copy link
Member

sreimers commented Jan 8, 2025

There is at least one fix in re_atomic.h that we could merge ...

Can you create a extra PR for the re_atomic.h changes.

@sreimers
Copy link
Member

sreimers commented Jan 9, 2025

Looks good to me

@alfredh alfredh marked this pull request as ready for review January 9, 2025 09:02
@alfredh
Copy link
Contributor Author

alfredh commented Jan 9, 2025

this was my proposal to add C++ to retest which discovered one compile error.

Is there agreement to add C++ to retest ?

@sreimers sreimers merged commit 063865b into main Jan 9, 2025
38 checks passed
@sreimers sreimers deleted the test_cplusplus branch January 9, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants