[M3devel] Sneaky C++isms in m3cc

Jay jay.krell at cornell.edu
Sat Apr 25 00:02:23 CEST 2009


It's 7.0 or 7.1.
  file should tell you this.
  In time it should be renamed I386_FREEBSD.
  In time maybe I'll get out regular "boot" archives that are version-independent.
  The Modula-3 code pretty much only interfaces with our own C code, thus making the assembly for our Modula-3 ABI-independent (the part of ABI that is the signatures of open, etc., not the part that is the function call protocol).
 
I'll fix the C++-ism.
Well understood.
 
 - Jay



----------------------------------------
> To: m3devel at elegosoft.com
> Date: Fri, 24 Apr 2009 09:57:32 -0700
> From: mika at async.caltech.edu
> CC: mika at camembert.async.caltech.edu
> Subject: [M3devel] Sneaky C++isms in m3cc
>
>
> As usual, my quest to switch to CM3 ends up in my attempting (usually
> not very well) to bootstrap CM3. This time I am trying to build with
> cm3 5.3.1 on FreeBSD 4.11.
>
> The reason for this is that the "FreeBSD4" snapshot on elego does
> not appear to be a FreeBSD4 snapshot at all. Anyone know what OS
> this builds on? (Links to the 5.5.0 -min I contributed from a real
> FreeBSD 4 system are broken, and I can't find the source myself.)
>
> But enough of that. I noticed the following in parse.c (under m3cc):
>
> 2395 static void
> 2396 m3cg_set_source_line (void)
> 2397 {
> 2398 INTEGER (i);
> 2399
> 2400 if (option_source_line_trace) fprintf(stderr, " source line %4ld\n", i);
> 2401 #ifdef USE_MAPPED_LOCATION
> 2402 source_location s = linemap_line_start (line_table, i, 80);
> 2403 input_location = s;
> 2404 #else
> 2405 input_line = i;
> 2406 #endif
> 2407 }
>
> The code on line 2402 is a C++ism. You cannot declare variables
> in the middle of code in C. Unless it has changed with the new
> version of C, but it still won't build with older C compilers. (I'm
> using gcc 2.95.4)
>
> Mika
>


More information about the M3devel mailing list