Skip to content

Fix project compilation on GCC compilers#497

Merged
fktn-k merged 1 commit intofktn-k:developfrom
sndth:patch-2
May 22, 2025
Merged

Fix project compilation on GCC compilers#497
fktn-k merged 1 commit intofktn-k:developfrom
sndth:patch-2

Conversation

@sndth
Copy link
Copy Markdown
Contributor

@sndth sndth commented May 11, 2025

This PR fixes an issue with project compilation on GCC compilers.
Looks like the newer GCC versions shows -Werror=deprecated-literal-operator when the project is building.

I prepared a simple fix that check whether compiler is __GNUC__ and the version is newer than 6.
If yes, a new macro - FK_YAML_QUOTE_OPERATOR will use operator""_yaml, otherwise operator"" _yaml.


Pull Request Checklist

Read the CONTRIBUTING.md file for detailed information.

  • Changes are described in the pull request or in a referenced issue.
  • The test suite compiles and runs without any error.
  • The code coverage on your branch is 100%.
  • The documentation is updated if you added/changed a feature.

Please don't

  • The C++11 support varies between different compilers and versions. Please note the list of supported compilers. Some compilers like GCC 4.7 (and earlier), Clang 3.3 (and earlier), or Microsoft Visual Studio 13.0 and earlier are known not to work due to missing or incomplete C++11 support. Please refrain from proposing changes that work around these compiler's limitations with #ifdefs or other means.
  • Please refrain from proposing changes that would break YAML specifications. If you propose a conformant extension of YAML to be supported by the library, please motivate this extension.
  • Please do not open pull requests that address multiple issues.

@sndth sndth requested a review from fktn-k as a code owner May 11, 2025 10:33
@fktn-k
Copy link
Copy Markdown
Owner

fktn-k commented May 15, 2025

@sndth
Thanks for dealing with this.
Taking a brief look at the changes, I guess you're using different version of clang-format.
Please use the script under scripts directory.

@sndth
Copy link
Copy Markdown
Contributor Author

sndth commented May 15, 2025

@sndth Thanks for dealing with this. Taking a brief look at the changes, I guess you're using different version of clang-format. Please use the script under scripts directory.

Oh exactly, I am using 20.1.4 but the project is using 18.1.3.
If you want, I can bump version of clang-format, because changes between these versions in case of this project are minimal.

@fktn-k
Copy link
Copy Markdown
Owner

fktn-k commented May 15, 2025

@sndth Thanks for dealing with this. Taking a brief look at the changes, I guess you're using different version of clang-format. Please use the script under scripts directory.

Oh exactly, I am using 20.1.4 but the project is using 18.1.3. If you want, I can bump version of clang-format, because changes between these versions in case of this project are minimal.

Clang-format tools with different major versions would cause a lot of unrelated changes. Although bumping-up is ok, I'd say it's better to do so in a different PR.
Can you use scripts/run_clang_format.(sh|bat) which forces clang-format 18.1.3 for now?

@sndth
Copy link
Copy Markdown
Contributor Author

sndth commented May 15, 2025

@sndth Thanks for dealing with this. Taking a brief look at the changes, I guess you're using different version of clang-format. Please use the script under scripts directory.

Oh exactly, I am using 20.1.4 but the project is using 18.1.3. If you want, I can bump version of clang-format, because changes between these versions in case of this project are minimal.

Clang-format tools with different major versions would cause a lot of unrelated changes. Although bumping-up is ok, I'd say it's better to do so in a different PR. Can you use scripts/run_clang_format.(sh|bat) which forces clang-format 18.1.3 for now?

Yep! I just dropped commit with formatting changes and there is no files to reformat for now.

Copy link
Copy Markdown
Owner

@fktn-k fktn-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks!

@fktn-k fktn-k merged commit 721edb3 into fktn-k:develop May 22, 2025
162 of 164 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.

2 participants