aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-05-19 13:20:32 -0700
committerNathan Sidwell <nathan@acm.org>2020-05-19 13:23:47 -0700
commit7cf3f604fb102ba67ce3abe7e97440b4ed0da92e (patch)
treeec6a6db751a99154923cb1cc9f884eaf244d7680 /libcpp/include/cpplib.h
parent98452668d362bb9e6358f7eb5cff69f4f5ab1d45 (diff)
downloadgcc-7cf3f604fb102ba67ce3abe7e97440b4ed0da92e.zip
gcc-7cf3f604fb102ba67ce3abe7e97440b4ed0da92e.tar.gz
gcc-7cf3f604fb102ba67ce3abe7e97440b4ed0da92e.tar.bz2
preprocessor: Random cleanups
This fixes a bunch of poorly formatted decls, marks some getters as PURE, deletes some C-relevant bool hackery, and finally uses a passed-in location rather than deducing a closely-related but not necessarily the same location. * include/cpplib.h (cpp_get_otions, cpp_get_callbacks) (cpp_get_deps): Mark as PURE. * include/line-map.h (get_combined_adhoc_loc) (get_location_from_adhoc_loc, get_pure_location): Reformat decls. * internal.h (struct lexer_state): Clarify comment. * system.h: Remove now-unneeded bool hackery. * files.c (_cpp_find_file): Store LOC not highest_location.
Diffstat (limited to 'libcpp/include/cpplib.h')
-rw-r--r--libcpp/include/cpplib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index 7f47402..544735a 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -969,10 +969,10 @@ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
call cpp_finish on that reader. You can either edit the callbacks
through the pointer returned from cpp_get_callbacks, or set them
with cpp_set_callbacks. */
-extern cpp_options *cpp_get_options (cpp_reader *);
-extern cpp_callbacks *cpp_get_callbacks (cpp_reader *);
+extern cpp_options *cpp_get_options (cpp_reader *) ATTRIBUTE_PURE;
+extern cpp_callbacks *cpp_get_callbacks (cpp_reader *) ATTRIBUTE_PURE;
extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
-extern class mkdeps *cpp_get_deps (cpp_reader *);
+extern class mkdeps *cpp_get_deps (cpp_reader *) ATTRIBUTE_PURE;
/* This function reads the file, but does not start preprocessing. It
returns the name of the original file; this is the same as the