[comp.lang.c++] CC, emacs, and the three bears

colin@tcs.com (Colin Kendall) (06/07/91)

I am using /usr/bin/CC on an HP9000S300. I believe that
is the HP-UX C++ translator.

I am also using GNU Emacs version 18.55.something.

I have recently discovered a highly useful feature in emacs whereby
the user can simply say 'compile' and all the make output is
spewed into a buffer. While the make is continuing, the user
can use a command to move to the next error in the buffer and
simultaneously pull up the relevant source file, positioned to
the offending line, in another buffer. 

However, emacs can only recognize errors when they are in a
certain format. Consider the following partial output from
a make:


compiling ../getmaps.c
	rm -f getmaps.o
	/usr/bin/CC -c  -Aa -g -I.. -I$WORKROOT/include -I$PROJROOT/include -I$TOOLROOT/include -I/usr/include/CC -I$PROJROOT/include/Std -DANSI -DSYSV -D__cplusplus  ../getmaps.c
getmaps.c: 18: warning- extra characters on #endif.
cfbasics.h: 37: warning- Redefinition of macro ANSI.
getmaps.c: 610: warning- extra characters on #endif.
CC: "../getmaps.c", line 116: warning 117:  id not used

Emacs recognized the first three warnings (from cpp), but not the
fourth (from cfront).

I want it to recognize all the errors and warnings.

One partial solution is to wait until the make is finished, then
run some script on the error buffer to convert all the errors to
a recognizable format, then start going through the errors. But I
would prefer this to be done automatically, and I would rather not
wait until the make is finished.

So if anyone has some better idea, let's have it...
--


colin 

mnm@hpcupt3.cup.hp.com (Michey Mehta) (06/12/91)

In response to feedback from customers, the 2.1 compilers from HP
emit error messages in a different format:

Version 2.0:
CC: "foo.c", line 3: error 1342: bad base type: int class foo

Version 2.1:
CC: "foo.c", line 3: error: bad base type: int class type foo (1342)

Michey Mehta
Hewlett-Packard California Language Lab