This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: programming language that does not inhibit further optimization by gcc


On Mon, Oct 14, 2013 at 5:31 PM, Albert Abramson
<abramson.albert@gmail.com> wrote:
>
> Is there a language out there (similar to Fortran or a dialect of C)
> that doesn't inhibit the compiler from taking advantage of every
> optimization possible?

Sure: Fortran.


> Is there some way to provide a C/C++ compiler
> with extra information about variables and programs so that it can
> maximize performance or minimize size?  For example:
>
> int age = 21;    //[0, 150)  setting maximum limits, compiler could use byte int
> int outsideTemp = 20;    //[-273, 80]
> float ERA = 297;           //[0, 1000, 3]   [min, max, digits of
> accuracy needed]

Hmmm, OK, that kind of thing is available in PL/1 and, I think, in
Ada.  But as far as I know it doesn't help compilers very much in
practice.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]