[comp.sys.apollo] /sys5.3/bin/cc bug?

herb@blender.UUCP (Herb Peyerl) (03/15/90)

I happened across this today... Took a few minutes to figure
out where the problem was... 

In the following line:

static char foo[50]="bar barre bahr roseanne 'r' or 'w'";

The sys5.3 compiler reports "Unterminated character string" after 
the 'r'...  The bsd4.3 compiler doesn't have a problem with it at all... 
If you use only three (3) apostrophes (') then everything is fine, however
anymore than three and it seems to blow up...


This is on a DN3500 running SR10.1 with version 6.7 of 'cc'... (if
that makes a difference...)

Has anyone else noticed this? Is there an update that I should be 
aware of?  I'm not terribly heartbroken over the whole thing myself
(I prefer bsd), however some of our engineers are doing some PRO*C
stuff and they prefer sys5.3....
-- 
---------------------------------------------------------------------
-UUCP: herb@blender.UUCP   ||  ...calgary!ajfcal!blender!{herb||root}
-ICBM: 51 03 N / 114 05 W  || Apollo Sys_admin, Novatel Communications
-"The other day, I...... No wait..... That wasn't me!" <Steven Wright>

jmd@usenet.umr.edu (Jim Dumser) (03/23/90)

In article <179@blender.UUCP> herb@blender.UUCP (Herb Peyerl) writes:
>The sys5.3 compiler reports "Unterminated character string" after 
>the 'r'...  The bsd4.3 compiler doesn't have a problem with it at all... 
>If you use only three (3) apostrophes (') then everything is fine, however
>anymore than three and it seems to blow up...

Yeah, I've found this an other bugs too.  I don't know which version of the
sys5.3 cc I was using; the OS was SR 10.1.  Anyway, "System V" is
unsupported here at UMR, and we don't get too much help with minor things
like bug reports ("yah, that's a bug alright").  My solution:  don't use it!

#! /bin/sh
if [ -n "$CCT" ]; then
  type="-T $CCT"
else
  type=
fi
echo /bsd4.3/bin/cc $type -I$HOME/include -L$HOME/lib $*
/bsd4.3/bin/cc $type -I$HOME/include -L$HOME/lib $*

I just use the bsd version, and tell it specifically to do Sys V compile
(the -T flag).  Define CCT in your environment as either "sys5.3" or
"bsd4.3."  I just checked, and apparently they've replaced -T with -A
{sys,run} (-T still works).  So you might change the type definition to
something like
	type="-A sys,$CCT -A run,$CCT"
(you may only need one, I can't tell from the man page).  

Jim

+-------------------------------------------------------+
|  The fear of the Lord is the beginning of knowledge,  |
| but fools despise wisdom and discipline. Proverbs 1:7 |
|-------------------------------------------------------|
|    Internet: jmd@ee.umr.edu     |  M S - D O S . . .  |
|    UUCP: ...uunet!umree!jmd     |    Just say "NO!"   |
+-------------------------------------------------------+

krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) (03/23/90)

The 6.7 version of CC is the current version. The compiler is the same
compiler for BSD, SYS V, and AEGIS -- only the front end that invokes
the compiler is different. If you are seeing a difference between the
BSD and SYS V environments, in may be cpp that is causing the problem.
I think (though am far from certain) that there are different versions
of cpp for BSD and SYS V. Check your /bsd4.3 and /sys5 directories.
/bsd4.3/bin/cc and /sys5/bin/cc should both be small (roughly 20 block)
programs which parse the command line and invoke /usr/apollo/lib/cc.


 -- David Krowitz

krowitz@richter.mit.edu   (18.83.0.109)
krowitz%richter.mit.edu@eddie.mit.edu
krowitz%richter.mit.edu@mitvma.bitnet
(in order of decreasing preference)