diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 21:43:09 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 21:43:09 +0000 |
commit | e484a1cc4dea83791a2a5fd2f1996dd07a699dc2 (patch) | |
tree | 3504047f1de0b4702b0d0d4991c780df4a3aad89 /gcc/cpperror.c | |
parent | 625bfde66084a35c76984479eea4debb219d384d (diff) | |
download | gcc-e484a1cc4dea83791a2a5fd2f1996dd07a699dc2.tar.gz |
* cpperror.c: Update comments and copyright.
* cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c,
cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpperror.c')
-rw-r--r-- | gcc/cpperror.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/cpperror.c b/gcc/cpperror.c index 6a3b0c149d9..375dc2ba5b3 100644 --- a/gcc/cpperror.c +++ b/gcc/cpperror.c @@ -1,6 +1,6 @@ /* Default error handlers for CPP Library. - Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000 - Free Software Foundation, Inc. + Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000, + 2001, 2002 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 @@ -36,6 +36,8 @@ static void print_location PARAMS ((cpp_reader *, unsigned int, unsigned int)); #define v_message(msgid, ap) \ do { vfprintf (stderr, _(msgid), ap); putc ('\n', stderr); } while (0) +/* Print the logical file location (LINE, COL) in preparation for a + diagnostic. Outputs the #include chain if it has changed. */ static void print_location (pfile, line, col) cpp_reader *pfile; @@ -77,7 +79,6 @@ print_location (pfile, line, col) counter, etc. LINE is the logical line number; zero means to print at the location of the previously lexed token, which tends to be the correct place by default. Returns 0 if the error has been suppressed. */ - int _cpp_begin_message (pfile, code, line, column) cpp_reader *pfile; @@ -137,7 +138,6 @@ _cpp_begin_message (pfile, code, line, column) /* For reporting internal errors. Prints "internal error: " for you, otherwise identical to cpp_fatal. */ - void cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) { @@ -156,7 +156,6 @@ cpp_ice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) (We do not exit, to support use of cpplib as a library. Instead, it is the caller's responsibility to check CPP_FATAL_ERRORS. */ - void cpp_fatal VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) { @@ -170,6 +169,7 @@ cpp_fatal VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) VA_CLOSE (ap); } +/* Print an error at the location of the previously lexed token. */ void cpp_error VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) { @@ -183,6 +183,7 @@ cpp_error VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) VA_CLOSE (ap); } +/* Print an error at a specific location. */ void cpp_error_with_line VPARAMS ((cpp_reader *pfile, int line, int column, const char *msgid, ...)) @@ -208,6 +209,7 @@ cpp_error_from_errno (pfile, name) cpp_error (pfile, "%s: %s", name, xstrerror (errno)); } +/* Print a warning at the location of the previously lexed token. */ void cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) { @@ -221,6 +223,7 @@ cpp_warning VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) VA_CLOSE (ap); } +/* Print a warning at a specific location. */ void cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column, const char *msgid, ...)) @@ -237,6 +240,7 @@ cpp_warning_with_line VPARAMS ((cpp_reader * pfile, int line, int column, VA_CLOSE (ap); } +/* Pedwarn at the location of the previously lexed token. */ void cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) { @@ -250,6 +254,7 @@ cpp_pedwarn VPARAMS ((cpp_reader * pfile, const char *msgid, ...)) VA_CLOSE (ap); } +/* Pedwarn at a specific location. */ void cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column, const char *msgid, ...)) @@ -266,7 +271,7 @@ cpp_pedwarn_with_line VPARAMS ((cpp_reader * pfile, int line, int column, VA_CLOSE (ap); } -/* Print an error message not associated with a file. */ +/* Print an error message not associated with the translation unit. */ void cpp_notice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) { @@ -282,6 +287,8 @@ cpp_notice VPARAMS ((cpp_reader *pfile, const char *msgid, ...)) VA_CLOSE (ap); } +/* Print an error message originating from ERRNO and not associated + with the translation unit. */ void cpp_notice_from_errno (pfile, name) cpp_reader *pfile; |