Giter VIP home page Giter VIP logo

Comments (3)

rbultje avatar rbultje commented on August 15, 2024

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.

 avatar commented on August 15, 2024

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.

rbultje avatar rbultje commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.