[Coco] CMOC C-like cross-compiler now supports const

S Klammer sklammer at gmail.com
Wed Mar 21 21:08:19 EDT 2018


Thank-you Pierre for your continued work on your CMOC project.

As an aside, does anyone know if Derek's derivative (?), WinCMOC, will be
continued?

On Wed, Mar 21, 2018, 6:40 PM Pierre Sarrazin <sarrazip at sarrazip.com> wrote:

> Hi James,
>
> Types like `const char *' are supported.
>
> Read-only globals are put in the read-only section, next to the code,
> and references to those globals are made with ,PCR.
>
> Writable globals are put in the data section, and references to those
> globals are made with ,Y, where Y points to the data segment.
>
> If there is a C program example that might cause trouble under OS-9,
> I'll try it out.
>
>
> Dixit James Jones (2018-03-20 20:24):
> > Can pointer types be const qualified? That causes major difficulties in
> > OS-9, because position-independent code and data that lives in some place
> > determined at run time and pointed at by a register makes it impossible
> to
> > correctly do const-qualified pointers.
> >
> >
> > On Tue, Mar 20, 2018 at 7:14 PM, Pierre Sarrazin <sarrazip at sarrazip.com>
> > wrote:
> >
> > > - The `const' keyword is now supported. Warnings are issued for
> > >   statements that are not const-correct. The warnings can be silenced
> > >   by giving the command-line option "-Wno-const".
> > >
> > >   Global arrays of const integers are automatically put in the
> read-only
> > >   data section, which should make the #pragma const_data directive
> > >   obsolete.
>     [...]
>
> --
> Pierre Sarrazin <sarrazip @ sarrazip . com>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list