Re: Porting GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2025-09-09 at 23:45 +0200, Arsen Arsenović via Gcc-help wrote:
> Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> writes:
> 
> > Yup.  Some *very* old programs used alloca where "malloc" would he more
> > modern style.  The two do similar things, but they aren't completely
> > interchangeable.  alloca() is a nicer interface for some programming
> > styles.
> > 
> > alloca() isn't C standard, and it isn't even POSIX, but most systems
> > do have it.  C variable length arrays *are* standard C (of course), and
> > they are often implemented using alloca().
> 
> Ah, indeed, you're right.  I was under the impression it is in the
> standard proper.
> 
> My bad.
> 
> We claim to be able to build using an ISO C++14 compiler, though (and
> presumably a C compiler of similar age), so perhaps we shouldn't use
> alloca.

The claim is not fully true anyway... for example we perform narrowing
conversions from constant, but C++14 does not allow to do so.

So for a new target it seems easier to bootstrap GCC via canadian cross.

-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux