[M3devel] another longint variant
Jay K
jay.krell at cornell.edu
Sun Jan 10 09:55:31 CET 2010
> If there are "promotion rules" it's just not that obvious. I'm reminded of one
> time when I was missing a prototype in a C program.............. ok that story
> could go on and on.
You were using a bad compiler or at least bad switches:
C:\>type t.c
void F1()
{
F2();
}
C:\>cl -c -W4 -WX t.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
t.c
t.c(5) : error C2220: warning treated as error - no 'object' file generated
t.c(5) : warning C4013: 'F2' undefined; assuming extern returning int
and C++ always errors.
- Jay
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] another longint variant
> Date: Sat, 9 Jan 2010 16:25:52 -0800
> From: mika at async.async.caltech.edu
>
> Jay K writes:
> >--_953e6126-a89e-4966-8f22-5ccff92e7117_
> >Content-Type: text/plain; charset="iso-8859-1"
> >Content-Transfer-Encoding: quoted-printable
> >
> >
> > > I believe Rodney said something like "mixed operations follow from assig=
> >nability"=3B
> > > and from a language point of view=2C that may be true=2C just not from t=
> >he point of view=3B
> >
> >I meant to say=2C not from the language implementation point of view.
> >
> >Again=2C if I can assign and then add=2C might as well just allow add?
> >Ditto assign and index=2C assign and multiply=2C etc.
> >
>
> The problem is that it's sometimes ambiguous what the result type is.
>
> If you want to get into this kind of mess, why don't you just program in C...
>
> I think this area is probably one of the reasons some people *like* Modula-3.
> We don't want to have to guess what an expression means... it should be obvious.
> If there are "promotion rules" it's just not that obvious. I'm reminded of one
> time when I was missing a prototype in a C program.............. ok that story
> could go on and on.
>
> Mika
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100110/5f4fff7d/attachment-0002.html>
More information about the M3devel
mailing list