From 7cf3f604fb102ba67ce3abe7e97440b4ed0da92e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Tue, 19 May 2020 13:20:32 -0700 Subject: 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. --- libcpp/system.h | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'libcpp/system.h') diff --git a/libcpp/system.h b/libcpp/system.h index 37fc262..0a0629d 100644 --- a/libcpp/system.h +++ b/libcpp/system.h @@ -422,26 +422,6 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; #define gcc_checking_assert(EXPR) ((void)(0 && (EXPR))) #endif -/* Provide a fake boolean type. We make no attempt to use the - C99 _Bool, as it may not be available in the bootstrap compiler, - and even if it is, it is liable to be buggy. - This must be after all inclusion of system headers, as some of - them will mess us up. */ -#undef bool -#undef true -#undef false -#undef TRUE -#undef FALSE - -#ifndef __cplusplus -#define bool unsigned char -#endif -#define true 1 -#define false 0 - -/* Some compilers do not allow the use of unsigned char in bitfields. */ -#define BOOL_BITFIELD unsigned int - /* Poison identifiers we do not want to use. */ #if (GCC_VERSION >= 3000) #undef calloc -- cgit v1.1