Re: [dev] C variants, compilers and completeness

2023-08-19 Thread Miles Rout
On 19 August 2023 12:37:23 am NZST, "Страхиња Радић"  
wrote:
>I haven't checked recently, but the most noticeable missing feature of cproc, 
>as well as some other compilers, were VLAs. When someone writes the support 
>for 
>VLAs, cproc & co. will become much more usable.

VLAs are optional in the latest C standards and
 didn't exist at all in C89.  They are a misfeature,
 at least when put on the stack.  They're quite
 useful as a type system feature for index and
 size calculations though.

>The simpler compilers generally work for smaller projects, but for many 
>existing packages, for now there is no real alternative to GCC and Clang/LLVM.

Sadly, this is true.  Most software seems to use
 some extensions from GCC.  The only reason
 clang is usable is that it tries to be
 bug-compatible with GNU extensions.

Something we can all do is try to patch software
 to be more compatible.  If you know that there is
 software out there that could use only
 standardised features but uses GNU extensions
 unnecessarily, consider submitting a patch. 
 That would be better than bloating these small
 compilers by adding all of GNU's bad ideas.

Unfortunately, some people (*cough* systemd
 *cough*) deliberately use non-standard features
 in incompatible ways with the object of being
 incompatible, and for no other reason. But most
 programmers are saner than that, I think.

This would also help those developers: other
 compilers tend to compile a lot faster than
 GCC/clang, at the cost of optimisations that
 are probably turned off during development
 anyway.

Have a nice day,
M.



Re: [dev] C variants, compilers and completeness

2023-08-18 Thread Страхиња Радић
On 23/08/18 02:18, David Demelier wrote:
> On Mon, 2023-07-24 at 17:38 +0200, Sagar Acharya wrote:
> > I see C compilers recommended by suckless are:
> > 
> > tinycc
> > simplecc
> > cproc
> > qbe
> > lacc
> 
> qbe isn't a compiler. however cproc is promising but I had various
> issues compiling some apps, can't use it as my daily for now.

I haven't checked recently, but the most noticeable missing feature of cproc, 
as well as some other compilers, were VLAs. When someone writes the support for 
VLAs, cproc & co. will become much more usable.

The simpler compilers generally work for smaller projects, but for many 
existing packages, for now there is no real alternative to GCC and Clang/LLVM.


signature.asc
Description: PGP signature


Re: [dev] C variants, compilers and completeness

2023-08-18 Thread David Demelier
On Mon, 2023-07-24 at 17:38 +0200, Sagar Acharya wrote:
> I see C compilers recommended by suckless are:
> 
> tinycc
> simplecc
> cproc
> qbe
> lacc

qbe isn't a compiler. however cproc is promising but I had various
issues compiling some apps, can't use it as my daily for now.

-- 
David



Re: [dev] C variants, compilers and completeness

2023-08-01 Thread LM
On Mon 24 Jul 2023, Sagar Acharya wrote:
> I see C compilers recommended by suckless are:
>
> tinycc
> simplecc
> cproc
> qbe
> lacc
>
> Which variant of C do they offer? What are the differences and do they offer 
> sufficient features to express with a program completely?

I tried to check if Michael Forney's C compiler was on the list and ran across
this page while searching:
https://developers.redhat.com/blog/2021/04/27/the-mir-c-interpreter-and-just-in-time-jit-compiler#how_the_mir_c_compiler_compares_with_other_c_compilers
Thought it had some interesting comparisons of the compilers even if it is
comparing them to an interpreter.  Michael Forney's compiler is cproc which I
thought was a very interesting and well designed alternative to GNU and llvm.
I've also read that Rob Landley (who was active on the musl mailing list) had
plans to work on a C compiler, but I think that project is dead.  The code he
was working on is still available and there's more information about his tcc
forks here: https://landley.net/code/tinycc/  I know some projects use tcc
successfully, but they're usually small projects.  I thought pcc was also
interesting for its cross platform capabilities, but probably not as efficient
as some of the other choices and I think the version of C supported was rather
dated.

Sincerely
L. Michaels
https://www.softwarefreedomday.org/



Re: [dev] C variants, compilers and completeness

2023-08-01 Thread Pontus Stenetorp
On Mon 24 Jul 2023, Sagar Acharya wrote:
> 
> I see C compilers recommended by suckless are:
> 
> tinycc
> simplecc
> cproc
> qbe
> lacc
> 
> Which variant of C do they offer? What are the differences and do they offer 
> sufficient features to express with a program completely?

Whether they are sufficient depends on your use case. Everything else is 
covered in their documentation.

https://bellard.org/tcc

http://git.simple-cc.org/scc/file/README.html

https://sr.ht/~mcf/cproc

https://github.com/larmel/lacc



[dev] C variants, compilers and completeness

2023-07-24 Thread Sagar Acharya
I see C compilers recommended by suckless are:

tinycc
simplecc
cproc
qbe
lacc

Which variant of C do they offer? What are the differences and do they offer 
sufficient features to express with a program completely?

Kindly comment some more on your explanation.
Thanking you
Sagar Acharya
https://humaaraartha.in