Coder Social home page Coder Social logo

Enable C89 support about printf HOT 12 OPEN

lygstate avatar lygstate commented on July 20, 2024
Enable C89 support

from printf.

Comments (12)

eyalroz avatar eyalroz commented on July 20, 2024

The library is currently written with C99 assumed. What would it take to make it compile as C89? Apart from the comment style change?

Also, do the C compiler on vxWorks 6.x really not support C99?

from printf.

lygstate avatar lygstate commented on July 20, 2024

The library is currently written with C99 assumed. What would it take to make it compile as C89? Apart from the comment style change?

Also, do the C compiler on vxWorks 6.x really not support C99?

its default option didn't support for double line comment

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

its default option didn't support for double line comment

And with a non-default option?

Also, there are many other changes which would be necessary to make the library C89-compliant. Specifically, we would need to not use long long and avoid mixing declarations and code. How come the vxWorks compiler accepts it then?

from printf.

lygstate avatar lygstate commented on July 20, 2024

its default option didn't support for double line comment

And with a non-default option?

Also, there are many other changes which would be necessary to make the library C89-compliant. Specifically, we would need to not use long long and avoid mixing declarations and code. How come the vxWorks compiler accepts it then?

Currently only use block line comment is enough. long long is supported

from printf.

lygstate avatar lygstate commented on July 20, 2024

The header is present, it's just the header with -ansi option

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

Currently only use block line comment is enough. long long is supported

So, what you're asking is not C89 support, nor C90 support. Perhaps we can accommodate your compiler by some kind of CMakeLists.txt check, that would add an appropriate flag for // comment support?

from printf.

lygstate avatar lygstate commented on July 20, 2024

Currently only use block line comment is enough. long long is supported

So, what you're asking is not C89 support, nor C90 support. Perhaps we can accommodate your compiler by some kind of CMakeLists.txt check, that would add an appropriate flag for // comment support?

Yeap, it's a -ansi option. I've seen a lot more compiling warning, I think achieve that would receive broader usage

from printf.

eyalroz avatar eyalroz commented on July 20, 2024

Yeap, it's a -ansi option

I think you've misread what I've written. The -ansi option, at least with compilers such as clang and gcc, does not add support for anything; it is essentially equivalent to -std=c90, which contradicts std=c99, and restricts rather than relaxing constraints.

At any rate, it remains unclear to me what you are asking and for purpose.

from printf.

Related Issues (20)

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.