This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improving C++ error output?


Craig Rodrigues <rodrigc@attbi.com> writes:

| On Sat, Dec 21, 2002 at 04:16:29AM +0100, Gabriel Dos Reis wrote:
| > GCC has prefixes:
| > 
| >   "error: " for hard errors;
| >   "warning: " for warnings;
| >   "internal compiler error: " for fatal errors;
| >   "note: " for informational diagnostics.
| 
| 
| Maybe I'm failing to understand something, but
| these prefixes do not seem to be consistently used.
| 
| g++ -v 
| gcc version 3.2.1 [FreeBSD] 20021119 (release)

The 3.3.x series certainly has it; I think the main reason 3.2.x does
not have it is that the branch was frozen at the time (~ 2001-06).

| #include <stdio.h>
| 
| int
| main(int argc, char *argv)
| {
|   printf("%d\n", );
| }
| 
| a.cpp: In function `int main(int, char*)':
| a.cpp:6: syntax error before `)' token

  soliton% cat cr.C && g++ -v && g++ cr.C
  #include <stdio.h>

  int
  main(int argc, char *argv)
  {
     printf("%d\n", );
  }
  Reading specs from /home/gdr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
  Configured with: /home/gdr/redhat/egcs/configure --prefix=/home/gdr
  --enable-languages=c++ --disable-nls --enable-threads=posix :
  (reconfigured) 
  Thread model: posix
  gcc version 3.3 20021207 (experimental)
  cr.C: In function `int main(int, char*)':
  cr.C:6: error: parse error before `)' token

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]