This is the mail archive of the
mailing list for the GCC project.
Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)
- From: Warren D Smith <warren dot wds at gmail dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: david at westcontrol dot com, gcc at gcc dot gnu dot org
- Date: Tue, 26 Jul 2016 15:48:42 -0400
- Subject: Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)
- Authentication-results: sourceware.org; auth=none
- References: <CAAJP7Y3cHYEOpdhZUXF1PZAJ=vkKoozRiPgwm2V_jH_T63XTKw@mail.gmail.com> <CAH6eHdRrmRWARhbcqWbqV07Y=SZp+Hsiv5-42y2k28CHqP4+UQ@mail.gmail.com> <CAAJP7Y0oRZmE4qS=shs4m7EWjWK2RfZdK2NSe1Kx1ZUT6W=QZw@mail.gmail.com> <57979B3B.email@example.com> <CAAJP7Y1SpgdXPubqZkJCTqUrg2uHTfRz2oVyCf0vDdnyTKAKCw@mail.gmail.com> <CAAJP7Y2-JcjiKXZ3xdpXnjPnAMj64SZQSY8s8euj4VZOo9SzLg@mail.gmail.com> <5797ABB0.firstname.lastname@example.org> <CAAJP7Y3uG3paTsnGFrUdpygQ7h7W_JR4pkbkYdfvnaJGbHbzgw@mail.gmail.com> <20160726193048.067DA33CA8@vlsi1.gnat.com>
It *isn't* "putting every possible feature into every language."
Did I ever advocate that?
It's "putting a feature that you already put there, into the language,
just no longer
arbitrarily selecting certain integer sizes and excluding others."
Am I making syntax more complicated? No. I am if anything
suggesting making it simpler by removing arbitrary rules that only
complicated situation. Am I making compiler more complicated? No,
the code to do this was already written (just with different numbers),
and by doing what I say the compiler could actually be simplified
in some ways.
And no, I do not think "saving a life" worth of time
is "completely meaningless."
And also, it is actually C's explicit mission to be close to the
machine, trying basically
to provide a user-friendly portable machine-model. Given that is its
it is rather absurd to disallow access to various common machine
multiply-hi&lo, shift with carry, etc. Adding those would in no way
complicate the overall language design, it'd just be another builtin
function just like the ones you already have put in. If I told you to
remove div(a,b) from GCC because it was a fairly silly complication
and unnecessary feature, that'd be true, and yet you would tell me I
was an idiot.
If I tell you to put in mul(a,b): then it is a less-silly,
more-useful, thing, which
you just (see previous sentence) agreed with me was worthwhile.
Warren D. Smith
http://RangeVoting.org <-- add your endorsement (by clicking
"endorse" as 1st step)