On Sun, 15 Feb 2009 12:08:56 -0500, Norman Ramsey wrote:
>> Source code:
> >
> > target memsize 8 byteorder little pointersize 32 wordsize 32; /* main
> > entry point */ foreign "C" H3(bits32 H4/* parameters *//* parend */){
> > bits32 foo;
> > foo = 0000000008;
> > }
> >
> > Messages:
> >
> > hend...@lovesong:~/dv/lang/a68h/workspace$ qc-- -globals -o gack2
> > gack2.c--
> > This can't happen: bad unsigned integer literal '0000000008' Fatal
> > error: exception Impossible.Impossible("bad unsigned integer literal
> > '0000000008'")
> > hend...@lovesong:~/dv/lang/a68h/workspace$
> >
> >
> > Well, it can happen -- it's in the source code, and seems to be
> > passed through without a check until it reaches the "this can't
> > happen" stage.
> >
> > Fortunately, my workaround is obvious -- I should just stop emitting
> > ten- digit versions of four-bit values.
>
> Actually what you should do is stop emitting octal literals containing
> non-octal digits. I've made a note to do something about the error
> message.
Good point! I hadn't noticed that C-- followed the convention of
starting octal numbers with a zero. I thought it was is was a confusing
design in assembly languages when I first saw it in the sixties, but it
is a tradition now, ensconced in C, and preserved faithfully in C--.
I admit that using 'O' to indicate octal, which is conceptually cleaner,
wasn't much good in the days when everything was upper-case, and 10O
would be confused with 100.
-- hendrik
_______________________________________________
Cminusminus mailing list
[email protected]
https://cminusminus.org/mailman/listinfo/cminusminus