-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WinCon : OpenWATCOM (and probably some other compilers) require varia…
…bles to be declared at the start of a block.
- Loading branch information
Showing
1 changed file
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
89e3426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually a C89 issue. Same would happen with VS2008 and earlier, as well as a bunch of other compilers (partially only with c89 mode set / no newer mode set).
89e3426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely caught. Apparently, this wasn't allowed in C90, either. Compiling some code with gcc using the options
-std=c90 -Wpedantic -Werror
, I got(Same if I made that
-std=c89
.) I now recall we ran into this issue some time ago with some code on the PDCurses side.Ideally, I'd modify the commit message. It's not the first time I've been annoyed by the fact that there is no good, or even passable, way of modifying a commit message once it's been pushed to the server (easy to do before then, of course).
89e3426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-) yes, I regularly find me adjusting svn commit messages in "my" project (sometimes mine, but mostly the one from others when they have "useful" log messages like "fix"); that works in svn because the message is a property (just as the date, which is sometimes useful to adjust, too) and when you set the repo to allow those changes for some users (actually that should be quite limited) ...
What about changing at least on of the CI workers (the fastest one, so likely a GH action) to use
-std=c89 -Wpedantic -Werror
where we don't explicit request a newer version in the port's README?