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

Unknown entities in the preprocessor conditionals #9605

Merged

Conversation

albert-github
Copy link
Collaborator

With e.g. the bash package we get warnings like:

y.tab.c:728: warning: preprocessing issue while doing constant expression evaluation: syntax error: input=' (! 0L  &&  0L          && 0L<=  (( 0L) (! (! (( 0L) 0 < ( 0L) -1))   ? ( 0L) -1   : (((( 0L) 1 << ((0L *  8 ) - 2)) - 1) * 2 + 1))) )'

note e.g. the (0L)0 investigation lead to the fact that this is due to a construct with (int) i.e. a type cast.

Further investigation lead to the possibility of sizeof(int) that was not recognized.

  • type casts of basic types are ignored
  • sizeof basic types are inserted into the condition

Example: example.tar.gz
(found by Fossies for the bash package)

With e.g. the bash package we get warnings like:
```
y.tab.c:728: warning: preprocessing issue while doing constant expression evaluation: syntax error: input=' (! 0L  &&  0L          && 0L<=  (( 0L) (! (! (( 0L) 0 < ( 0L) -1))   ? ( 0L) -1   : (((( 0L) 1 << ((0L *  8 ) - 2)) - 1) * 2 + 1))) )'
```
note e.g. the `(0L)0` investigation lead to the fact that this is due to a construct with `(int)` i.e. a type cast.

Further investigation lead to the possibility of `sizeof(int)` that was not recognized.
- type casts of basic types are ignored
- sizeof basic types are inserted into the condition
@doxygen doxygen merged commit ccd8ee1 into doxygen:master Sep 26, 2022
@doxygen
Copy link
Owner

doxygen commented Sep 26, 2022

@albert-github I've changed the implementation a bit to avoid code duplication and elaborate expressions, see 70473b4. Let me know if you see issues with it.

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Sep 27, 2022
@albert-github albert-github deleted the feature/bug_preproc_conditional branch September 27, 2022 08:26
albert-github added a commit to albert-github/doxygen that referenced this pull request Sep 27, 2022
- compilation on github
- a missing tests, were also not in my original code
- shadowed variable
@albert-github
Copy link
Collaborator Author

I found some issues:

  • compilation on github, OK on my 32-bit Version 19.16.27034 for x86 (2017) error on 64-bit 19.28.29914 for x64 (2019)
  • a missing tests, were also not in my original code
  • shadowed variable

I've just pushed a proposed patch, pull request #9614

albert-github added a commit to albert-github/doxygen that referenced this pull request Sep 27, 2022
- forgot the `long double`
doxygen added a commit that referenced this pull request Sep 28, 2022
@albert-github
Copy link
Collaborator Author

Code for the problems as mentioned in #9605 (comment) has been integrated in master on GitHub (PR #9614)

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants