aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.stanford.edu>2001-01-05 23:41:00 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-01-05 23:41:00 +0000
commitf4cdc368349bc046cd0874408bad7fc6f2104a3a (patch)
treed4a4a93914e1c41a8f3f7e9b66d5a2e9ca0a0bac /gcc/cpplib.h
parent3326b760b32854ee0f513b44d0be770fad8f49e6 (diff)
downloadgcc-f4cdc368349bc046cd0874408bad7fc6f2104a3a.zip
gcc-f4cdc368349bc046cd0874408bad7fc6f2104a3a.tar.gz
gcc-f4cdc368349bc046cd0874408bad7fc6f2104a3a.tar.bz2
cpplib.h (struct cpp_reader): Add help_only field.
* cpplib.h (struct cpp_reader): Add help_only field. * cppinit.c (COMMAND_LINE_OPTIONS): Add OPT_version. (cpp_handle_option): Set pfile->help_only if we see -h, --help, -target-help, or --version. Print version string but do not set help_only if we see -v or -version. Make text printed by -v match that printed by (-)-version. * cppmain.c (main): Exit after option parsing if pfile->help_only is true. * toplev.c (independent_decode_option): Call print_version, then exit, if we see --version (but not -version). (print_version): Split lengthy message into two lines. From-SVN: r38733
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index c2049d7..7b53d09 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -616,6 +616,10 @@ struct cpp_reader
/* True if we are skipping a failed conditional group. */
unsigned char skipping;
+
+ /* True if --help appeared in the options. Caller should then bail
+ out after option parsing and printing its own help. See cppmain.c. */
+ unsigned char help_only;
};
#define CPP_FATAL_LIMIT 1000