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

Fix clang compilation for tests dep 'cppdotenv' #4468

Merged
merged 19 commits into from
Mar 18, 2024
Merged

Conversation

JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Mar 11, 2024

Minimal changes for fixing the cppdotenv compilation under clang. Removes an unnecessary using directive since fully qualified names are used within the file anyway.

Extra details

There is another potential solution, that involves fixing all the ambiguities that arise when the namespace is included in the global one by the using directive. Several changes are required within the same file, for fixing these ambiguities, clang appears more sensitive that gcc and requires a full path from global namespace :: for being able to do proper name resolution. It's left here as no more than an interesting read:

nm_clang_fix_fqualified.txt

@mirostauder
Copy link
Collaborator

mirostauder commented Mar 12, 2024

added fixes based on CLang warnings:

  • wrong comparisons
  • wrong bracketing
  • wrong types
  • wrong format strings
  • missing c_str() conversion
  • missing type casts
  • pointer arithmetic
  • bad function call

other:

  • compiler calls via $(CXX)
  • privileged containers
  • ASAN/ASLR limitation workaround

ASAN breaks with ASLR > 28bits used by recent kernels
google/sanitizers#1716

@mirostauder
Copy link
Collaborator

retest this please

@renecannao renecannao merged commit cf1705b into v2.x Mar 18, 2024
172 checks passed
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.

3 participants