FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use __typeof__ GNUC keyword for ISO C compatibility by duncanthomson · Pull Request #6041 · libgit2/libgit2 · GitHub

Use __typeof__ GNUC keyword for ISO C compatibility - #6041

Merged
ethomson merged 1 commit into
libgit2:mainfrom
Esri:duncan/typeof
Sep 14, 2021
Merged

ethomson merged 1 commit into
libgit2:mainfrom
Esri:duncan/typeof

Conversation

Copy link
Copy Markdown
Contributor

For issue: #6040

This PR converges on the use of __typeof__ instead of typeof for ISO C compatibility with this GCC extension.

All uses of typeof or __typeof__ are presently confined to #if defined(__GNUC__) / #endif blocks, which should limit the impact of this change.

Details:

  • Remove the GIT_TYPEOF macro, since this is not used in the libgit2 project.
  • Replace all occurrences of typeof(x) with __typeof__(x).

lhchavez commented Sep 9, 2021

Copy link
Copy Markdown
Contributor

does clang with -std=c99 build cleanly after this change? if so, maybe it may be worth (in a separate PR) adding -std=c99 to the xenial builders in .github/workflows/main.yml. that way we won't backslide ^^;;

Copy link
Copy Markdown
Member

Nice catch, thanks for the fix!

ethomson merged commit 646bae3 into libgit2:main Sep 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL