We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5500 - Windows CMake build broken for GCC/Clang due to violation of -Werror=declaration-after-statement
Summary: Windows CMake build broken for GCC/Clang due to violation of -Werror=declarat...
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-24 12:02 UTC by Brandon DeRosier
Modified: 2021-01-24 13:30 UTC (History)
1 user (show)

See Also:


Attachments
Mercurial patch to fix build (999 bytes, text/plain)
2021-01-24 12:02 UTC, Brandon DeRosier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brandon DeRosier 2021-01-24 12:02:44 UTC
Created attachment 4699 [details]
Mercurial patch to fix build

Attached a quick mercurial patch to fix.

src\video\windows\SDL_windowsevents.c:438:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

The included `CMakeLists.txt` intentionally passes `-Werror=declaration-after-statement` if the compiler supports it. `SDL_windowsevents.c:438` is the only location currently violating this. (Broken a few hours ago by https://hg.libsdl.org/SDL/changeset/14778)
Comment 1 Ozkan Sezer 2021-01-24 13:30:38 UTC
Edited the commit message a bit and pushed the patch as
https://hg.libsdl.org/SDL/rev/395cc2864bb7

Thanks.