Skip to content

selfcheck.sh: also run with system includes made available - #438

Merged
firewave merged 2 commits into
cppcheck-opensource:masterfrom
firewave:selfcheck-sys-x
Oct 2, 2025
Merged

selfcheck.sh: also run with system includes made available#438
firewave merged 2 commits into
cppcheck-opensource:masterfrom
firewave:selfcheck-sys-x

Conversation

@firewave

Copy link
Copy Markdown
Collaborator

No description provided.

@firewave

This comment was marked as resolved.

@firewave

Copy link
Copy Markdown
CollaboratorAuthor

This fails with

/usr/include/c++/15.1.1/ext/atomicity.h:39: syntax error: failed to evaluate #if condition, division/modulo by zero

The code in question:

#if __has_include(<sys/single_threaded.h>)
# include<sys/single_threaded.h>
#endif

@firewave
firewaveforce-pushed the selfcheck-sys-x branch 2 times, most recently from 508ffaf to fdae274CompareJune 11, 2025 11:24
@firewave
firewaveforce-pushed the selfcheck-sys-x branch 2 times, most recently from dd1cc3f to fbb316fCompareAugust 4, 2025 10:59
@firewave

Copy link
Copy Markdown
CollaboratorAuthor

It now fails with

/usr/include/c++/v1/__availability:78: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_feature( ... )

or

/usr/include/c++/v1/__assert:29: syntax error: failed to evaluate #if condition, undefined function-like macro invocation: __has_builtin( ... )

@danmardanmar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm.. my problem with this could be that maybe there will be problem in CI and no problem locally .. or no problem in CI today and then we get problems a year from now.

are the headers in a github runner fixed so they are never changed? or can they be changed at anytime (from one day to the next)?

@firewave

Copy link
Copy Markdown
CollaboratorAuthor

hmm.. my problem with this could be that maybe there will be problem in CI and no problem locally ..

Yes, that is a bit of a shortcoming. That might need some adjustment if encountered. But as we are just checking for errors and not the actual output it should be fine.

or no problem in CI today and then we get problems a year from now.

That can happen with anything in any workflow because the runners (and all other parts of the GitHub workflows) are constantly changing.

are the headers in a github runner fixed so they are never changed? or can they be changed at anytime (from one day to the next)?

No, they are not. But as mentioned above that is an issue we are constantly facing with any part of GitHub workflows.

@firewave

This comment was marked as resolved.

@firewave
firewave marked this pull request as draft September 11, 2025 09:51
@firewave

Copy link
Copy Markdown
CollaboratorAuthor

After integrating this with MinGW I have a few cleanups for this.

@firewave

Copy link
Copy Markdown
CollaboratorAuthor

Yes, that is a bit of a shortcoming. That might need some adjustment if encountered.

This can be improved upon later by getting the built-in include paths from the compiler (if possible).

I think I have that figured out as well.

@firewave

This comment was marked as resolved.

@firewave
firewaveforce-pushed the selfcheck-sys-x branch 4 times, most recently from 81a82d0 to 6abcbe6CompareSeptember 16, 2025 18:09
@firewavefirewave mentioned this pull request Sep 16, 2025
Comment threadselfcheck.sh
@@ -1,11 +1,111 @@
#!/bin/sh
#!/bin/bash

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Needed so the <<< syntax works.

@firewave
firewave marked this pull request as ready for review October 1, 2025 15:30
@firewave
firewave merged commit a5fdea9 into cppcheck-opensource:masterOct 2, 2025
16 checks passed
@firewave
firewave deleted the selfcheck-sys-x branch October 2, 2025 10:11
Sign up for freeto 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

@firewave@danmar