Comments (3)
I think I did the original "place closing bracket on same line as statement causing it" just so line numbers wouldn't change too much. I don't mind at all if we just add a newline before each inserted closing bracket.
from c99-to-c89.
I think that in this particular case the tool considers lines
int b;
#line 1 "D:\qwe.c"
as one block that requires a new scope. So the closing brace is inserted at the end of the second line.
Inserting a newline before the brace, in my opinion, is not the best option as it will change the line numbers. It will break the debug for those people who use the tool for code instrumentation as an intermediate step (just as I do in my project).
So as proposed in my fix we can insert the bracket right on the next line if the firstly intended line is not a complete statement (ends with ";" or "}").
from c99-to-c89.
That's fine also. I always had this long-term idea that I'd insert #line directives through this tool to maintain original line numbers in the MSVC debugger, but that never happened so ... ohwell.
from c99-to-c89.
Related Issues (16)
- #define causes c99conv to crash HOT 4
- Incorrect conversion of multiword specificators in loop statements
- Infinite loop while converting multidimensional initialization list
- Converting of a nested designator failes
- Compilation with dynamic runtime libraries (--extra-cflags="-MD") causes unresolved external HOT 1
- conceals failures from cl
- Support for variable length arrays HOT 1
- Support complex numbers
- The wrapper identifies the output file as the input source file HOT 2
- For loops with variable declaration messes up token input/output positions
- Casts in enum expressions make the converter fail an assertion HOT 4
- fails to handle __declspec(dllimport) properly HOT 9
- Nested loops are mangled HOT 1
- Mangled else if construct when converting inline structs
- regression in c99-to-c89 1.0.2: makedef may generate incorrect def-file HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c99-to-c89.