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

Use ISO standard attributes #582

Closed
wants to merge 2 commits into from
Closed

Use ISO standard attributes #582

wants to merge 2 commits into from

Conversation

jbowler
Copy link
Contributor

@jbowler jbowler commented Sep 7, 2024

This removes the compiler specific code in favour of the newly
standardized __has_c_attribute. This is supported in the principle
compilers (gcc, clang, vc) and, now that it is standard, should be
supported in other compilers too, for example icc and, presumably if
they are maintained, Watcom and Borland.

Passes multiple tests with gcc and clang including cross-compilation
with gcc.

Signed-off-by: John Bowler [email protected]

@jbowler jbowler changed the base branch from libpng16 to master September 7, 2024 00:29
This removes the compiler specific code in favour of the newly
standardized __has_c_attribute.  This is supported in the principle
compilers (gcc, clang, vc) and, now that it is standard, should be
supported in other compilers too, for example icc and, presumably if
they are maintained, Watcom and Borland.

Passes multiple tests with gcc and clang including cross-compilation
with gcc.

Signed-off-by: John Bowler <[email protected]>
GCC issues warnings for unsupported attributes and quite possibly other
compilers do too.  This changes the pngconf.h implementation to
explicitly check for each attribute when defining a macro based on it.

Signed-off-by: John Bowler <[email protected]>
@jbowler
Copy link
Contributor Author

jbowler commented Sep 11, 2024

Merge conflict disaster area.

@jbowler jbowler closed this Sep 11, 2024
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.

1 participant