12015-06-23 Release Manager 2 3 * GCC 4.8.5 released. 4 52015-06-12 Jakub Jelinek <jakub@redhat.com> 6 7 Backported from mainline 8 2015-04-09 Richard Biener <rguenther@suse.de> 9 10 PR pch/65550 11 * files.c (pch_open_file): Allow main and pre-included files 12 when trying to open a PCH. 13 142014-12-19 Release Manager 15 16 * GCC 4.8.4 released. 17 182014-11-28 Jakub Jelinek <jakub@redhat.com> 19 20 Backported from mainline 21 2014-11-25 Jakub Jelinek <jakub@redhat.com> 22 23 PR preprocessor/60436 24 * line-map.c (linemap_line_start): If highest is above 0x60000000 25 and we are still tracking columns or highest is above 0x70000000, 26 force add_map. 27 282014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 29 30 Backport from mainline r215873 31 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 32 33 * lex.c (search_line_fast): Add new version to be used for Power8 34 and later targets when Altivec is enabled. Restrict the existing 35 Altivec version to big-endian systems so that lvsr is not used on 36 little endian, where it is deprecated. Remove LE-specific code 37 from the now-BE-only version. 38 392014-05-22 Release Manager 40 41 * GCC 4.8.3 released. 42 432014-04-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 44 45 Backport from mainline 46 2013-11-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 47 48 * lex.c (search_line_fast): Correct for little endian. 49 502014-03-06 Jakub Jelinek <jakub@redhat.com> 51 52 Backport from mainline 53 2014-02-19 Jakub Jelinek <jakub@redhat.com> 54 55 PR preprocessor/58844 56 * macro.c (enter_macro_context): Only push 57 macro_real_token_count (macro) tokens rather than 58 macro->count tokens, regardless of 59 CPP_OPTION (pfile, track-macro-expansion). 60 61 2014-02-07 Jakub Jelinek <jakub@redhat.com> 62 63 PR preprocessor/56824 64 * line-map.c (linemap_compare_locations): Look through adhoc locations 65 for both l0 and l1. 66 672014-03-06 Jakub Jelinek <jakub@redhat.com> 68 69 PR preprocessor/60400 70 Backport from mainline 71 2013-06-24 Dehao Chen <dehao@google.com> 72 73 * files.c (_cpp_stack_include): Fix the highest_location when header 74 file is guarded by #ifndef and is included twice. 75 762013-10-16 Release Manager 77 78 * GCC 4.8.2 released. 79 802013-05-31 Release Manager 81 82 * GCC 4.8.1 released. 83 842013-04-03 Sebastian Huber <sebastian.huber@embedded-brains.de> 85 86 PR target/56771 87 * configure.ac: Require 64-bit int for arm*-*-rtems*. 88 * configure: Regenerate. 89 902013-03-22 Release Manager 91 92 * GCC 4.8.0 released. 93 942013-03-06 Jakub Jelinek <jakub@redhat.com> 95 96 PR middle-end/56461 97 * internal.h (struct cpp_buffer): Add to_free field. 98 (_cpp_pop_file_buffer): Add third argument. 99 * files.c (_cpp_stack_file): Set buffer->to_free. 100 (_cpp_pop_file_buffer): Add to_free argument. Free to_free 101 if non-NULL, and if equal to file->buffer_start, also clear 102 file->buffer{,_start,_valid}. 103 * directives.c (_cpp_pop_buffer): Pass buffer->to_free 104 to _cpp_pop_file_buffer. 105 1062013-03-01 Jakub Jelinek <jakub@redhat.com> 107 108 PR middle-end/56461 109 * files.c (_cpp_save_file_entries): Free result at the end. 110 * pch.c (cpp_string_free): New function. 111 (cpp_save_state): Use it in htab_create call. 112 (cpp_write_pch_deps): Free ss->defs. Destroy ss->definedhash. 113 1142013-02-28 Jakub Jelinek <jakub@redhat.com> 115 116 * files.c (_cpp_find_file): If returning early, before storing 117 something to *hash_slot and *hash_slot is NULL, call htab_clear_slot 118 on it. Access *hash_slot using void * type rather than 119 struct file_hash_entry * to avoid aliasing issues. 120 121 * configure.ac: Don't define ENABLE_CHECKING whenever 122 --enable-checking is seen, instead use similar --enable-checking=yes 123 vs. --enable-checking=release default as gcc/ subdir has and 124 define ENABLE_CHECKING if ENABLE_CHECKING is defined in gcc/. 125 Define ENABLE_VALGRIND_CHECKING if requested. 126 * lex.c (new_buff): If ENABLE_VALGRIND_CHECKING, put _cpp_buff 127 struct first in the allocated buffer and result->base after it. 128 (_cpp_free_buff): If ENABLE_VALGRIND_CHECKING, free buff itself 129 instead of buff->base. 130 * config.in: Regenerated. 131 * configure: Regenerated. 132 1332013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net> 134 135 PR c++/55582 136 * libcpp/lex.c (lex_raw_string): Allow string literal with suffix 137 beginning with 's' to be parsed as a C++11 user-defined literal. 138 1392013-01-14 Richard Sandiford <rdsandiford@googlemail.com> 140 141 Update copyright years. 142 1432013-01-04 Paolo Carlini <paolo.carlini@oracle.com> 144 145 PR c++/54526 (again) 146 * lex.c (_cpp_lex_direct): In C++11 mode, implement 2.5 p3, bullet 2. 147 1482013-01-03 Marc Glisse <marc.glisse@inria.fr> 149 150 PR bootstrap/50177 151 * line-map.c (get_combined_adhoc_loc): Cast from extern "C" type. 152 (new_linemap): Likewise. 153 (linemap_enter_macro): Likewise. 154 1552012-12-03 Jakub Jelinek <jakub@redhat.com> 156 157 PR bootstrap/55380 158 PR other/54691 159 * files.c (read_file_guts): Allocate extra 16 bytes instead of 160 1 byte at the end of buf. Pass size + 16 instead of size 161 to _cpp_convert_input. 162 * charset.c (_cpp_convert_input): Reallocate if there aren't 163 at least 16 bytes beyond to.len in the buffer. Clear 16 bytes 164 at to.text + to.len. 165 1662012-11-21 Steve Ellcey <sellcey@mips.com> 167 168 PR pch/55399 169 * files.c (pch_open_file): Fix check for implicit_preinclude. 170 1712012-11-16 Simon Baldwin <simonb@google.com> 172 173 * include/cpplib.h (struct cpp_options): Add canonical_system_headers. 174 * files.c (find_file_in_dir): Call maybe_shorter_path() only if 175 canonical_system_headers is set. 176 * init.c (cpp_create_reader): Initialize canonical_system_headers. 177 * configure.ac: Add new --enable-canonical-system-headers. 178 * configure: Regenerate. 179 * config.in: Regenerate. 180 1812012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net> 182 183 PR c++/54413 184 * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg. 185 (cpp_interpret_int_suffix): Add cpp_reader* arg. 186 * init.c (cpp_create_reader): Iitialize new flags. 187 * expr.c (interpret_float_suffix): Use new flags. 188 (cpp_interpret_float_suffix): Add cpp_reader* arg. 189 (interpret_int_suffix): Use new flags. 190 (cpp_interpret_int_suffix): Add cpp_reader* arg. 191 (cpp_classify_number): Adjust calls to interpret_x_suffix. 192 1932012-10-23 Ian Bolton <ian.bolton@arm.com> 194 Jim MacArthur <jim.macarthur@arm.com> 195 Marcus Shawcroft <marcus.shawcroft@arm.com> 196 Nigel Stephens <nigel.stephens@arm.com> 197 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 198 Richard Earnshaw <rearnsha@arm.com> 199 Sofiane Naci <sofiane.naci@arm.com> 200 Stephen Thomas <stephen.thomas@arm.com> 201 Tejas Belagod <tejas.belagod@arm.com> 202 Yufeng Zhang <yufeng.zhang@arm.com> 203 204 * configure.ac: Enable AArch64. 205 * configure: Regenerate. 206 2072012-10-23 Joseph Myers <joseph@codesourcery.com> 208 209 * files.c (struct _cpp_file): Add implicit_preinclude. 210 (pch_open_file): Allow a previously opened implicitly included 211 file. 212 (_cpp_find_file): Add implicit_preinclude argument. Free file and 213 do not call open_file_failed if implicit_preinclude. Store 214 implicit_preinclude value. 215 (_cpp_stack_include, _cpp_fake_include, _cpp_compare_file_date): 216 Update calls to _cpp_find_file. 217 (_cpp_stack_include): Handle IT_DEFAULT. 218 (cpp_push_default_include): New. 219 * include/cpplib.h (cpp_push_default_include): Declare. 220 * init.c (cpp_read_main_file): Update call to _cpp_find_file. 221 * internal.h (enum include_type): Add IT_DEFAULT. 222 (_cpp_find_file): Update prototype. 223 2242012-10-15 Tobias Burnus <burnus@net-b.de> 225 226 * files.c (read_file_guts, _cpp_save_file_entries): Free memory 227 before returning. 228 * lex.c (warn_about_normalization): Ditto. 229 * mkdeps.c (deps_save): Ditto. 230 * pch.c (cpp_valid_state): Ditto. 231 2322012-10-04 Florian Weimer <fweimer@redhat.com> 233 234 * directives.c (do_pragma_warning_or_error): New. 235 (do_pragma_warning): New. 236 (do_pragma_error): New. 237 (_cpp_init_internal_pragmas): Register new pragmas. 238 2392012-09-25 Dehao Chen <dehao@google.com> 240 241 PR middle-end/54704 242 * line-map.c (location_adhoc_data_hash): Fix the hash function. 243 2442012-09-25 Dehao Chen <dehao@google.com> 245 246 PR middle-end/54645 247 * include/line-map.h (location_adhoc_data): Move location_adhoc_data 248 into GC. 249 (location_adhoc_data_map): Likewise. 250 (line_maps): Likewise. 251 (rebuild_location_adhoc_htab): New Function. 252 * line-map.c (+rebuild_location_adhoc_htab): new Funcion. 253 (get_combined_adhoc_loc): Move location_adhoc_data into GC. 254 (location_adhoc_data_fini): Likewise. 255 (linemap_init): Likewise. 256 (location_adhoc_data_init): Remove Function. 257 2582012-09-19 Dehao Chen <dehao@google.com> 259 260 * include/line-map.h (MAX_SOURCE_LOCATION): New value. 261 (location_adhoc_data_fini): New. 262 (get_combined_adhoc_loc): New. 263 (get_data_from_adhoc_loc): New. 264 (get_location_from_adhoc_loc): New. 265 (location_adhoc_data_map): New. 266 (COMBINE_LOCATION_DATA): New. 267 (IS_ADHOC_LOC): New. 268 (expanded_location): New field. 269 (line_maps): New field. 270 * line-map.c (location_adhoc_data): New. 271 (location_adhoc_data_hash): New. 272 (location_adhoc_data_eq): New. 273 (location_adhoc_data_update): New. 274 (get_combined_adhoc_loc): New. 275 (get_data_from_adhoc_loc): New. 276 (get_location_from_adhoc_loc): New. 277 (location_adhoc_data_init): New. 278 (location_adhoc_data_fini): New. 279 (linemap_init): Initialize location_adhoc_data. 280 (linemap_lookup): Change to use new location. 281 (linemap_ordinary_map_lookup): Likewise. 282 (linemap_macro_map_lookup): Likewise. 283 (linemap_macro_map_loc_to_def_point): Likewise. 284 (linemap_macro_map_loc_unwind_toward_spel): Likewise. 285 (linemap_get_expansion_line): Likewise. 286 (linemap_get_expansion_filename): Likewise. 287 (linemap_location_in_system_header_p): Likewise. 288 (linemap_location_from_macro_expansion_p): Likewise. 289 (linemap_macro_loc_to_spelling_point): Likewise. 290 (linemap_macro_loc_to_def_point): Likewise. 291 (linemap_macro_loc_to_exp_point): Likewise. 292 (linemap_resolve_location): Likewise. 293 (linemap_unwind_toward_expansion): Likewise. 294 (linemap_unwind_to_first_non_reserved_loc): Likewise. 295 (linemap_expand_location): Likewise. 296 (linemap_dump_location): Likewise. 297 (linemap_line_start): Likewise. 298 2992012-05-25 Dodji Seketeli <dodji@redhat.com> 300 301 PR preprocessor/53469 302 * directives.c (do_pragma): Use the virtual location for the 303 pragma token, instead of its spelling location. 304 3052012-08-14 Diego Novillo <dnovillo@google.com> 306 307 Merge from cxx-conversion branch. Configury. 308 309 * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX. 310 * configure.ac: Likewise. 311 * configure: Regenerate. 312 3132012-08-14 Lawrence Crowl <crowl@google.com> 314 315 Merge from cxx-conversion branch. New C++ hash table. 316 317 * include/symtab.h (typedef struct ht hash_table): Change the typedef 318 name to cpp_hash_table. Update all users of the typedef. 319 3202012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com> 321 322 * include/line-map.h (line_map_macro): Use the "atomic" GTY option 323 for the macro_locations field. 324 3252011-06-19 Uros Bizjak <ubizjak@gmail.com> 326 327 * lex.c (search_line_sse42): Use __builtin_ia32_loaddqu and 328 __builtin_ia32_pcmpestri128 instead of asm. 329 3302012-06-04 Dimitrios Apostolou <jimis@gmx.net> 331 332 * line-map.c (linemap_enter_macro): Don't zero max_column_hint in 333 every macro. This improves performance by reducing the number of 334 reallocations when track-macro-expansion is on. 335 3362012-06-04 Dodji Seketeli <dodji@redhat.com> 337 338 PR preprocessor/53463 339 * line-map.c (linemap_location_in_system_header_p): For built-in 340 macro tokens, check the first expansion point location that is not 341 for a token coming from a built-in macro. 342 3432012-05-29 Joseph Myers <joseph@codesourcery.com> 344 345 * directives.c: Fix typos. 346 * include/line-map.h: Fix typos. 347 * line-map.c: Fix typos. 348 * macro.c: Fix typos. 349 3502012-05-25 Dodji Seketeli <dodji@redhat.com> 351 352 PR bootstrap/53459 353 * lex.c (search_line_fast): Avoid unused local typedefs to simulate 354 a static assertion. 355 3562012-05-29 Dodji Seketeli <dodji@redhat.com> 357 358 PR preprocessor/53229 359 * internal.h (cpp_reader::set_invocation_location): Remove. 360 (cpp_reader::about_to_expand_macro_p): New member flag. 361 * directives.c (do_pragma): Remove Kludge as 362 pfile->set_invocation_location is no more. 363 * macro.c (cpp_get_token_1): Do away with the use of 364 cpp_reader::set_invocation_location. Just collect the macro 365 expansion point when we are about to expand the top-most macro. 366 Do not override cpp_reader::about_to_expand_macro_p. 367 This fixes gcc.dg/cpp/paste12.c by making get_token_no_padding 368 properly handle locations of expansion points. 369 (cpp_get_token_with_location): Adjust, as 370 cpp_reader::set_invocation_location is no more. 371 (paste_tokens): Take a virtual location parameter for 372 the LHS of the pasting operator. Use it in diagnostics. Update 373 comments. 374 (paste_all_tokens): Tighten the assert. Propagate the location of 375 the expansion point when no virtual locations are available. 376 Pass the virtual location to paste_tokens. 377 (in_macro_expansion_p): New static function. 378 (enter_macro_context): Set the cpp_reader::about_to_expand_macro_p 379 flag until we really start expanding the macro. 380 3812012-05-16 Dodji Seketeli <dodji@redhat.com> 382 383 PR preprocessor/7263 384 * include/cpplib.h (cpp_classify_number): Take a location 385 parameter. 386 * expr.c (SYNTAX_ERROR_AT, SYNTAX_ERROR2_AT): New diagnostic 387 macros that take a location parameter. 388 (cpp_classify_number): Take a (virtual) location parameter. Use 389 it for diagnostics. Adjust comments. 390 (eval_token): Take a location parameter. Pass it to 391 cpp_classify_number and to diagnostic routines. 392 (_cpp_parse_expr): Use virtual locations of tokens when parsing 393 expressions. Pass a virtual location to eval_token and to 394 diagnostic routines. 395 3962012-05-10 Tristan Gingold <gingold@adacore.com> 397 398 * expr.c (interpret_float_suffix): Add a guard. 399 4002012-05-02 Dodji Seketeli <dodji@redhat.com> 401 402 Properly initialize cpp_context in destringize_and_run 403 * directives.c (destringize_and_run): Properly initialize the new 404 context. 405 * macro.c (_cpp_pop_context): Assert that we shouldn't try to pop 406 the initial base context, which has the same life time as the 407 current instance of cpp_file. 408 4092012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org> 410 Dodji Seketeli <dodji@seketeli.org> 411 412 PR c++/52974 413 * libcpp/files.c (maybe_shorter_path): New. 414 (find_file_in_dir): Use it. 415 4162012-04-30 Dodji Seketeli <dodji@redhat.com> 417 418 Switch -ftrack-macro-expansion=2 on by default. 419 * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on 420 by default. Add comments. 421 422 Strip "<built-in>" loc from displayed expansion context 423 * include/line-map.h (linemap_unwind_toward_expansion): Fix typo 424 in comment. 425 (linemap_unwind_to_first_non_reserved_loc): Declare new function. 426 * line-map.c (linemap_unwind_to_first_non_reserved_loc): Define 427 new function. 428 429 Fix expansion point loc for macro-like tokens 430 * macro.c (macro_of_context): New static function. 431 (_cpp_push_token_context, push_extended_tokens_context): If the 432 macro argument is NULL, it means we are continuing the expansion 433 of the current macro, if any. Update comments. 434 (_cpp_pop_context): Re-enable expansion of the macro only when we 435 are really out of the context of the current expansion. 436 437 Fix token pasting with -ftrack-macro-expansion 438 * macro.c (paste_all_tokens): Put the token resulting from pasting 439 into an extended token context with -ftrack-macro-location is in 440 effect. 441 442 Fix cpp_sys_macro_p with -ftrack-macro-expansion 443 * macro.c (cpp_sys_macro_p): Support -ftrack-macro-expansion. 444 4452012-04-29 Dodji Seketeli <dodji@redhat.com> 446 447 * lex.c (lex_raw_string): Change C++ style comments into C style 448 comments. 449 (lex_string): Likewise. 450 4512012-04-27 Ollie Wild <aaw@google.com> 452 453 * include/cpplib.h (struct cpp_options): Add new field, 454 warn_literal_suffix. 455 (CPP_W_LITERAL_SUFFIX): New enum. 456 * init.c (cpp_create_reader): Default initialization of 457 warn_literal_suffix. 458 * lex.c (lex_raw_string): Treat user-defined literals which don't 459 begin with '_' as separate tokens and produce a warning. 460 (lex_string): Ditto. 461 4622012-04-26 Manuel López-Ibáñez <manu@gcc.gnu.org> 463 464 * line-map.c (linemap_resolve_location): Synchronize comments with 465 those in line-map.h. 466 * include/line-map.h (linemap_resolve_location): Fix spelling in 467 comment. 468 4692012-03-22 Richard Earnshaw <rearnsha@arm.com> 470 471 * lex.c (search_line_fast): Provide Neon-optimized version for ARM. 472 4732012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 474 475 * lex.c: Remove Solaris 8 reference. 476 4772012-02-14 Walter Lee <walt@tilera.com> 478 479 * configure.ac: Require 64-bit hwint for tilegx and tilepro. 480 * configure: Regenerate. 481 4822012-01-09 Richard Guenther <rguenther@suse.de> 483 484 * macro.c (_cpp_builtin_macro_text): Remove unused variable map. 485 4862012-01-09 Gary Funck <gary@intrepid.com> 487 488 PR preprocessor/33919 489 * files.c (_cpp_get_file_name): New. Implement file name 490 access function. 491 * internal.h (_cpp_get_file_name): New prototype. 492 * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name() 493 to use pfile->main_file in lieu of traversing INCLUDED_FROM chain. 494 4952012-01-03 Olivier Hainque <hainque@adacore.com> 496 497 * system.h: Prior to #define, #undef fopen and freopen unconditionally. 498 4992011-12-20 Joseph Myers <joseph@codesourcery.com> 500 501 * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11. 502 (CLK_STDC1X): Change to CLK_STDC11. 503 * init.c (lang_defaults): Update comments. 504 (cpp_init_builtins): Update language tests. Use 201112L for C11 505 __STDC_VERSION__. 506 5072011-12-20 Andreas Schwab <schwab@linux-m68k.org> 508 509 * configure: Regenerate. 510 5112011-12-19 Andreas Schwab <schwab@linux-m68k.org> 512 513 * configure: Regenerate. 514 5152011-12-07 Jakub Jelinek <jakub@redhat.com> 516 517 PR bootstrap/50237 518 * internal.h (_cpp_init_lexer): New prototype. 519 * init.c (init_library): Call it. 520 * lex.c (init_vectorized_lexer): Remove constructor attribute, 521 add inline keyword. 522 (HAVE_init_vectorized_lexer): Define. 523 (_cpp_init_lexer): New function. 524 5252011-12-03 Dodji Seketeli <dodji@redhat.com> 526 527 * macro.c (tokens_buff_remove_last_token) 528 (tokens_buff_put_token_to): Add an 'inline' function specifier to 529 the prototype. 530 5312011-11-22 Diego Novillo <dnovillo@google.com> 532 533 * include/line-map.h (linemap_dump): Declare. 534 (line_table_dump): Declare. 535 * line-map.c (linemap_dump): New. 536 (line_table_dump): New. 537 5382011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net> 539 540 PR c++/50958 541 * expr.c (cpp_userdef_char_remove_type): Fix typo. 542 5432011-11-03 Michael Matz <matz@suse.de> 544 545 PR bootstrap/50857 546 * configure.ac: Check for -fno-exceptions -fno-rtti. 547 * configure: Regenerate. 548 * Makefile.in (NOEXCEPTION_FLAGS): New flag. 549 (ALL_CXXFLAGS): Use it. 550 5512011-11-02 Paolo Carlini <paolo.carlini@oracle.com> 552 553 * internal.h (uxstrdup, ustrchr): Return const unsigned char *. 554 5552011-11-02 Jason Merrill <jason@redhat.com> 556 557 PR c++/50810 558 * configure.ac: Add -Wno-narrowing to warning options. 559 5602011-10-31 Jason Merrill <jason@redhat.com> 561 562 PR libstdc++/1773 563 * init.c (cpp_init_builtins): Set __cplusplus for C++11. 564 565 PR c++/50920 566 * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11, 567 CLK_GNUCXX0X to CLK_GNUCXX11. 568 5692011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net> 570 571 Implement C++11 user-defined literals. 572 * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix, 573 cpp_userdef_string_remove_type, cpp_userdef_string_add_type, 574 cpp_userdef_char_remove_type, cpp_userdef_char_add_type, 575 cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New. 576 (cpp_classify_number): Classify unrecognized tokens as user-defined 577 literals. 578 * include/cpplib.h: Add new tokens for user-defined literals. 579 * init.c: Add new preprocessor flag (cxx11). 580 * lex.c: (lex_string, lex_raw_string): Handle user-defined literals 581 including concatenation and promotion with suffixes. 582 5832011-10-24 Dodji Seketeli <dodji@redhat.com> 584 585 * line-map.c (linemap_macro_map_lookup): Fix logic. 586 5872011-10-24 Dodji Seketeli <dodji@redhat.com> 588 589 * include/line-map.h (linemap_expand_location): Take a line table 590 parameter. Update comment. 591 (linemap_resolve_location): Update comment. 592 (linemap_expand_location_full): Remove. 593 * line-map.c (linemap_resolve_location): Handle reserved 594 locations; return a NULL map in those cases. 595 (linemap_expand_location): If location is reserved, return a 596 zeroed expanded location. Update comment. Take a line table to 597 assert that the function takes non-virtual locations only. 598 (linemap_expand_location_full): remove. 599 (linemap_dump_location): Handle the fact that 600 linemap_resolve_location can return NULL line maps when the 601 location resolves to a reserved location. 602 603 * line-map.c (linemap_macro_map_lookup): Fix logic. 604 6052011-10-22 Dodji Seketeli <dodji@redhat.com> 606 607 PR bootstrap/50778 608 * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the 609 context to act upon. 610 * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update 611 comment. 612 (cpp_token_from_context_at): Likewise. 613 (cpp_peek_token): Use the context to peek tokens from. 614 6152011-10-20 Dodji Seketeli <dodji@redhat.com> 616 617 PR bootstrap/50801 618 * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of 619 number of tokens. 620 6212011-10-18 Dodji Seketeli <dodji@redhat.com> 622 623 PR bootstrap/50760 624 * include/line-map.h (struct linemap_stats): Change the type of 625 the members from size_t to long. 626 * macro.c (macro_arg_token_iter_init): Unconditionally initialize 627 iter->location_ptr. 628 6292011-10-17 Dodji Seketeli <dodji@redhat.com> 630 631 * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a 632 variable without using it if ENABLE_CHECKING is not defined. Mark 633 the LOCATION parameter as being unused. 634 6352011-10-15 Tom Tromey <tromey@redhat.com> 636 Dodji Seketeli <dodji@redhat.com> 637 638 * include/line-map.h (struct line_maps::alloced_size_for_request): 639 New member. 640 * line-map.c (new_linemap): Use set->alloced_size_for_request to 641 get the actual allocated size of line maps. 642 6432011-10-15 Tom Tromey <tromey@redhat.com> 644 Dodji Seketeli <dodji@redhat.com> 645 646 * line-map.h (struct linemap_stats): Declare new struct. 647 (linemap_get_statistics): Declare ... 648 * line-map.c (linemap_get_statistics): ... new function. 649 * macro.c (num_expanded_macros_counter, num_macro_tokens_counter): 650 Declare new counters. 651 (enter_macro_context, replace_args): Update 652 num_macro_tokens_counter. 653 (cpp_get_token_1): Update num_expanded_macros_counter. 654 6552011-10-15 Tom Tromey <tromey@redhat.com> 656 Dodji Seketeli <dodji@redhat.com> 657 658 * include/cpplib.h (struct cpp_options)<debug>: New struct member. 659 * include/line-map.h (linemap_dump_location): Declare ... 660 * line-map.c (linemap_dump_location): ... new function. 661 6622011-10-15 Tom Tromey <tromey@redhat.com> 663 Dodji Seketeli <dodji@redhat.com> 664 665 * include/cpplib.h (struct cpp_options)<track_macro_expansion>: 666 New option. 667 * internal.h (struct macro_context): New struct. 668 (enum context_tokens_kind): New enum. 669 (struct cpp_context)<tokens_kind>: New member of type enum 670 context_tokens_kind. 671 (struct cpp_context)<macro>: Remove this. Replace it with an enum 672 of macro and macro_context. 673 (struct cpp_context)<direct_p>: Remove. 674 (_cpp_remaining_tokens_num_in_context): Declare new function. 675 * directives.c (destringize_and_run): Adjust. 676 * lex.c (_cpp_remaining_tokens_num_in_context) 677 (_cpp_token_from_context_at): Define new functions 678 (cpp_peek_token): Use them. 679 * init.c (cpp_create_reader): Initialize the base context to zero. 680 (_cpp_token_from_context_at): Define new static function. 681 (cpp_peek_token): Use new _cpp_remaining_tokens_num_in_context and 682 _cpp_token_from_context_at. 683 * macro.c (struct macro_arg)<virt_locs, expanded_virt_locs>: New 684 members. 685 (enum macro_arg_token_kind): New enum. 686 (struct macro_arg_token_iter): New struct. 687 (maybe_adjust_loc_for_trad_cpp, push_extended_tokens_context) 688 (alloc_expanded_arg_mem, ensure_expanded_arg_room) 689 (delete_macro_args, set_arg_token, get_arg_token_location) 690 (arg_token_ptr_at, macro_arg_token_iter_init) 691 (macro_arg_token_iter_get_token) 692 (macro_arg_token_iter_get_location, macro_arg_token_iter_forward) 693 (expanded_token_index, tokens_buff_new, tokens_buff_count) 694 (tokens_buff_last_token_ptr, tokens_buff_put_token_to) 695 (tokens_buff_add_token, tokens_buff_remove_last_token) 696 (reached_end_of_context, consume_next_token_from_context): New 697 static functions. 698 (cpp_get_token_1): New static function. Split and extended from 699 cpp_get_token. Use reached_end_of_context and 700 consume_next_token_from_context. Unify its return point. Move 701 the location tweaking from cpp_get_token_with_location in here. 702 (cpp_get_token): Use cpp_get_token_1 703 (stringify_arg): Use the new arg_token_at. 704 (paste_all_tokens): Support tokens coming from extended tokens 705 contexts. 706 (collect_args): Return the number of collected arguments, by 707 parameter. Store virtual locations of tokens that constitute the 708 collected args. 709 (funlike_invocation_p): Return the number of collected arguments, 710 by parameter. 711 (enter_macro_context): Add a parameter for macro expansion point. 712 Pass it to replace_args and to the "used" cpp callback. Get the 713 number of function-like macro arguments from funlike_invocation_p, 714 pass it to the new delete_macro_args to free the memory used by 715 macro args. When -ftrack-macro-expansion is in effect, for macros 716 that have no arguments, create a macro map for the macro expansion 717 and use it to allocate proper virtual locations for tokens 718 resulting from the expansion. Push an extended tokens context 719 containing the tokens resulting from macro expansion and their 720 virtual locations. 721 (replace_args): Rename the different variables named 'count' into 722 variables with more meaningful names. Create a macro map; 723 allocate virtual locations of tokens resulting from this 724 expansion. Use macro_arg_token_iter to iterate over tokens of a 725 given macro. Handle the case of the argument of 726 -ftrack-macro-expansion being < 2. Don't free macro arguments 727 memory resulting from expand_arg here, as these are freed by the 728 caller of replace_arg using delete_macro_args now. Push extended 729 token context. 730 (next_context, push_ptoken_context, _cpp_push_token_context) 731 (_cpp_push_text_context): Properly initialize the context. 732 (expand_arg): Use the new alloc_expanded_arg_mem, 733 push_extended_tokens_context, cpp_get_token_1, and set_arg_token. 734 (_cpp_pop_context): Really free the memory held by the context. 735 Handle freeing memory used by extended tokens contexts. 736 (cpp_get_token_with_location): Use cpp_get_token_1. 737 (cpp_sys_macro_p): Adjust. 738 (_cpp_backup_tokens): Support the new kinds of token contexts. 739 * traditional.c (recursive_macro): Adjust. 740 7412011-10-15 Tom Tromey <tromey@redhat> 742 Dodji Seketeli <dodji@redhat.com> 743 744 * include/line-map.h (enum lc_reason)<LC_ENTER_MACRO>: New enum 745 member. 746 (MAX_SOURCE_LOCATION): New constant. 747 (struct line_map_ordinary, struct line_map_macro): New structs. 748 (struct line_map): Turn this into a union of the two above. Add 749 comments. 750 (struct maps_info): New struct. 751 (struct line_maps)<info_ordinary, info_macro>: Two new fields. 752 These now carry the map information that was previously scattered 753 in struct line_maps. 754 (struct map_info::allocated): Fix comment. 755 (MAP_START_LOCATION, ORDINARY_MAP_FILE_NAME) 756 (ORDINARY_MAP_STARTING_LINE_NUMBER) 757 (ORDINARY_MAP_INCLUDER_FILE_INDEX) 758 (ORDINARY_MAP_IN_SYSTEM_HEADER_P) 759 (ORDINARY_MAP_NUMBER_OF_COLUMN_BITS, MACRO_MAP_MACRO) 760 (MACRO_MAP_NUM_MACRO_TOKENS MACRO_MAP_LOCATIONS) 761 (MACRO_MAP_EXPANSION_POINT_LOCATION) 762 (LOCATION_POSSIBLY_IN_MACRO_MAP_P, LINEMAPS_MAP_INFO) 763 (LINEMAPS_MAPS, LINEMAPS_ALLOCATE, LINEMAPS_USED, LINEMAPS_CACHE) 764 (LINEMAPS_LAST_MAP, LINEMAPS_LAST_ALLOCATED_MAP) 765 (LINEMAPS_ORDINARY_MAPS, LINEMAPS_ORDINARY_ALLOCATED) 766 (LINEMAPS_ORDINARY_USED, LINEMAPS_ORDINARY_CACHE) 767 (LINEMAPS_LAST_ORDINARY_MAP, LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP) 768 (LINEMAPS_MACRO_MAPS, LINEMAPS_MACRO_ALLOCATED) 769 (LINEMAPS_MACRO_USED, LINEMAPS_MACRO_CACHE) 770 (LINEMAPS_LAST_MACRO_MAP, LINEMAPS_LAST_ALLOCATED_MACRO_MAP) 771 (LINEMAPS_MAP_AT, LINEMAPS_ORDINARY_MAP_AT) 772 (LINEMAPS_MACRO_MAP_AT): New accessors for ordinary and macro map 773 information. 774 (linemap_check_ordinary, linemap_assert) 775 (linemap_location_before_p): New macros. 776 (linemap_position_for_line_and_column) 777 (linemap_tracks_macro_expansion_locs_p, linemap_add_macro_token) 778 (linemap_macro_expansion_map_p) 779 (linemap_macro_map_loc_to_def_point) 780 (linemap_macro_map_loc_unwind_once) 781 (linemap_macro_map_loc_to_exp_point, linemap_step_out_once) 782 (linemap_get_source_line linemap_get_source_column) 783 (linemap_map_get_macro_name, linemap_get_file_path) 784 (linemap_location_in_system_header_p) 785 (linemap_location_from_macro_expansion_p): Declare new functions. 786 (SOURCE_LINE, SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION) 787 (LINEMAP_FILE, LINEMAP_LINE, LINEMAP_SYSP): Assert that this 788 accessors act on ordinary maps only. 789 (INCLUDED_FROM): Return NULL for main files; use the new 790 accessors. 791 (LINEMAP_POSITION_FOR_COLUMN): Use the new accessors. 792 (struct expanded_location): Move here from gcc/input.h 793 (linemap_resolve_location, linemap_expand_location) 794 (linemap_expand_location_full): Declare new functions. 795 * line-map.c: Include cpplib.h, internal.h 796 (linemap_enter_macro, linemap_add_macro_token) 797 (linemap_get_expansion_line, linemap_get_expansion_filename): New 798 functions that are private to libcpp. 799 (linemap_assert): New macro. 800 (linemap_macro_loc_to_exp_point, linemap_macro_loc_to_exp_point) 801 (linemap_macro_loc_unwind, linemap_macro_map_loc_to_def_point) 802 (linemap_macro_map_loc_unwind_toward_spelling) 803 (linemap_macro_map_loc_to_exp_point) 804 (first_map_in_common_1, first_map_in_common): New static 805 functions. 806 (new_linemap): Define new static functions. Extracted and 807 enhanced from ... 808 (linemap_add): ... here. Use linemap_assert in lieu of abort 809 previously. 810 (linemap_tracks_macro_expansion_locs_p) 811 (linemap_add_macro_token, linemap_macro_expansion_map_p) 812 (linemap_check_ordinary, linemap_macro_map_loc_to_exp_point) 813 (linemap_macro_map_loc_to_def_point) 814 (linemap_macro_map_loc_unwind_once) 815 (linemap_step_out_once, linemap_map_get_index) 816 (linemap_get_source_line,linemap_get_source_column) 817 (linemap_get_file_path, linemap_map_get_macro_name) 818 (linemap_location_in_system_header_p) 819 (linemap_location_originated_from_system_header_p) 820 (linemap_location_from_macro_expansion_p) 821 (linemap_tracks_macro_expansion_locs_p) 822 (linemap_resolve_location, linemap_expand_location) 823 (linemap_expand_location_full) 824 (linemap_tracks_macro_expansion_locs_p) 825 (linemap_position_for_line_and_column, linemap_compare_locations): 826 Define new public functions. 827 (linemap_init): Initialize ordinary and macro maps information in 828 the map set. 829 (linemap_check_files_exited): Use the new accessors. 830 (linemap_free): Remove this dead code. 831 (linemap_line_start): Assert this uses an ordinary map. Adjust to 832 use the new ordinary map accessors and data structures. Don't 833 overflow past the lowest possible macro token's location. 834 (linemap_position_for_column): Assert the ordinary maps of the map 835 set are really ordinary. Use ordinary map accessors. 836 (linemap_lookup): Keep the same logic but generalize to allow 837 lookup of both ordinary and macro maps. Do not crash when called 838 with an empty line table. 839 * directives-only.c (_cpp_preprocess_dir_only): Adjust to use the 840 new API of line-map.h. 841 * directives.c (start_directive, do_line, do_linemarker) 842 (do_linemarker): Likewise. 843 * files.c (_cpp_find_file, _cpp_stack_include, open_file_failed) 844 (make_cpp_dir, cpp_make_system_header): Likewise. 845 * init.c (cpp_read_main_file): Likewise. 846 * internal.h (CPP_INCREMENT_LINE): Likewise. 847 (linemap_enter_macro, linemap_add_macro_token) 848 (linemap_get_expansion_line, linemap_get_expansion_filename): New 849 functions private to libcpp. 850 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment) 851 (skip_line_comment, skip_whitespace, lex_raw_string) 852 (_cpp_lex_direct): Likewise. 853 * macro.c (_cpp_builtin_macro_text): Likewise. 854 (_cpp_aligned_alloc): Initialize the new name member of the macro. 855 * traditional.c (copy_comment, _cpp_scan_out_logical_line): 856 Likewise. 857 * errors.c (cpp_diagnostic): Adjust to new linemap API. 858 8592011-08-28 Dodji Seketeli <dodji@redhat.com> 860 861 * line-map.c (linemap_add): Assert that reason must not be 862 LC_RENAME when called for the first time on a "main input file". 863 8642011-08-22 Gabriel Charette <gchare@google.com> 865 866 * init.c (cpp_create_reader): Inititalize forced_token_location_p. 867 * internal.h (struct cpp_reader): Add field forced_token_location_p. 868 * lex.c (_cpp_lex_direct): Use forced_token_location_p. 869 (cpp_force_token_locations): New. 870 (cpp_stop_forcing_token_locations): New. 871 8722011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 873 874 PR libstdc++/1773 875 * init.c (cpp_init_builtins): Define __cplusplus 19971L. 876 8772011-08-18 Joseph Myers <joseph@codesourcery.com> 878 879 * include/cpplib.h (struct cpp_options): Fix typo. 880 8812011-08-18 Joseph Myers <joseph@codesourcery.com> 882 883 * include/cpplib.h (struct cpp_options): Add rliterals. 884 * init.c (struct lang_flags, lang_defaults): Add rliterals. 885 (cpp_set_lang): Set rliterals option. 886 (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__. 887 * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals. 888 8892011-08-15 Gabriel Charette <gchare@google.com> 890 891 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. 892 Update all users to use linemap_position_for_column instead. 893 8942011-07-28 Gabriel Charette <gchare@google.com> 895 896 * include/line-map.h (struct line_maps): 897 Remove unused field last_listed. Update all users. 898 8992011-07-28 H.J. Lu <hongjiu.lu@intel.com> 900 901 * configure.ac: Set need_64bit_hwint to yes for x86 targets. 902 * configure: Regenerated. 903 9042011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 905 906 * system.h [__cplusplus]: Wrap C function declarations in extern "C". 907 9082011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 909 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 910 911 PR bootstrap/49794 912 * configure.ac: Test AM_ICONV with CXX. 913 * configure: Regenerate. 914 * system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++. 915 9162011-07-15 Dodji Seketeli <dodji@redhat.com> 917 918 * directives.c (struct if_stack): Use source_location as type 919 here. 920 * include/cpplib.h (struct cpp_callbacks)<include, define, undef, 921 indent, def_pragma, used_define, used_undef>: Properly use 922 source_location as parameter type, rather than unsigned int. 923 9242011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 925 926 PR target/39150 927 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9] 928 like i[34567]86-*-solaris2.1[0-9]*. 929 * configure: Regenerate. 930 9312011-06-16 Jason Merrill <jason@redhat.com> 932 933 PR c++/45399 934 * lex.c (lex_raw_string): Don't check for embedded NUL. 935 9362011-06-06 Dodji Seketeli <dodji@redhat.com> 937 938 PR preprocessor/48532 939 * directives.c (do_pragma): Don't forget the invocation location 940 when parsing the pragma name of a namespaced pragma directive. 941 9422011-05-29 John Tytgat <John.Tytgat@aaug.net> 943 944 * files.c (read_file_guts): Add test on non-zero value of S_ISREG. 945 9462011-05-22 Uros Bizjak <ubizjak@gmail.com> 947 948 PR target/49104 949 * lex.c (init_vectorized_lexer): Do not set "minimum" when __3dNOW_A__ 950 is defined. Check bit_MMXEXT and bit_CMOV to use search_line_mmx. 951 9522011-04-25 Jan Kratochvil <jan.kratochvil@redhat.com> 953 954 * system.h (ENUM_BITFIELD): Remove. 955 9562011-04-24 Jakub Jelinek <jakub@redhat.com> 957 958 PR preprocessor/48740 959 * lex.c (lex_raw_string): When raw string ends with 960 ??) followed by raw prefix and ", ensure it is preprocessed 961 with ??) rather than ??]. 962 9632011-04-20 Jim Meyering <meyering@redhat.com> 964 965 * files.c (destroy_cpp_file): Remove useless if-before-free. 966 * init.c (cpp_destroy): Likewise. 967 * macro.c (replace_args): Likewise. 968 * pch.c (cpp_valid_state): Likewise. 969 9702011-03-25 Kai Tietz <ktietz@redhat.com> 971 972 * files.c (file_hash_eq): Use filename_cmp 973 instead of strcmp. 974 (nonexistent_file_hash_eq): Likewise. 975 (remap_filename): Likewise. 976 Handle absolute DOS-path, 977 (append_file_to_dir): Check for IS_DIR_SEPARATOR 978 instead of slash. 979 (read_name_map): Likewise. 980 * linemap.c (linemap_add): Use filename_cmp 981 instead of strcmp. 982 * mkdeps.c (apply_vpath): Use filename_ncmp 983 instead of strncmp. 984 (deps_restore): Use filename_cmp instead of 985 strcmp. 986 * init.c (read_original_directory): Use 987 IS_DIR_SEPARATOR instead of checking for slash. 988 9892011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com> 990 991 PR preprocessor/48192 992 * directives.c (do_ifdef): Do not consider conditional macros as 993 being defined. 994 (do_ifndef): Ditto. 995 * expr.c (parse_defined): Ditto. 996 9972011-03-18 Richard Henderson <rth@redhat.com> 998 999 PR bootstrap/45381 1000 * lex.c [ALTIVEC] (search_line_fast): Require gcc version 4.5. 1001 10022011-11-04 Eric Botcazou <ebotcazou@adacore.com> 1003 Jakub Jelinek <jakub@redhat.com> 1004 1005 PR preprocessor/39213 1006 * directives.c (end_directive): Call _cpp_remove_overlay for deferred 1007 pragmas as well in traditional mode. 1008 10092010-11-17 Ian Lance Taylor <iant@google.com> 1010 1011 PR bootstrap/45538 1012 * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS. Remove switch of 1013 AC_LANG based on ENABLE_BUILD_WITH_CXX. 1014 10152010-11-16 Kai Tietz <kai.tietz@onevision.com> 1016 1017 PR preprocessor/17349 1018 * lex.c (save_comment): Handle in argument passing c++ 1019 comments special. 1020 10212010-11-02 Ian Lance Taylor <iant@google.com> 1022 1023 * configure.ac: Use AC_SYS_LARGEFILE. 1024 * configure: Rebuild. 1025 * config.in: Rebuild. 1026 10272010-10-19 Basile Starynkevitch <basile@starynkevitch.net> 1028 1029 * line-map.h (source_location): Remove obsolete comment 1030 mentioning location_s. 1031 10322010-09-29 Kai Tietz <kai.tietz@onevision.com> 1033 1034 PR preprocessor/45362 1035 * directives.c (cpp_pop_definition): Make static. 1036 (do_pragma_push_macro): Reworked to store text 1037 definition. 1038 (do_pragma_pop_macro): Add free text definition. 1039 (cpp_push_definition): Removed. 1040 * include/cpplib.h (cpp_push_definition): Removed. 1041 (cpp_pop_definition): Likewise. 1042 * internal.h (def_pragma_macro): Remove member 'value' 1043 and add new members 'definition', 'line', 1044 'syshdr', 'sued' and 'is_undef'. 1045 * pch.c (_cpp_restore_pushed_macros): Rework to work 1046 on text definition and store additional macro flags. 1047 (_cpp_save_pushed_macros): Likewise. 1048 10492010-09-29 Joseph Myers <joseph@codesourcery.com> 1050 1051 * include/cpplib.h (cpp_options): Rename warn_deprecated, 1052 warn_traditional, warn_long_long and pedantic. 1053 * directives.c (directive_diagnostics, _cpp_handle_directive): 1054 Update names of cpp_options members. 1055 * expr.c (cpp_classify_number, eval_token): Update names of 1056 cpp_options members. 1057 * init.c (cpp_create_reader, post_options): Update names of 1058 cpp_options members. 1059 * internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of 1060 cpp_options members. 1061 * macro.c (parse_params): Update names of cpp_options members. 1062 10632010-09-15 Ian Lance Taylor <iant@google.com> 1064 1065 * init.c: Fix type name in comment. 1066 10672010-08-31 Jakub Jelinek <jakub@redhat.com> 1068 1069 PR preprocessor/45457 1070 * expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if 1071 needed. 1072 * directives.c (do_ifdef, do_ifndef): Likewise. 1073 10742010-08-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 1075 1076 * system.h [HAVE_INTTYPES_H]: Include inttypes.h. 1077 10782010-08-24 Richard Henderson <rth@redhat.com> 1079 1080 PR bootstrap/45376 1081 * configure.ac (HAVE_SSE4): New check. 1082 * configure, config.in: Rebuild. 1083 * lex.c (search_line_sse42): Omit if !HAVE_SSE4. 1084 10852010-08-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 1086 1087 * lex.c [__sun__ && __svr4__]: Disable init_vectorized_lexer 1088 etc. on Solaris 2/x86. 1089 10902010-08-21 Richard Henderson <rth@redhat.com> 1091 Andi Kleen <ak@linux.intel.com> 1092 David S. Miller <davem@davemloft.net> 1093 1094 * configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests. 1095 (ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE. 1096 (ptrdiff_t): Check via AC_CHECK_TYPE. 1097 * config.in, configure: Rebuild. 1098 * system.h: Include stdint.h, if available. 1099 * lex.c (WORDS_BIGENDIAN): Provide default. 1100 (acc_char_mask_misalign, acc_char_replicate, acc_char_cmp, 1101 acc_char_index, search_line_acc_char, repl_chars, search_line_mmx, 1102 search_line_sse2, search_line_sse42, init_vectorized_lexer, 1103 search_line_fast): New. 1104 (_cpp_clean_line): Use search_line_fast. Restructure the fast 1105 loop to make it clear when we're leaving the loop. Stay in the 1106 fast loop for non-trigraph '?'. 1107 11082010-06-11 Jakub Jelinek <jakub@redhat.com> 1109 1110 * include/cpplib.h (struct cpp_callbacks): Add user_builtin_macro 1111 callback. 1112 (enum cpp_builtin_type): Add BT_FIRST_USER and BT_LAST_USER. 1113 (cpp_macro_definition): Remove const qual from second argument. 1114 * macro.c (enter_macro_context): Call user_builtin_macro callback for 1115 NODE_BUILTIN !NODE_USED macros. 1116 (warn_of_redefinition): Likewise. Remove const qual from second 1117 argument. 1118 (cpp_macro_definition): Likewise. 1119 * pch.c (write_macdef, save_macros): Call user_builtin_macro callback 1120 for NODE_BUILTIN !NODE_USED macros. 1121 11222010-06-10 Joseph Myers <joseph@codesourcery.com> 1123 1124 * include/cpplib.h (struct cpp_options): Remove show_column. 1125 * init.c (cpp_create_reader, post_options): Don't set show_column. 1126 11272010-06-09 Joern Rennecke <joern.rennecke@embecosm.com> 1128 1129 PR bootstrap/44432 1130 * configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++, 1131 check that C++ compiler works. 1132 * configure: Regenerate. 1133 11342010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com> 1135 1136 * include/symtab.h (ht_identifier_ptr): New. 1137 11382010-06-03 Joern Rennecke <joern.rennecke@embecosm.com> 1139 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1140 1141 PR bootstrap/42798 1142 * configure.ac: Check for declaration of 'basename(char *)'. 1143 * configure: Regenerate. 1144 * config.in: Regenerate. 1145 11462010-04-25 Joseph Myers <joseph@codesourcery.com> 1147 1148 * include/cpplib.h (enum c_lang): Add CLK_GNUC1X and CLK_STDC1X. 1149 * init.c (lang_defaults): Add entries for new language variants. 1150 (cpp_init_builtins): Define __STDC_VERSION__ to 201000L for C1X 1151 variants. 1152 11532010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org> 1154 1155 PR cpp/43195 1156 * files.c (report_missing_guard): Test for #pragma once. 1157 11582010-04-07 Simon Baldwin <simonb@google.com> 1159 1160 * directives.c (do_diagnostic): Add warning reason argument, 1161 call appropriate error reporting function for code. 1162 (directive_diagnostics): Call specific warning functions with 1163 warning reason where appropriate. 1164 (do_error, do_warning, do_pragma_dependency): Add warning reason 1165 argument to do_diagnostic calls. 1166 * macro.c (_cpp_warn_if_unused_macro, enter_macro_context, 1167 _cpp_create_definition): Call specific warning functions with 1168 warning reason where appropriate. 1169 * Makefile.in: Add new diagnostic functions to gettext translations. 1170 * include/cpplib.h (struct cpp_callbacks): Add warning reason code 1171 to error callback. 1172 (CPP_DL_WARNING, CPP_DL_WARNING_SYSHDR, CPP_DL_PEDWARN, CPP_DL_ERROR, 1173 CPP_DL_ICE, CPP_DL_NOTE, CPP_DL_FATAL): Replace macros with enums. 1174 (CPP_W_NONE, CPP_W_DEPRECATED, CPP_W_COMMENTS, 1175 CPP_W_MISSING_INCLUDE_DIRS, CPP_W_TRIGRAPHS, CPP_W_MULTICHAR, 1176 CPP_W_TRADITIONAL, CPP_W_LONG_LONG, CPP_W_ENDIF_LABELS, 1177 CPP_W_NUM_SIGN_CHANGE, CPP_W_VARIADIC_MACROS, 1178 CPP_W_BUILTIN_MACRO_REDEFINED, CPP_W_DOLLARS, CPP_W_UNDEF, 1179 CPP_W_UNUSED_MACROS, CPP_W_CXX_OPERATOR_NAMES, CPP_W_NORMALIZE, 1180 CPP_W_INVALID_PCH, CPP_W_WARNING_DIRECTIVE): New enums for cpp 1181 warning reason codes. 1182 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, 1183 cpp_warning_with_line, cpp_pedwarning_with_line, 1184 cpp_warning_with_line_syshdr): New specific error reporting functions. 1185 * pch.c (cpp_valid_state): Call specific warning functions with 1186 warning reason where appropriate. 1187 * errors.c (cpp_diagnostic, cpp_diagnostic_with_line): New central 1188 diagnostic handlers. 1189 (cpp_warning, cpp_pedwarning, cpp_warning_syshdr, 1190 cpp_warning_with_line, cpp_pedwarning_with_line, 1191 cpp_warning_with_line_syshdr): New specific error reporting functions. 1192 * expr.c (cpp_classify_number, eval_token, num_unary_op): Call 1193 specific warning functions with warning reason where appropriate. 1194 * lex.c (_cpp_process_line_notes, _cpp_skip_block_comment, 1195 warn_about_normalization, lex_identifier_intern, lex_identifier, 1196 _cpp_lex_direct): Ditto. 1197 * charset.c (_cpp_valid_ucn, convert_hex, convert_escape, 1198 narrow_str_to_charconst): Ditto. 1199 12002010-04-06 Jakub Jelinek <jakub@redhat.com> 1201 1202 PR preprocessor/43642 1203 * lex.c (lex_raw_string): Change type of TYPE variable to 1204 unsigned char. 1205 12062010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1207 1208 * aclocal.m4: Regenerate. 1209 12102010-03-29 Jason Merrill <jason@redhat.com> 1211 1212 More N3077 raw string changes 1213 * charset.c (cpp_interpret_string): Don't transform UCNs in raw 1214 strings. 1215 * lex.c (bufring_append): Split out from... 1216 (lex_raw_string): ...here. Undo trigraph and line splicing 1217 transformations. Do process line notes in multi-line literals. 1218 (_cpp_process_line_notes): Ignore notes that were already handled. 1219 1220 Some raw string changes from N3077 1221 * charset.c (cpp_interpret_string): Change inner delimiters to (). 1222 * lex.c (lex_raw_string): Likewise. Also disallow '\' in delimiter. 1223 12242010-02-11 Jakub Jelinek <jakub@redhat.com> 1225 1226 * init.c (read_original_filename): Don't call read_original_directory 1227 if _cpp_handle_directive returns 0. 1228 12292010-01-01 Joseph Myers <joseph@codesourcery.com> 1230 1231 PR preprocessor/41947 1232 * expr.c (cpp_classify_number): Give error for hexadecimal 1233 floating-point constant with no digits before or after point. 1234 12352009-11-20 Arnaud Charlet <charlet@adacore.com> 1236 1237 * macro.c (enter_macro_context): Call cb.used callback if defined. 1238 * directives.c (do_idef, do_ifndef): Ditto. 1239 * include/cpplib.h (struct cpp_callbacks): Add used callback. 1240 12412009-11-11 Kai Tietz <kai.tietz@onevision.com> 1242 1243 * directives.c (do_pragma_push_macro): New pragma handler. 1244 (do_pragma_pop_macro): Likewise. 1245 (_cpp_init_internal_pragmas): Add push_macro and 1246 pop_macro handler to internal pragmas. 1247 (lex_macro_node_from_str): Removed. 1248 (cpp_push_definition): Replace lex_macro_node_from_str 1249 by _cpp_lex_identifier. 1250 (cpp_pop_definition): Likewise. 1251 * internal.h (_cpp_lex_identifier): New prototype. 1252 (def_pragma_macro): New structure. 1253 (cpp_reader): New member pushed_macros. 1254 * lex.c (_cpp_lex_identifier): New function. 1255 (lex_identifier_intern): New function. 1256 * init.c (cpp_create_reader): Initialize pushed_macros 1257 member. 1258 (cpp_destroy): Free elements in pushed_macros member. 1259 * pch.c (_cpp_save_pushed_macros): New function. 1260 (_cpp_restore_pushed_macros): Likewise. 1261 (_cpp_restore_pushed_macros): Use _cpp_save_pushed_macros. 1262 (cpp_read_state): Use _cpp_restore_pushed_macros. 1263 12642009-10-19 Jakub Jelinek <jakub@redhat.com> 1265 1266 * charset.c (cpp_init_iconv): Initialize utf8_cset_desc. 1267 (_cpp_destroy_iconv): Destroy utf8_cset_desc, char16_cset_desc 1268 and char32_cset_desc. 1269 (converter_for_type): Handle CPP_UTF8STRING. 1270 (cpp_interpret_string): Handle CPP_UTF8STRING and raw-strings. 1271 * directives.c (get__Pragma_string): Handle CPP_UTF8STRING. 1272 (parse_include): Reject raw strings. 1273 * include/cpplib.h (CPP_UTF8STRING): New token type. 1274 * internal.h (struct cpp_reader): Add utf8_cset_desc field. 1275 * lex.c (lex_raw_string): New function. 1276 (lex_string): Handle u8 string literals, call lex_raw_string 1277 for raw string literals. 1278 (_cpp_lex_direct): Call lex_string even for u8" and {,u,U,L,u8}R" 1279 sequences. 1280 * macro.c (stringify_arg): Handle CPP_UTF8STRING. 1281 12822009-10-14 Jakub Jelinek <jakub@redhat.com> 1283 1284 PR preprocessor/41543 1285 * include/line-map.h (RESERVED_LOCATION_COUNT): Define. 1286 * line-map.c (linemap_init): Initialize highest_location and 1287 highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. 1288 12892009-10-09 Jason Merrill <jason@redhat.com> 1290 1291 * charset.c (_cpp_valid_ucn): Update C++0x restrictions. 1292 12932009-10-09 Neil Vachharajani <nvachhar@google.com> 1294 1295 * directives.c (DIRECTIVE_TABLE): Remove DEPRECATED from ident and 1296 sccs. 1297 12982009-09-23 Loren J. Rittle <ljrittle@acm.org> 1299 1300 * configure.ac (AC_CHECK_HEADERS after AC_LANG(C++)): Add sys/stat.h. 1301 * configure: Rebuilt. 1302 13032009-09-22 Richard Guenther <rguenther@suse.de> 1304 1305 PR pch/38987 1306 * files.c (pch_open_file): Disallow non-toplevel PCH inclusion. 1307 13082009-09-18 Chris Demetriou <cgd@google.com> 1309 1310 PR preprocessor/28435: 1311 * include/cpplib.h (struct cpp_options): Add new member 1312 deps.need_preprocessor_output. 1313 * files.c (open_file_failed): If preprocessor output is needed 1314 always report an error. 1315 13162009-09-13 Kai Tietz <kai.tietz@onevision.com> 1317 1318 * configure.ac: Set for i?86-w64-mingw* 1319 need_64bit_hwint to yes. 1320 * configure: Regenerated. 1321 13222009-09-10 Jason Merrill <jason@redhat.com> 1323 1324 * directives.c (cpp_define): constify. 1325 13262009-09-02 Ian Lance Taylor <iant@google.com> 1327 1328 * macro.c (stringify_arg): Escape CPP_WCHAR tokens. 1329 13302009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1331 1332 * configure.ac (AC_PREREQ): Bump to 2.64. 1333 13342009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1335 1336 * aclocal.m4: Regenerate. 1337 * config.in: Regenerate. 1338 * configure: Regenerate. 1339 13402009-08-17 Tom Tromey <tromey@redhat.com> 1341 1342 PR preprocessor/41067: 1343 * charset.c (convert_escape): Add missing ":" to error text. 1344 13452009-07-27 Douglas B Rupp <rupp@gnat.com> 1346 1347 * include/cpplib.h (INO_T_CPP): New macro. 1348 (struct cpp_dir): Use it. 1349 13502009-07-20 Jerry Quinn <jlquinn@optonline.net> 1351 1352 PR regression/40800 1353 * configure.ac: Use = instead of == for testing 1354 ENABLE_BUILD_WITH_CXX. 1355 * configure: Rebuild. 1356 13572009-07-17 Jerry Quinn <jlquinn@optonline.net> 1358 1359 * directives.c (do_linemarker, do_line): Use CPP_STRING for 1360 ignored enum value. 1361 * files.c (find_file_in_dir): Add cast from void* to char*. 1362 * symtab.c (ht_lookup_with_hash): Add cast from void* to char*. 1363 * Makefile.in: (WARN_CFLAGS): Use general and C-specific 1364 warnings. 1365 (CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS, 1366 ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER, 1367 COMPILER_FLAGS): New. 1368 (DEPMODE): Set from CCDEPMODE or CXXDEPMODE. 1369 (COMPILE.base): Use COMPILER instead of CC. Use COMPILER_FLAGS 1370 instead of ALL_CFLAGS. 1371 * configure.ac: Invoke AC_PROG_CXX. Separate C-specific warnings 1372 from other warnings. Add -Wc++-compat to C-specific warnings. 1373 Check for --enable-build-with-cxx. Set and substitute 1374 ENABLE_BUILD_WITH_CXX. Invoke ZW_PROG_COMPILER_DEPENDENCIES 1375 according to ENABLE_BUILD_WITH_CXX. Invoke AC_LANG before 1376 AC_CHECK_HEADERS. 1377 * configure: Rebuild. 1378 * include/cpp-id-data.h: Remove extern "C". 1379 * include/line-map.h: Likewise. 1380 * include/mkdeps.h: Likewise. 1381 * include/symtab.h: Likewise. 1382 * internal.h: Likewise. 1383 13842009-06-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1385 1386 * directives.c (parse_include): Add location argument. Update all 1387 calls. 1388 (parse_answer): Likewise. 1389 (do_include_common): Error with exact location. 1390 (parse_assertion): Likewise. 1391 13922009-06-18 Manuel López-Ibáñez <manu@gcc.gnu.org> 1393 1394 * expr.c (num_div_op): Take explicit location. 1395 13962009-06-17 Ian Lance Taylor <iant@google.com> 1397 1398 * include/cpplib.h (progname): Don't declare. 1399 14002009-06-12 Ian Lance Taylor <iant@google.com> 1401 1402 * include/cpplib.h (struct cpp_options): Add 1403 warn_cxx_operator_names field. 1404 (NODE_WARN_OPERATOR): Define. 1405 (struct cpp_hashnode): Increase flags field to 10 bits, decrease 1406 type to 6 bits. 1407 * init.c (mark_named_operators): Add flags parameter. 1408 (cpp_post_options): Pick flags value to pass to 1409 mark_named_operators. 1410 * lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that 1411 identifier is an operator name in C++. 1412 14132009-06-01 Aldy Hernandez <aldyh@redhat.com> 1414 1415 * include/line-map.h (LAST_SOURCE_COLUMN): New. 1416 14172009-06-01 Ian Lance Taylor <iant@google.com> 1418 1419 * include/cpp-id-data.h: Add extern "C". 1420 * include/line-map.h: Likewise. 1421 * include/mkdeps.h: Likewise. 1422 * include/symtab.h: Likewise. 1423 * internal.h: Likewise. 1424 14252009-05-15 Ian Lance Taylor <iant@google.com> 1426 1427 * include/cpplib.h (enum cpp_builtin_type): Rename from enum 1428 builtin_type. Change all uses. 1429 14302009-05-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1431 1432 PR cpp/36674 1433 * directives (do_linemarker): Compensate for the increment in 1434 location that occurs when we reach the end of line. 1435 * files (_cpp_stack_include): Mention _cpp_find_file in the 1436 comment. 1437 14382009-05-10 Joseph Myers <joseph@codesourcery.com> 1439 1440 * include/cpplib.h (enum cpp_token_fld_kind): Add 1441 CPP_TOKEN_FLD_TOKEN_NO. 1442 (struct cpp_macro_arg, struct cpp_identifier): Define. 1443 (union cpp_token_u): Use struct cpp_identifier for identifiers. 1444 Use struct cpp_macro_arg for macro arguments. Add token_no for 1445 CPP_PASTE token numbers. 1446 * directives.c (_cpp_handle_directive, lex_macro_node, do_pragma, 1447 do_pragma_poison, parse_assertion): Use val.node.node in place of 1448 val.node. 1449 * expr.c (parse_defined, eval_token): Use val.node.node in place 1450 of val.node. 1451 * lex.c (cpp_ideq, _cpp_lex_direct, cpp_token_len, 1452 cpp_spell_token, cpp_output_token, _cpp_equiv_tokens, 1453 cpp_token_val_index): Use val.macro_arg.arg_no or val.token_no in 1454 place of val.arg_no. Use val.node.node in place of val.node. 1455 * macro.c (replace_args, cpp_get_token, parse_params, 1456 lex_expansion_token, create_iso_definition, cpp_macro_definition): 1457 Use val.macro_arg.arg_no or val.token_no in place of val.arg_no. 1458 Use val.node.node in place of val.node. 1459 14602009-05-03 Joseph Myers <joseph@codesourcery.com> 1461 1462 * charset.c (one_utf8_to_cppchar): Correct mask used for 5-byte 1463 UTF-8 sequences. 1464 14652009-04-25 Joseph Myers <joseph@codesourcery.com> 1466 1467 PR preprocessor/39559 1468 * expr.c (cpp_interpret_integer): Use a pedwarn for decimal 1469 constants larger than intmax_t in C99 mode. 1470 14712009-04-21 Taras Glek <tglek@mozilla.com> 1472 1473 * include/cpp-id-data.h: Update GTY annotations to new syntax. 1474 * include/cpplib.h: Likewise. 1475 * include/line-map.h: Likewise. 1476 * include/symtab.h: Likewise. 1477 14782009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1479 1480 PR c++/14875 1481 * lex.c (cpp_type2name): Take a flags parameter. Call 1482 cpp_named_operator2name for named operators and cpp_digraph2name 1483 for digraphs. 1484 (cpp_digraph2name): New. 1485 (cpp_spell_token): Use it. 1486 (cpp_output_token): Likewise. 1487 * include/cpplib.h (cpp_type2name): Update declaration. 1488 * init.c (cpp_named_operator2name): New. 1489 * internal.h (cpp_named_operator2name): Declare. 1490 14912009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1492 1493 PR c++/13358 1494 * init.c (cpp_create_reader): Wlong_long is disabled by default. 1495 * expr.c (cpp_classify_number): Give different messages for C and 1496 C++ front-ends. 1497 14982009-04-19 Joseph Myers <joseph@codesourcery.com> 1499 1500 PR preprocessor/20078 1501 * include/cpp-id-data.h (struct cpp_macro): Add extra_tokens 1502 field. 1503 * include/cpplib.h (SP_DIGRAPH, SP_PREV_WHITE): Define. 1504 (struct cpp_token): Change flags to unsigned short. 1505 * lex.c (_cpp_lex_direct): Initialize arg_no for CPP_PASTE tokens. 1506 (_cpp_equiv_tokens): Check arg_no for CPP_PASTE tokens. 1507 (cpp_token_val_index): Return CPP_TOKEN_FLD_ARG_NO for CPP_PASTE 1508 tokens. 1509 * macro.c (macro_real_token_count): New. 1510 (enter_macro_context, replace_args): Use macro_real_token_count. 1511 (create_iso_definition): Record whitespace surrounding and digraph 1512 spelling of # and ## tokens using SP_PREV_WHITE and SP_DIGRAPH. 1513 Set extra_tokens and save CPP_PASTE tokens with arg_no set for 1514 multiple consecutive ## tokens. 1515 (_cpp_create_definition): Initialize extra_tokens. 1516 (cpp_macro_definition): Use macro_real_token_count. 1517 15182009-04-18 Joseph Myers <joseph@codesourcery.com> 1519 1520 * directives.c (parse_include): Pass true to check_eol. 1521 15222009-04-18 Joseph Myers <joseph@codesourcery.com> 1523 1524 PR preprocessor/39646 1525 * include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM. 1526 * line-map.c (linemap_add): Handle LC_RENAME_VERBATIM. 1527 * directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in 1528 place of LC_RENAME. 1529 15302009-04-18 Joseph Myers <joseph@codesourcery.com> 1531 1532 PR preprocessor/39647 1533 * directives.c (check_eol): Add parameter expand. 1534 (do_undef, parse_include, do_line, do_linemarker, do_ident, 1535 do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef, 1536 do_else, do_endif, do_assert, do_unassert): All callers changed. 1537 Pass true from do_line, false elsewhere. 1538 15392009-04-12 Joseph Myers <joseph@codesourcery.com> 1540 1541 PR preprocessor/31869 1542 * macro.c (stringify_arg): Handle NULL source token in padding 1543 token where previous padding token did not have source token with 1544 preceding whitespace. 1545 15462009-04-09 Jakub Jelinek <jakub@redhat.com> 1547 1548 * Makefile.in: Change copyright header to refer to version 1549 3 of the GNU General Public License and to point readers at the 1550 COPYING3 file and the FSF's license web page. 1551 * charset.c: Likewise. 1552 * directives-only.c: Likewise. 1553 * directives.c: Likewise. 1554 * errors.c: Likewise. 1555 * expr.c: Likewise. 1556 * files.c: Likewise. 1557 * identifiers.c: Likewise. 1558 * include/cpp-id-data.h: Likewise. 1559 * include/cpplib.h: Likewise. 1560 * include/line-map.h: Likewise. 1561 * include/mkdeps.h: Likewise. 1562 * include/symtab.h: Likewise. 1563 * init.c: Likewise. 1564 * internal.h: Likewise. 1565 * lex.c: Likewise. 1566 * line-map.c: Likewise. 1567 * macro.c: Likewise. 1568 * makeucnid.c: Likewise. 1569 * mkdeps.c: Likewise. 1570 * pch.c: Likewise. 1571 * symtab.c: Likewise. 1572 * system.h: Likewise. 1573 * traditional.c: Likewise. 1574 * ucnid.tab: Likewise. 1575 * ucnid.h: Regenerate. 1576 15772009-04-01 Janis Johnson <janis187@us.ibm.com> 1578 1579 PR c/39027 1580 * include/cpplib.h (CPP_N_DEFAULT): Define. 1581 * expr.c (interpret_float_suffix): Recognize d or D for double, 1582 return new value for default. 1583 (cpp_classify_number): Issue pedwarn for use of d or D in suffix. 1584 1585 PR c/33466 1586 * expr.c (interpret_float_suffix): Reject invalid suffix that uses 1587 letters from decimal float and fixed-point suffixes. 1588 15892009-03-31 Joseph Myers <joseph@codesourcery.com> 1590 1591 PR preprocessor/15638 1592 * files.c (_cpp_find_file): Call open_file_failed after diagnosing 1593 invalid PCH. 1594 (open_file_failed): Make error for missing file fatal. 1595 * include/cpplib.h (CPP_DL_FATAL): Define. 1596 15972009-03-30 Sergiy Vyshnevetskiy <serg@vostok.net> 1598 1599 PR preprocessor/31932: 1600 * internal.h: Don't mention HAVE_ICONV_H. 1601 * configure, config.in: Rebuild. 1602 * configure.ac: Don't check for iconv.h. 1603 16042009-03-30 Tom Tromey <tromey@redhat.com> 1605 1606 PR preprocessor/39512: 1607 * line-map.c (linemap_init): Initialize 'reallocator' field. 1608 16092009-03-30 Jakub Jelinek <jakub@redhat.com> 1610 1611 PR target/39558 1612 * macro.c (cpp_get_token): If macro_to_expand returns NULL 1613 and used some tokens, add CPP_PADDING before next token. 1614 16152009-03-29 Joseph Myers <joseph@codesourcery.com> 1616 1617 PR preprocessor/34695 1618 * makedepend.c: Remove. 1619 * Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove. 1620 (all, clean, TAGS_SOURCES, include): Remove makedepend handling. 1621 * directives.c (cpp_errors): Remove. 1622 * errors.c (print_location, _cpp_begin_message, v_message): 1623 Remove. 1624 (cpp_error, cpp_error_with_line): Always use error callback. 1625 (cpp_error, cpp_error_with_line, cpp_errno): Return bool. 1626 * include/cpplib.h (cpp_options): Remove pedantic_errors, 1627 inhibit_warnings, warn_system_headers, inhibit_errors, 1628 warnings_are_errors, client_diagnostic. 1629 (cpp_callbacks): Add extra arguments to error callback; make it 1630 return bool. 1631 (cpp_finish): Return void. 1632 (cpp_destroy): Remove inaccurate comment about return value. 1633 (cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove. 1634 (CPP_DL_NOTE): Define. 1635 * include/line-map.h (linemap_print_containing_files): Remove. 1636 * init.c (cpp_finish): Do not check for or return number of 1637 errors. 1638 * internal.h (cpp_reader): Remove errors field. 1639 * line-map.c (linemap_print_containing_files): Remove. 1640 * macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message 1641 about previous definition. Only emit it if previous diagnostic 1642 was emitted. 1643 16442009-03-28 Joseph Myers <joseph@codesourcery.com> 1645 1646 * Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not 1647 mkinstalldirs. 1648 16492009-03-18 Jakub Jelinek <jakub@redhat.com> 1650 1651 * include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts. 1652 16532009-02-21 Joseph Myers <joseph@codesourcery.com> 1654 1655 * lex.c (lex_string): Return a CPP_LESS token for missing '>' in a 1656 header name. 1657 (_cpp_lex_direct): Handle this. 1658 16592009-02-15 Richard Guenther <rguenther@suse.de> 1660 1661 Revert last change. 1662 16632009-02-13 Richard Guenther <rguenther@suse.de> 1664 1665 * configure.ac: Enable LFS. 1666 * configure: Re-generate. 1667 * config.in: Likewise. 1668 16692009-01-05 Ben Elliston <bje@au.ibm.com> 1670 1671 * Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir. 1672 (.po.pox): Likewise. 1673 (po/$(PACKAGE).pot): Likewise. 1674 16752008-12-10 Alexandre Oliva <aoliva@redhat.com> 1676 1677 PR target/37033 1678 * pch.c (cpp_valid_state): Improve message for poisoned symbols. 1679 Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM. 1680 16812008-11-29 Joseph Myers <joseph@codesourcery.com> 1682 1683 * lex.c (cpp_token_len): Use 6 as default length. 1684 16852008-10-31 Manuel López-Ibáñez <manu@gcc.gnu.org> 1686 1687 * expr.c (struct op): Add location. 1688 (_cpp_parse_expr): Propagate locations throught the stack 1689 of expressions. 1690 (reduce): Likewise. 1691 (check_promotion): Use explicit location in errors. 1692 16932008-10-05 Matthew Gingell <gingell@adacore.com> 1694 Arnaud Charlet <charlet@adacore.com> 1695 1696 * include/cpplib.h (cpp_comments, cpp_comment_table): New structs. 1697 (cpp_get_comments): New function. 1698 * internal.h (struct cpp_reader): Add comments field. 1699 * init.c (cpp_destroy): Free comments. 1700 * lex.c (store_comment, cpp_get_comments): New functions. 1701 (comments): New struct. 1702 (save_comment): Store comments in comments struct. 1703 17042008-09-18 Simon Baldwin <simonb@google.com> 1705 1706 * include/cpplib.h (struct cpp_options): Add new boolean flag 1707 warn_builtin_macro_redefined. 1708 * init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined. 1709 * (struct builtin_operator): Split out from previous struct builtin, 1710 enhance extra const correctness. 1711 * (struct builtin_macro): Split out from previous struct builtin, add 1712 new always_warn_if_redefined flag, enhance const correctness. 1713 * (mark_named_operators): Use struct builtin_operator. 1714 * (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN 1715 to builtins selectively. 1716 * macro.c (warn_of_redefinition): Return false if a builtin macro 1717 is not flagged with NODE_WARN. 1718 17192008-07-31 Jakub Jelinek <jakub@redhat.com> 1720 1721 PR preprocessor/36649 1722 * files.c (struct report_missing_guard_data): New type. 1723 (report_missing_guard): Put paths into an array instead of printing 1724 them right away. Return 1 rather than 0. 1725 (report_missing_guard_cmp): New function. 1726 (_cpp_report_missing_guards): Sort and print paths gathered by 1727 report_missing_guard callback. 1728 17292008-07-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1730 1731 PR 28079 1732 * directives.c (strtolinenum): Handle overflow. 1733 (do_line): Give a warning if line number overflowed. 1734 (do_linemarker): Update call to strtolinenum. 1735 17362008-07-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org> 1737 1738 * include/line-map.h (linenum_type): New typedef. 1739 (struct line_map): Use it. 1740 (SOURCE_LINE): Second arguments is a LOCATION not a LINE. 1741 (SOURCE_COLUMN): Likewise. 1742 * macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store 1743 source_location values in a variable of type linenum_type. 1744 * directives.c (struct if_stack): Use linenum_type. 1745 (strtoul_for_line): Rename as strtolinenum. 1746 (do_line): Use linenum_type. 1747 (do_linemarker): Use linenum_type and strtolinenum. 1748 (_cpp_do_file_change): Use linenum_t. 1749 * line-map.c (linemap_add): Likewise. 1750 (linemap_line_start): Likewise. 1751 * traditional.c (struct fun_macro): 'line' is a source_location. 1752 * errors.c (print_location): Use linenum_type. 1753 * directives-only.c (_cpp_preprocess_dir_only): Likewise. 1754 * internal.h (CPP_INCREMENT_LINE): Likewise. 1755 * lex.c (_cpp_skip_block_comment): Use source_location. 1756 17572008-07-14 Ben Elliston <bje@au.ibm.com> 1758 1759 * include/cpplib.h (NODE_CONDITIONAL): New. 1760 (struct cpp_callbacks): New macro_to_expand field. 1761 (struct cpp_hashnode): Adjust size of flags and type fields. 1762 (cpp_peek_token): Prototype. 1763 * lex.c (cpp_peek_token): New function. 1764 (_cpp_temp_token): Protect pre-existing lookaheads. 1765 * macro.c (cpp_get_token): Expand any conditional macros. 1766 (_cpp_backup_tokens_direct): New. 1767 (_cpp_backup_tokens): Call _cpp_backup_tokens_direct. 1768 (warn_of_redefinition): Silently allow redefined conditional 1769 macros. 1770 (_cpp_create_definition): Remove the conditional flag when a user 1771 defines one of the conditional macros. 1772 * internal.h (_cpp_backup_tokens_direct): New prototype. 1773 17742008-06-13 Andrew Haley <aph@redhat.com> 1775 1776 PR preprocessor/33305 1777 * macro.c (replace_args): Print a warning for empty macro 1778 arguments in C89 and C++. 1779 17802008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1781 1782 * Makefile.in ($(srcdir)/aclocal.m4): Update dependencies. 1783 * configure: Regenerate. 1784 17852008-06-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1786 1787 * Makefile.in (datarootdir): New variable. 1788 17892008-06-12 H.J. Lu <hongjiu.lu@intel.com> 1790 1791 PR preprocessor/36479 1792 * charset.c (cpp_interpret_string_notranslate): Also set 1793 narrow_cset_desc.width. 1794 17952008-06-07 Joseph Myers <joseph@codesourcery.com> 1796 1797 * configure.ac (parisc*64*-*-*): Remove. 1798 * configure: Regenerate. 1799 18002008-05-30 Tom Tromey <tromey@redhat.com> 1801 1802 PR preprocessor/36320: 1803 * internal.h (_cpp_parse_expr): Update. 1804 * expr.c (_cpp_parse_expr): Add 'is_if' argument. Update error 1805 messages. 1806 * directives.c (do_if): Update. 1807 (do_elif): Require expression if processing group. 1808 18092008-05-30 Danny Smith <dannysmith@users.sourceforge.net> 1810 1811 * include/cpplib.h (struct cpp_dir): Add new field, canonical_name. 1812 18132008-05-21 Tom Tromey <tromey@redhat.com> 1814 1815 PR preprocessor/27777: 1816 * lex.c (cpp_output_line_to_string): New function. 1817 * internal.h (_cpp_begin_message): Don't declare. 1818 * errors.c (_cpp_begin_message): Now static. 1819 * include/cpplib.h (cpp_output_line_to_string): Declare. 1820 * directives.c (do_diagnostic): Rewrote. Use 1821 cpp_output_line_to_string. Don't use _cpp_begin_message. 1822 18232008-05-21 Tom Tromey <tromey@redhat.com> 1824 1825 * include/symtab.h (HT_ALLOCED): Remove. 1826 (ht_purge): Declare. 1827 * symtab.c (DELETED): New define. 1828 (ht_lookup): Update comment. 1829 (ht_lookup_with_hash): Handle deleted entries. Remove HT_ALLOCED 1830 code. Use subobject allocator for strings, if it exists. 1831 (ht_expand): Handle deleted entries. 1832 (ht_forall): Likewise. 1833 (ht_purge): New function. 1834 (ht_dump_statistics): Print deletion statistics. 1835 18362008-05-13 Tom Tromey <tromey@redhat.com> 1837 1838 PR preprocessor/22168: 1839 * include/cpplib.h (struct cpp_options) <objc>: Update 1840 documentation. 1841 * expr.c (eval_token): Warn for use of assertions. 1842 * directives.c (directive_diagnostics): Warn about extensions. 1843 (DEPRECATED): New define. 1844 (DIRECTIVE_TABLE): Use it. 1845 18462008-05-06 Tom Tromey <tromey@redhat.com> 1847 1848 PR preprocessor/35313, PR preprocessor/36088: 1849 * expr.c (optab) <QUERY, COMMA>: Set precedence to 4. 1850 (reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON. 1851 18522008-05-04 David S. Miller <davem@davemloft.net> 1853 1854 * configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes. 1855 * configure: Regenerate. 1856 18572008-04-22 Daniel Franke <franke.daniel@gmail.com> 1858 1859 * include/cpplib.h (cpp_define_formatted): New. 1860 * directives.c (cpp_define_formatted): New. 1861 18622008-04-21 Tom Tromey <tromey@redhat.com> 1863 1864 PR libcpp/33415: 1865 * charset.c (_cpp_convert_input): Add buffer_start argument. 1866 Ignore UTF-8 BOM if seen. 1867 * internal.h (_cpp_convert_input): Add argument. 1868 * files.c (struct _cpp_file) <buffer_start>: New field. 1869 (destroy_cpp_file): Free buffer_start, not buffer. 1870 (_cpp_pop_file_buffer): Likewise. 1871 (read_file_guts): Update. 1872 18732008-04-18 Kris Van Hees <kris.van.hees@oracle.com> 1874 1875 * include/cpp-id-data.h (UC): Was U, conflicts with U"..." literal. 1876 * include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens. 1877 (struct cpp_options): Added uliterals. 1878 (cpp_interpret_string): Update prototype. 1879 (cpp_interpret_string_notranslate): Idem. 1880 * charset.c (init_iconv_desc): New width member in cset_converter. 1881 (cpp_init_iconv): Add support for char{16,32}_cset_desc. 1882 (convert_ucn): Idem. 1883 (emit_numeric_escape): Idem. 1884 (convert_hex): Idem. 1885 (convert_oct): Idem. 1886 (convert_escape): Idem. 1887 (converter_for_type): New function. 1888 (cpp_interpret_string): Use converter_for_type, support u and U prefix. 1889 (cpp_interpret_string_notranslate): Match changed prototype. 1890 (wide_str_to_charconst): Use converter_for_type. 1891 (cpp_interpret_charconst): Add support for CPP_CHAR{16,32}. 1892 * directives.c (linemarker_dir): Macro U changed to UC. 1893 (parse_include): Idem. 1894 (register_pragma_1): Idem. 1895 (restore_registered_pragmas): Idem. 1896 (get__Pragma_string): Support CPP_STRING{16,32}. 1897 * expr.c (eval_token): Support CPP_CHAR{16,32}. 1898 * init.c (struct lang_flags): Added uliterals. 1899 (lang_defaults): Idem. 1900 * internal.h (struct cset_converter) <width>: New field. 1901 (struct cpp_reader) <char16_cset_desc>: Idem. 1902 (struct cpp_reader) <char32_cset_desc>: Idem. 1903 * lex.c (digraph_spellings): Macro U changed to UC. 1904 (OP, TK): Idem. 1905 (lex_string): Add support for u'...', U'...', u"..." and U"...". 1906 (_cpp_lex_direct): Idem. 1907 * macro.c (_cpp_builtin_macro_text): Macro U changed to UC. 1908 (stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}. 1909 19102008-04-18 Paolo Bonzini <bonzini@gnu.org> 1911 1912 PR bootstrap/35457 1913 * aclocal.m4: Regenerate. 1914 * configure: Regenerate. 1915 19162008-04-17 Tom Tromey <tromey@redhat.com> 1917 1918 PR libcpp/34866: 1919 * errors.c (cpp_error): Don't reference a token before the start 1920 of the current run. 1921 19222008-04-16 Tom Tromey <tromey@redhat.com> 1923 1924 * Makefile.in (TAGS_SOURCES): New variable. 1925 (TAGS): New target. 1926 19272008-04-11 Kaz Kojima <kkojima@gcc.gnu.org> 1928 1929 * configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-* 1930 and shbe-*-*. 1931 * configure: Rebuilt. 1932 19332008-04-02 Joseph Myers <joseph@codesourcery.com> 1934 1935 * include/cpplib.h (struct cpp_callbacks): Add used_define, 1936 used_undef and before_define. 1937 (NODE_USED): Define. 1938 * directives.c (do_define, do_undef, undefine_macros, do_ifdef, 1939 do_ifndef, cpp_pop_definition): Handle new flag and use new 1940 callbacks. 1941 * expr.c (parse_defined): Handle new flag and use new callbacks. 1942 * macro.c (enter_macro_context, _cpp_free_definition): Handle new 1943 flag and use new callbacks. 1944 19452008-04-01 Jakub Jelinek <jakub@redhat.com> 1946 1947 PR pch/13675 1948 * files.c (struct _cpp_file): Remove pch field. 1949 (pch_open_file): Don't set file->pch, just file->pchname. 1950 (should_stack_file): After pfile->cb.read_pch call 1951 free pchname and clear pchname, don't close file->fd. 1952 Test file->pchname instead of file->pch. Don't close fd after cb. 1953 (_cpp_stack_include): Test file->pchname instead of file->pch. 1954 19552008-03-28 Tom Tromey <tromey@redhat.com> 1956 1957 * Makefile.in (POSTCOMPILE): New variable. 1958 (.c.o): Use it. 1959 19602008-03-13 Tom Tromey <tromey@redhat.com> 1961 1962 PR libcpp/35322: 1963 * directives.c (destringize_and_run): Set pfile->directive. 1964 19652008-03-06 Markus Milleder <markus.milleder@generali.at> 1966 1967 PR preprocessor/35458 1968 * mkdeps.c (munge): Quote '#' with a '\'. 1969 19702008-02-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 1971 1972 PR preprocessor/35379 1973 * mkdeps.c (deps_write): Ensure the first target always appears 1974 in the first column, without leading backslash newline. Avoid 1975 some more extra whitespace. 1976 19772008-02-25 Thiemo Seufer <ths@mips.com> 1978 1979 * Makefile.in ($(srcdir)/config.in): Depend on configure.ac. 1980 19812008-02-19 Tom Tromey <tromey@redhat.com> 1982 1983 * traditional.c (lex_identifier): Use CPP_HASHNODE. 1984 * lex.c (lex_identifier): Use CPP_HASHNODE. 1985 * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in 1986 do-while. 1987 * identifiers.c (alloc_node): Change return type. 1988 (_cpp_init_hashtable): Don't cast 'alloc_node'. 1989 (proxy_assertion_broken): New declaration. 1990 (cpp_forall_identifiers): Move comment. 1991 * line-map.c (linemap_add): Comment fix. 1992 (linemap_line_start): Indentation fix. 1993 19942008-01-25 Jakub Jelinek <jakub@redhat.com> 1995 1996 PR preprocessor/34692 1997 * macro.c (collect_args): Add pragma_buff argument. Push 1998 CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather 1999 than into arguments. Reset prevent_expansion and parsing_args 2000 state at CPP_PRAGMA_EOL/CPP_EOF. 2001 (funlike_invocation_p): Add pragma_buff argument, pass it through 2002 to collect_args. 2003 (enter_macro_context): Add result argument. Adjust 2004 funlike_invocation_p caller. Emit all deferred pragma tokens 2005 gathered during collect_args before the expansion, add a padding 2006 token. Return 2 instead of 1 if any pragma tokens were prepended. 2007 (cpp_get_token): If enter_macro_context returns 2, don't return 2008 a padding token, instead cycle to grab CPP_PRAGMA token. 2009 * directives.c (_cpp_handle_directive): If was_parsing_args 2010 in deferred pragma, leave parsing_args and prevent_expansion as is. 2011 20122008-01-22 Tom Tromey <tromey@redhat.com> 2013 2014 PR c++/34859 2015 * macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and 2016 __STDC_CONSTANT_MACROS. 2017 20182008-01-07 Fred Fish <fnf@specifix.com> 2019 2020 PR preprocessor/30363 2021 * traditional.c (replace_args_and_push): Add local variable 2022 cxtquote, calculate the replacement text size assuming a 2023 worst case of every input character quoted with backslash, 2024 and properly handle output quoting of quote characters in 2025 actual arguments used in function-like macros. 2026 20272008-01-03 Tom Tromey <tromey@redhat.com> 2028 2029 PR preprocessor/34602 2030 * directives.c (do_line): Don't try to spell EOF token. 2031 (do_linemarker): Add comment. 2032 20332007-12-11 DJ Delorie <dj@redhat.com> 2034 2035 * charset.c (convert_using_iconv): Close out any shift states, 2036 returning to the initial state. 2037 20382007-12-06 Tom Tromey <tromey@redhat.com> 2039 2040 PR c/29172 2041 * internal.h (struct cpp_reader) <file_hash_entries>: Changed 2042 type. 2043 <file_hash_entries_allocated, file_hash_entries_used>: Removed. 2044 * files.c (FILE_HASH_POOL_SIZE): New macro. 2045 (struct file_hash_entry_pool): New. 2046 (destroy_all_cpp_files): New function. 2047 (allocate_file_hash_entries): Allocate a file_hash_entry_pool. 2048 (new_file_hash_entry): Update. 2049 (free_file_hash_entries): New function. 2050 (_cpp_cleanup_files): Call free_file_hash_entries and 2051 destroy_all_cpp_files. 2052 (cpp_clear_file_cache): New function. 2053 * include/cpplib.h (cpp_clear_file_cache): Declare. 2054 20552007-12-03 Tom Tromey <tromey@redhat.com> 2056 2057 PR preprocessor/34288 2058 * configure.ac, config.in: Rebuilt. 2059 * configure.ac: Check for ssize_t. 2060 20612007-11-30 Tom Tromey <tromey@redhat.com> 2062 2063 PR preprocessor/32868 2064 * macro.c (_cpp_create_definition): Special case 2065 __STDC_FORMAT_MACROS. 2066 20672007-11-16 Michael Matz <matz@suse.de> 2068 2069 * files.c (search_path_head): Fix check for absolute paths. 2070 20712007-11-11 Tom Tromey <tromey@redhat.com> 2072 2073 PR c++/17557 2074 * include/cpplib.h (cpp_included_before): Declare. 2075 * files.c (struct file_hash_entry) <location>: New field. 2076 (_cpp_find_file): Initialize new field. 2077 (make_cpp_dir): Likewise. 2078 (cpp_included_before): New function. 2079 20802007-11-01 Tom Tromey <tromey@redhat.com> 2081 2082 PR preprocessor/30805 2083 * macro.c (paste_tokens): Handle padding token. 2084 (paste_tokens): Don't abort unless padding has PASTE_LEFT flag. 2085 20862007-10-31 Tom Tromey <tromey@redhat.com> 2087 2088 PR preprocessor/30786 2089 * macro.c (builtin_macro): Return result of _cpp_do__Pragma. 2090 * directives.c (_cpp_do__Pragma): Return error status. 2091 * internal.h (_cpp_do__Pragma): Update. 2092 * directives.c (get__Pragma_string): Back up if EOF seen. 2093 20942007-09-06 Tom Tromey <tromey@redhat.com> 2095 2096 * internal.h (struct cpp_reader) <invocation_location>: New 2097 field. 2098 (struct cpp_reader) <set_invocation_location>: Likewise. 2099 * init.c (cpp_set_line_map): New function. 2100 * line-map.c (linemap_add): Use linemap's allocator. 2101 * include/line-map.h (GTY): Define. 2102 (line_map_realloc): New typedef. 2103 (struct line_map): Mark with GTY. 2104 (struct line_maps): Likewise. 2105 (struct line_maps) <maps>: Likewise. 2106 (struct line_maps) <reallocator>: New field. 2107 * include/symtab.h (GTY): Conditionally define. 2108 * include/cpplib.h (cpp_set_line_map): Declare. 2109 (cpp_get_token_with_location): Declare. 2110 * macro.c (cpp_get_token): Set invocation_location on the reader. 2111 (cpp_get_token_with_location): New function. 2112 21132007-08-30 Chao-ying Fu <fu@mips.com> 2114 2115 * expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, 2116 ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk. 2117 (cpp_classify_number): Support decimal fixed-point constants without 2118 exponents. 2119 Warn about fixed-point constants when -pedantic. 2120 * include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change 2121 comments to support fixed-point values. 2122 (CPP_N_FRACT, CPP_N_ACCUM): Define. 2123 21242007-08-18 Tom Tromey <tromey@redhat.com> 2125 2126 PR preprocessor/32974 2127 * directives.c (parse_include): Don't check for EOL when 2128 processing #pragma dependency. 2129 21302007-07-30 Ollie Wild <aaw@google.com> 2131 2132 * directives-only.c: New file. 2133 * internal.h (struct _cpp_dir_only_callbacks): New. 2134 (_cpp_preprocess_dir_only): New function. 2135 * directives.c (_cpp_handle_directive): Check directives_only before 2136 disabling execution of indented directives. 2137 * files.c (_cpp_stack_file): Add directives_only check. 2138 * include/cpplib.h (struct cpp_options): Add directives_only. 2139 (cpp_init_special_builtins): New function. 2140 * init.c (cpp_init_special_builtins): New function. 2141 (cpp_init_builtins): Move builtin_array initialization to 2142 cpp_init_special_builtins. 2143 (post_options): Check directives_only before setting 2144 pfile->state.prevent_expansion = 1. 2145 * macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__ 2146 is expanded inside a directive while -fdirectives-only is enabled. 2147 * Makefile.in (libcpp_a_OBJS): Add directives-only.o. 2148 (libcpp_a_SOURCES): Add directives-only.c. 2149 21502007-07-04 Uros Bizjak <ubizjak@gmail.com> 2151 2152 * traditional.c (_cpp_scan_out_logical_line): Initialize 2153 fmacro.args, fmacro.node, fmacro.offset, fmacro.line and 2154 fmacro.args to prevent 'may be used uninitialized' warning. 2155 21562007-07-03 Uros Bizjak <ubizjak@gmail.com> 2157 2158 * include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q): 2159 Add new constants. 2160 * expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q' 2161 suffixes. Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q 2162 for 'q' or 'Q' suffixes. 2163 21642007-06-17 Danny Smith <dannysmith@users.sourceforge.net 2165 2166 * files.c (open_file): Correct typo. 2167 21682007-06-16 Vladimir Prus <vladimir@codesourcery.com> 2169 2170 * files.c (open_file): Prevent the call 2171 for stat from overwriting errno. 2172 21732007-06-09 Vladimir Prus <vladimir@codesourcery.com> 2174 2175 * files.c (open_file): Account for the 2176 fact that on windows, opening a directory gives 2177 EACCES. 2178 21792007-06-05 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2180 2181 PR preprocessor/23479 2182 * expr.c (cpp_classify_number): Implement 0b-prefixed binary 2183 integer constants. 2184 (append_digit): Likewise. 2185 * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed 2186 binary integer constants. 2187 21882007-05-31 Dave Korn <dave.korn@artimi.com> 2189 2190 PR preprocessor/14331 2191 * lex.c (_cpp_get_fresh_line): Don't warn if no newline at EOF. 2192 21932007-05-24 Ollie Wild <aaw@google.com> 2194 2195 * macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER. 2196 * pch.c (cpp_write_pch_deps): Save __COUNTER__ state. 2197 (cpp_write_pch_state): Save __COUNTER__ state. 2198 (cpp_valid_state): Check valid __COUNTER__ state. 2199 (cpp_read_state): Read new __COUNTER__ state. 2200 * include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator. 2201 * init.c (builtin_array): Add __COUNTER__/BT_COUNTER. 2202 * internal.h (struct cpp_reader): Add counter member. 2203 22042007-05-23 Simon Martin <simartin@users.sourceforge.net> 2205 2206 PR preprocessor/20077 2207 * macro.c (create_iso_definition): Fixed the method to determine 2208 whether the token-pasting operator appears at the beginning or the end 2209 of a macro. 2210 22112007-05-21 Ian Lance Taylor <iant@google.com> 2212 2213 * internal.h (struct cpp_reader): Add new fields: 2214 nonexistent_file_hash and nonexistent_file_ob. 2215 * files.c: Include "obstack.h". 2216 (find_file_in_dir): Before trying to open the file, look up the 2217 path name in the hash table of nonexistent files. After failing 2218 to open the file, add the path name to the hash table. 2219 (_cpp_find_file): Cache the results of looking up the file name 2220 starting with the quote and bracket chain heads, if we can. 2221 (nonexistent_file_hash_eq): New static function. 2222 (_cpp_init_files): Initialize pfile->nonexistent_file_hash and 2223 pfile->nonexistent_file_ob. 2224 (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and 2225 pfile->nonexistent_file_ob. 2226 22272007-05-14 Janis Johnson <janis187@us.ibm.com> 2228 2229 * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic. 2230 2231 PR c/31924 2232 * expr.c (interpret_float_suffix): Check for invalid suffix. 2233 22342007-05-02 Eric Christopher <echristo@apple.com> 2235 2236 * expr.c (num_div_op): Don't overflow if the result is 2237 zero. 2238 22392007-05-02 Tom Tromey <tromey@redhat.com> 2240 2241 PR preprocessor/28709 2242 * macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs. 2243 22442007-03-30 Michael Meissner <michael.meissner@amd.com> 2245 2246 * directives.c (lex_macro_node_from_str): Fix alloca call to be 2247 type correct. 2248 22492007-03-30 Richard Henderson <rth@redhat.com> 2250 2251 * directives.c (lex_macro_node_from_str): New. 2252 (cpp_push_definition, cpp_pop_definition): New. 2253 * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare. 2254 22552007-03-01 Brooks Moses <brooks.moses@codesourcery.com> 2256 2257 * Makefile.in: Add dummy install-pdf target. 2258 22592007-01-30 Tom Tromey <tromey@redhat.com> 2260 2261 PR preprocessor/30468 2262 * mkdeps.c (apply_vpath): Strip successive '/'s if we stripped 2263 './'. 2264 22652007-01-30 Tom Tromey <tromey@redhat.com> 2266 2267 PR preprocessor/29966 2268 * macro.c (lex_expansion_token): Save and restore cpp_reader's 2269 cur_token. 2270 (_cpp_create_definition): Don't restore cur_token here. 2271 * lex.c (_cpp_lex_token): Added assertion. 2272 22732007-01-27 Tom Tromey <tromey@redhat.com> 2274 2275 * configure: Rebuilt. 2276 22772007-01-12 Tom Tromey <tromey@redhat.com> 2278 2279 PR preprocessor/28227 2280 * directives.c (lex_macro_node): Added 'is_def_or_undef' 2281 argument. 2282 (do_define): Update. 2283 (do_undef): Update. 2284 (do_ifdef): Update. 2285 (do_ifndef): Update. 2286 22872007-01-11 Paolo Bonzini <bonzini@gnu.org> 2288 2289 * configure: Regenerate. 2290 22912007-01-11 Paolo Bonzini <bonzini@gnu.org> 2292 2293 * configure: Regenerate. 2294 22952007-01-04 Tom Tromey <tromey@redhat.com> 2296 2297 PR preprocessor/28165 2298 * internal.h (cpp_in_primary_file): New function. 2299 * directives.c (do_include_next): Use cpp_in_primary_file. 2300 (do_pragma_once): Likewise. 2301 (do_pragma_system_header): Likewise. 2302 23032006-12-29 Ian Lance Taylor <iant@google.com> 2304 2305 * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't 2306 look backward at the end of the line unless we saw a backslash. 2307 23082006-12-29 Jakub Jelinek <jakub@redhat.com> 2309 2310 PR preprocessor/29612 2311 * directives.c (do_linemarker): Set pfile->buffer->sysp always, not 2312 only when new_sysp is non-zero. 2313 23142006-12-28 Tom Tromey <tromey@redhat.com> 2315 2316 PR preprocessor/30001 2317 * charset.c (_cpp_convert_input): Check that to.len is greater 2318 than zero. 2319 23202006-11-20 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com> 2321 2322 * configure.ac (need_64bit_hwint): Need 64bit hwint for SPU. 2323 * configure: Rebuilt. 2324 23252006-11-01 Douglas Gregor <doug.gregor@gmail.com> 2326 2327 * include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X 2328 for experimental C++0x mode. 2329 * init.c (lang_defaults): Add defaults for C++0x modes. C++0x has 2330 adopted the preprocessor changes introduced in C99. 2331 23322006-10-29 Joseph Myers <joseph@codesourcery.com> 2333 2334 * configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux* 2335 depending on --enable-targets=all. 2336 * configure: Regenerate. 2337 23382006-10-12 Jakub Jelinek <jakub@redhat.com> 2339 2340 PR preprocessor/28709 2341 * macro.c (paste_tokens): Do error reporting here, use BUF with the 2342 spelled LHS token as opposed to spelling it again. 2343 (paste_all_tokens): Don't report errors here, just break on failure. 2344 23452006-10-10 Brooks Moses <bmoses@stanford.edu> 2346 2347 * Makefile.in: Added empty "pdf" target. 2348 23492006-09-22 Geoffrey Keating <geoffk@apple.com> 2350 2351 * configure.ac: Make need_64_bit_hwint case for x86-darwin 2352 match exactly the glob in gcc/config.gcc. 2353 * configure: Regenerate. 2354 23552006-09-13 Joseph S. Myers <joseph@codesourcery.com> 2356 2357 PR c/28768 2358 PR preprocessor/14634 2359 * lex.c (lex_string): Pedwarn for unterminated literals. 2360 23612006-09-08 Eric Christopher <echristo@apple.com> 2362 2363 * configure.ac: Add 64-bit HWI support for i?86-darwin. 2364 23652006-08-14 Steve Ellcey <sje@cup.hp.com> 2366 2367 PR c++/28288 2368 PR c++/14556 2369 * include/cpplib.h: Remove <?, >?, <?=, and >?= tokens. 2370 (CPP_LAST_EQ): Change. 2371 (CPP_LAST_PUNCTUATOR): Change. 2372 * expr.c (cpp_operator): Remove MIN and MAX. 2373 (reduce): Remove CPP_MIN and CPP_MAX. 2374 (num_binary_op): Ditto. 2375 * lex.c (_cpp_lex_direct): Ditto. 2376 (cpp_avoid_paste): Remove ? as legal symbol after > or <. 2377 23782006-06-09 Jakub Jelinek <jakub@redhat.com> 2379 2380 PR preprocessor/27746 2381 * directives.c (do_pragma): Handle pragma with valid namespace 2382 and invalid name coming from macro expansion. 2383 * directives.c (destringize_and_run): Initialize next field in 2384 context. 2385 2386 PR c/27747 2387 PR c++/27748 2388 * directives.c (destringize_and_run): Set NO_EXPAND on the 2389 tokens. 2390 2391 * macro.c (_cpp_backup_tokens): Fix comment typo. 2392 23932006-05-31 Daniel Jacobowitz <dan@codesourcery.com> 2394 2395 * Makefile.in (CATALOGS): Add po/ prefix. 2396 * configure: Regenerated. 2397 23982006-05-23 Carlos O'Donell <carlos@codesourcery.com> 2399 2400 * Makefile.in: Add install-html target. Add install-html to .PHONY 2401 24022006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> 2403 2404 * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP. 2405 * files.c (_cpp_get_file_stat): New function. 2406 * include/cpplib.h (builtin_type): Add BT_TIMESTAMP. 2407 * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP. 2408 * internal.h (_cpp_get_file_stat): Prototype. 2409 (struct cpp_buffer): Add timestamp. 2410 24112006-01-23 Jakub Jelinek <jakub@redhat.com> 2412 2413 PR preprocessor/25717 2414 * init.c (cpp_init_builtins): If __STDC__ will not change value 2415 between system headers and other sources, define it as a normal 2416 macro rather than a builtin. 2417 * macro.c (_cpp_builtin_macro_text) <case BT_STDC>: Only check 2418 cpp_in_system_header condition. 2419 24202006-01-05 Paolo Bonzini <bonzini@gnu.org> 2421 2422 * Makefile.in: Use -MMD instead of -MD. 2423 24242006-01-04 Dmitry Kurochkin <dmitry.kurochkin@gmail.com> 2425 Richard Henderson <rth@redhat.com> 2426 2427 Merge from gomp branch: 2428 * directives.c (struct pragma_entry): Add is_deferred. Add ident 2429 entry to value union. 2430 (end_directive): Don't eat the line if in_deferred_pragma. 2431 (run_directive): Remove pragma hacks. 2432 (insert_pragma_entry): Remove. 2433 (new_pragma_entry): New. 2434 (register_pragma_1): Split out of register_pragma. Only handle 2435 the lookup tree and return the new entry. 2436 (cpp_register_pragma): Fill in the pragma entry here. 2437 (cpp_register_deferred_pragma): New. 2438 (register_pragma_internal): New. 2439 (_cpp_init_internal_pragmas): Use register_pragma_internal. 2440 (do_pragma): Allow pragma expansion after namespace. For deferred 2441 pragmas, don't slurp the line into a string. 2442 (destringize_and_run): Save tokens for deferred pragmas. 2443 (cpp_handle_deferred_pragma): Remove. 2444 * macro.c (builtin_macro): Remove pragma token hack. 2445 (_cpp_push_token_context): Rename from push_token_context and export. 2446 * internal.h (struct lexer_state): Add pragma_allow_expansion. 2447 (_cpp_push_token_context): Declare. 2448 * lex.c (_cpp_lex_token): Allow _cpp_handle_directive to return 2449 a token. Update the line number correctly if so. 2450 (_cpp_lex_direct): Emit CPP_PRAGMA_EOL tokens. 2451 (cpp_token_val_index): Return CPP_TOKEN_FLD_PRAGMA for pragmas. 2452 * include/cpplib.h (PRAGMA_EOL): New. 2453 (CPP_TOKEN_FLD_PRAGMA): New. 2454 (struct cpp_token): Add val.pragma. 2455 (struct cpp_options): Remove defer_pragmas. 2456 (cpp_handle_deferred_pragma): Remove. 2457 (cpp_register_deferred_pragma): Declare. 2458 24592006-01-01 Jakub Jelinek <jakub@redhat.com> 2460 2461 PR c++/25294 2462 * directives.c (do_pragma): If pragma line ends with multi-line 2463 block comment, end the saved deferred pragma string before that 2464 comment. Handle embedded '\0' chars on the pragma line. 2465 24662005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2467 2468 PR c++/23333 2469 * include/cpplib.h: Add PURE_ZERO to flags for the cpp_token structure. 2470 24712005-12-07 Jon Grimm <jgrimm2@us.ibm.com> 2472 Ben Elliston <bje@au.ibm.com> 2473 2474 * include/cpplib.h (CPP_N_DFLOAT): New. 2475 * expr.c (interpret_float_suffix): Identify df, dd, and dl 2476 suffixes as decimal floating point constants. 2477 (cpp_classify_number): Disallow hexadecimal DFP constants. 2478 24792005-11-14 Gerald Pfeifer <gerald@pfeifer.com> 2480 Ian Lance Taylor <ian@airs.com> 2481 2482 * include/cpplib.h (struct cpp_callbacks): Annotate error with 2483 ATTRIBUTE_FPTR_PRINTF(3,0) instead of ATTRIBUTE_PRINTF(3,0). 2484 24852005-11-09 Per Bothner <per@bothner.com> 2486 Uros Bizjak <uros@kss-loka.si> 2487 2488 PR c/24101 2489 * init.c (read_original_filename): Temporarily set 2490 state.in_directive before calling _cpp_lex_direct for 2491 CPP_HASH tokens. 2492 24932005-11-03 James E Wilson <wilson@specifix.com> 2494 2495 PR preprocessor/24202 2496 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false. 2497 24982005-11-04 Joseph S. Myers <joseph@codesourcery.com> 2499 2500 * include/cpplib.h (struct cpp_callbacks): Make error take 2501 va_list* parameter. 2502 * errors.c (cpp_error): Update call to callback. 2503 25042005-11-03 Andrew Pinski <pinskia@physics.uc.edu> 2505 2506 PR preprocessor/22042 2507 * macro.c (_cpp_builtin_macro_text): Lower the needed max 2508 buffer size. 2509 (cpp_quote_string): Don't octalify non printable 2510 charactors. 2511 25122005-11-03 Joseph S. Myers <joseph@codesourcery.com> 2513 2514 PR c++/17964 2515 * include/cpplib.h (struct cpp_options): Add client_diagnostic. 2516 (struct cpp_callbacks): Add error. 2517 * errors.c (cpp_error): If client_diagnostic, use error callback. 2518 * charset.c (convert_escape): Don't use %03o in diagnostic. 2519 25202005-10-21 James E Wilson <wilson@specifix.com> 2521 2522 PR preprocessor/15220 2523 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all 2524 callers. Pass to open_file_failed. 2525 (open_file_failed): New parameter angle_brackets. Fix all callers. 2526 Use in print_dep assignment. 2527 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file. 2528 * internal.h (_cpp_find_file): Add new parm to declaration. 2529 25302005-10-08 Kazu Hirata <kazu@codesourcery.com> 2531 2532 * configure.ac: Require 64-bit int for arm*-*-*eabi*. 2533 * configure: Regenerate. 2534 25352005-10-04 Ian Lance Taylor <ian@airs.com> 2536 2537 PR preprocessor/13726 2538 * directives.c (check_eol_return_comments): New static function. 2539 (parse_include): Add buf parameter. Change all callers. 2540 (do_include_common): If not discard comments, turn on 2541 save_comments. Pass collected comments to include callback. 2542 * include/cpplib.h (struct cpp_callbacks): Add new parameter to 2543 include callback: cpp_token list. 2544 25452005-09-20 Joseph S. Myers <joseph@codesourcery.com> 2546 2547 * include/cpplib.h (struct cpp_options): Add extended_identifiers. 2548 * init.c (struct lang_flags, lang_defaults): Add 2549 extended_identifiers. 2550 (cpp_set_lang): Use it. 2551 * lex.c (forms_identifier_p): Check extended_identifiers. 2552 25532005-08-30 Jakub Jelinek <jakub@redhat.com> 2554 2555 PR preprocessor/20348 2556 PR preprocessor/20356 2557 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and 2558 2004-06-05 changes. 2559 25602005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2561 2562 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add 2563 -Wmissing-format-attribute. 2564 2565 * configure: Regenerate. 2566 25672005-06-29 Kelley Cook <kcook@gcc.gnu.org> 2568 2569 * all files: Update FSF address in copyright headers. 2570 * makeucnid.c (write_copyright): Update outputted FSF address. 2571 25722005-06-13 Zack Weinberg <zack@codesourcery.com> 2573 2574 * configure.ac: Invoke ZW_CREATE_DEPDIR and 2575 ZW_PROG_COMPILER_DEPENDENCIES. 2576 * aclocal.m4, configure: Regenerate. 2577 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE): 2578 New variables. 2579 (distclean): Clean up $(DEPDIR) and its contents. 2580 (.c.o): Use $(COMPILE). 2581 Include $(DEPDIR)/*.Po for most object->header dependencies. 2582 25832005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net> 2584 2585 * configure.ac: Check declarations for asprintf and vasprintf. 2586 * config.in: Regenerate. 2587 * configure: Likewise. 2588 2589 * charset.c (conversion_loop): Use XRESIZEVEC. 2590 (convert_no_conversion): Likewise. 2591 (convert_using_iconv): Likewise. 2592 (init_iconv_desc): Cast return value of alloca. 2593 (cpp_host_to_exec_charset): Use XNEWVEC. 2594 (emit_numeric_escape): Use XRESIZEVEC. 2595 (cpp_interpret_string): Use XNEWVEC. 2596 (cpp_interpret_string): Use XRESIZEVEC. 2597 (_cpp_interpret_identifier): Cast return value of alloca. 2598 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC. 2599 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC. 2600 (parse_include): Use XNEWVEC. 2601 (insert_pragma_entry): Rename local variable "new" to 2602 "new_entry". 2603 (save_registered_pragmas): Cast return value of xmemdup. 2604 (destringize_and_run): Same for alloca. 2605 (parse_assertion): Likewise. 2606 (do_assert): Cast allocated storage to proper type. 2607 (cpp_define): Likewise. 2608 (_cpp_define_builtin): Likewise. 2609 (cpp_undef): Likewise. 2610 (handle_assertion): Likewise. 2611 (cpp_push_buffer): Rename local variable "new" to "new_buffer". 2612 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype. 2613 (CPP_UMINUS): Likewise. 2614 (struct cpp_operator): Rename from struct operator. 2615 (_cpp_expand_op_stack): Use XRESIZEVEC. 2616 * files.c (pch_open_file): Use XNEWVEC. 2617 (pch_open_file): Use XRESIZEVEC. 2618 (read_file_guts): Use XNEWVEC and XRESIZEVEC. 2619 (dir_name_of_file): Use XNEWVEC. 2620 (make_cpp_file): Use XCNEW. 2621 (make_cpp_dir): Likewise. 2622 (allocate_file_hash_entries): USE XNEWVEC. 2623 (cpp_included): Cast return value of htab_find_with_hash. 2624 (append_file_to_dir): Use XNEWVEC. 2625 (read_filename_string): Likewise. Use XRESIZEVEC too. 2626 (read_name_map): Cast return value of alloca. Use XRESIZEVEC. 2627 (remap_filename): Use XNEWVEC. 2628 (struct pchf_entry): Move definition out of struct pchf_data. 2629 (_cpp_save_file_entries): Use XCNEWVAR. 2630 (_cpp_read_file_entries): Use XNEWVAR. 2631 * identifiers.c (alloc_node): Use XOBNEW. 2632 * init.c (cpp_create_reader): Use XCNEW. 2633 (cpp_init_builtins): Cast of b->value to enum builtin_type. 2634 (read_original_directory): Cast return value of alloca. 2635 * lex.c (add_line_note): Use XRESIZEVEC. 2636 (warn_about_normalization): Use XNEWVEC. 2637 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype). 2638 (new_buff): Use XNEWVEC. 2639 * line-map.c (linemap_add): Use XRESIZEVEC. 2640 * macro.c (builtin_macro): Cast return value of alloca. 2641 (paste_tokens): Likewise. 2642 (expand_arg): Use XNEWVEC and XRESIZEVEC. 2643 (_cpp_save_parameter): Use XRESIZEVEC. 2644 (create_iso_definition): Cast allocated storage to proper type. 2645 (_cpp_create_definition): Likewise. 2646 (cpp_macro_definition): Use XRESIZEVEC. 2647 * makedepend.c (add_clm): Use XNEW. 2648 (add_dir): Likewise. 2649 * mkdeps.c (munge): Use XNEWVEC. 2650 (deps_init): Use XCNEW. 2651 (deps_add_target): Use XRESIZEVEC. 2652 (deps_add_default_target): Cast return value of alloca. 2653 (deps_add_dep): Use XRESIZEVEC. 2654 (deps_add_vpath): Likewise. Use XNEWVEC too. 2655 (deps_restore): Likewise. 2656 * pch.c (save_idents): Use XNEW and XNEWVEC. 2657 (cpp_save_state): Use XNEW. 2658 (count_defs): Cast return value of htab_find. 2659 (write_defs): Likewise. 2660 (cpp_write_pch_deps): Use XNEWVEC. 2661 (collect_ht_nodes): Use XRESIZEVEC. 2662 (cpp_valid_state): Use XNEWVEC. 2663 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup. 2664 * symtab.c (ht_create): Use XCNEW. 2665 (ht_lookup_with_hash): Cast return value of obstack_copy0. 2666 (ht_expand): Use XCNEWVEC. 2667 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus. 2668 (bool): Do not define if __cplusplus. 2669 26702005-05-12 Zack Weinberg <zack@codesourcery.com> 2671 2672 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident. 2673 (do_sccs): Delete function definition, #define to do_ident. 2674 (do_ident): Don't hardwire directive name. 2675 26762005-05-12 Ryota Kunisawa <kunisawa@access.co.jp> 2677 2678 PR bootstrap/21230 2679 * configure: Regenerate. 2680 26812005-04-27 Andris Pavenis <pavenis@latnet.lv> 2682 2683 * files.c: Include io.h for DJGPP to get prototype of setmode. 2684 26852005-04-19 Per Bothner <per@bothner.com> 2686 2687 PR preprocessor/20907 2688 * line-map.c (linemap_line_start): Fix bug when we need to increse 2689 column_bits but can re-use the current line_map. 2690 26912005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2692 2693 * system.h (fopen, fdopen, freopen): Define these to the unlocked 2694 libiberty functions. 2695 26962005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2697 2698 * configure.ac (libcpp_UNLOCKED_FUNCS): New. 2699 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS. 2700 * system.h (putchar, getc, getchar, clearerr, feof, fileno, 2701 fflush, fgetc, fgets, ferror, fread): Redefine to the associated 2702 _unlocked function. 2703 (fwrite_unlocked): Fix prototype. 2704 2705 * configure, config.in: Regenerate. 2706 27072005-04-05 Jakub Jelinek <jakub@redhat.com> 2708 2709 PR preprocessor/19475 2710 * macro.c (create_iso_definition): For < ISO C99, don't 2711 pedwarn if there is no whitespace between macro name and its 2712 replacement, but the replacement starts with a basic character 2713 set character. 2714 27152005-03-28 Andreas Jaeger <aj@suse.de> 2716 2717 * lex.c (warn_about_normalization): Cast field width to int to 2718 avoid warning. 2719 27202005-03-19 Joseph S. Myers <joseph@codesourcery.com> 2721 2722 * configure.ac: Consistently use solaris2.1[0-9]* instead of 2723 solaris2.1[0-9]. 2724 * configure: Regenerate. 2725 27262005-03-15 Geoffrey Keating <geoffk@apple.com> 2727 2728 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial 2729 UCN rather than printing an error. 2730 27312005-03-14 Geoffrey Keating <geoffk@apple.com> 2732 2733 * lex.c (forms_identifier_p): Disable UCNs in C89 mode. 2734 27352005-03-14 Geoffrey Keating <geoffk@apple.com> 2736 2737 * init.c (cpp_create_reader): Default warn_normalize to normalized_C. 2738 * charset.c: Update for new format of ucnid.h. 2739 (ucn_valid_in_identifier): Update for new format of ucnid.h. 2740 Add NST parameter, and update it; update callers. 2741 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort 2742 with cpp_error. 2743 (convert_ucn): Pass normalize_state to cpp_valid_ucn. 2744 * internal.h (struct normalize_state): New. 2745 (INITIAL_NORMALIZE_STATE): New. 2746 (NORMALIZE_STATE_RESULT): New. 2747 (NORMALIZE_STATE_UPDATE_IDNUM): New. 2748 (_cpp_valid_ucn): New. 2749 * lex.c (warn_about_normalization): New. 2750 (forms_identifier_p): Add normalize_state parameter, update callers. 2751 (lex_identifier): Add normalize_state parameter, update callers. Keep 2752 the state current. 2753 (lex_number): Likewise. 2754 (_cpp_lex_direct): Pass normalize_state to subroutines. Check 2755 it with warn_about_normalization. 2756 * makeucnid.c: New. 2757 * ucnid.h: Replace. 2758 * ucnid.pl: Remove. 2759 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove 2760 comments about obsolete version of C++. 2761 * include/cpplib.h (enum cpp_normalize_level): New. 2762 (struct cpp_options): Add warn_normalize field. 2763 27642005-03-11 Geoffrey Keating <geoffk@apple.com> 2765 2766 * directives.c (glue_header_name): Update call to cpp_spell_token. 2767 * internal.h (_cpp_interpret_identifier): New. 2768 * charset.c (_cpp_interpret_identifier): New. 2769 (_cpp_valid_ucn): Allow UCN version of '$'. 2770 * lex.c (lex_identifier): Add extra parameter to indicate if initial 2771 character was '$' or '\'. Support identifiers with UCNs. 2772 (forms_identifier_p): Allow UCNs. 2773 (_cpp_lex_direct): Pass extra parameter to lex_identifier. 2774 (utf8_to_ucn): New. 2775 (cpp_spell_token): Add FORSTRING parameter. Use it. 2776 (cpp_token_as_text): Update call to cpp_spell_token. 2777 (cpp_output_token): Write UCNs back out. 2778 (stringify_arg): Update call to cpp_spell_token. 2779 (paste_tokens): Likewise. 2780 (cpp_macro_definition): Likewise. 2781 * macro.c (stringify_arg): Likewise. 2782 (paste_tokens): Likewise. 2783 (cpp_macro_definition): Likewise. 2784 * include/cpplib.h: Add parameter to cpp_spell_token. 2785 27862005-03-04 Jakub Jelinek <jakub@redhat.com> 2787 2788 PR bootstrap/20282 2789 PR bootstrap/20305 2790 * macro.c (replace_args, cpp_get_token): Copy whole 2791 cpp_token_u instead of just cpp_string field from it. 2792 27932005-02-28 Devang Patel <dpatel@apple.com> 2794 2795 * directives.c (do_line): Save sysp early before line table is 2796 realloc'ed. 2797 27982005-02-20 Zack Weinberg <zack@codesourcery.com> 2799 2800 PR 18785 2801 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro. 2802 (cpp_host_to_exec_charset): New function. 2803 * include/cpplib.h: Declare cpp_host_to_exec_charset. 2804 28052005-02-19 Devang Patel <dpatel@apple.com> 2806 2807 * charset.c (_cpp_convert_input): Check '\r' before inserting 2808 '\n' at the end. 2809 28102005-02-15 Eric Christopher <echristo@redhat.com> 2811 2812 PR preprocessor/19077 2813 * macro.c (cpp_macro_definition): Move handling of whitespace 2814 to PREV_WHITE conditional. Remove overloading of len 2815 variable. 2816 28172005-02-14 Kazu Hirata <kazu@cs.umass.edu> 2818 2819 * directives.c, files.c, init.c, internal.h, macro.c, pch.c, 2820 traditional.c: Update copyright. 2821 28222005-02-14 Paolo Bonzini <bonzini@gnu.org> 2823 2824 PR bootstrap/19818 2825 * configure.ac: Check for declaration of basename and getopt. 2826 * config.in: Regenerate. 2827 * configure: Regenerate. 2828 * internal.h (ustrcspn): New. 2829 * macro.c (create_iso_definition): Fix allocation of memory. 2830 (padding_token): Add cast to remove const-ness. 2831 * pch.c (cpp_read_state): Use ustrcspn. 2832 28332005-02-08 Mike Stump <mrs@apple.com> 2834 2835 * files.c (pchf_adder): Remove. 2836 (struct pchf_adder_info): Likewise. 2837 (_cpp_save_file_entries): Write out all files so that #import works. 2838 28392005-01-23 Joseph S. Myers <joseph@codesourcery.com> 2840 2841 * configure: Regenerate. 2842 28432005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de> 2844 2845 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader. 2846 2847 * include/cpplib.h: Also update copyright years. 2848 28492005-01-03 Geoffrey Keating <geoffk@apple.com> 2850 2851 * files.c (_cpp_find_file): Add files found by search_path_exhausted 2852 to the list of all files. 2853 28542005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net> 2855 2856 * internal.h: Update references to Cpp lib filenames. 2857 * directives.c: Likewise. 2858 * init.c: Likewise. 2859 * macro.c: Likewise. 2860 * traditional.c: Likewise. 2861 28622004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr> 2863 2864 PR preprocessor/15167 2865 * files.c (destroy_cpp_file): New function. 2866 (should_stack_file): Make a new file if the 2867 compared file is still stacked. 2868 28692004-11-28 Nathanael Nerode <neroden@gcc.gnu.org> 2870 2871 PR preprocessor/17610 2872 * directives.c (do_include_common): Error out if an empty filename 2873 is given for #include (or #include_next or #import). 2874 28752004-11-27 Roger Sayle <roger@eyesopen.com> 2876 Zack Weinberg <zack@codesourcery.com> 2877 2878 * internal.h: Replace all uses of uchar with unsigned char. 2879 * include/cpp-id-data.h: Likewise. Guard typedef of uchar 2880 with !IN_GCC, so uchar is only defined whilst building libcpp. 2881 28822004-11-24 Kelley Cook <kcook@gcc.gnu.org> 2883 2884 * aclocal.m4: Regenerate. 2885 28862004-11-24 Roger Sayle <roger@eyesopen.com> 2887 2888 PR preprocessor/15824 2889 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h> 2890 directly, instead of the non-existant "system.h" and "ansidecl.h". 2891 * configure: Regenerate. 2892 28932004-11-23 Daniel Jacobowitz <dan@codesourcery.com> 2894 Joseph Myers <joseph@codesourcery.com> 2895 2896 * internal.h (struct lexer_state): Add in_deferred_pragma. 2897 * directives.c (struct pragma_entry): Add allow_expansion. 2898 (insert_pragma_entry): Take allow_expansion flag. 2899 (register_pragma): Likewise. 2900 (cpp_register_pragma): Likewise. 2901 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma. 2902 (do_pragma): Honor allow_expansion. 2903 (cpp_handle_deferred_pragma): Set in_deferred_pragma. 2904 * include/cpplib.h (cpp_register_pragma): Update prototype. 2905 29062004-11-18 Daniel Jacobowitz <dan@codesourcery.com> 2907 Mark Mitchell <mark@codesourcery.com> 2908 2909 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set 2910 need_64bit_hwint=yes. 2911 * configure: Regenerate. 2912 29132004-11-09 Joseph S. Myers <joseph@codesourcery.com> 2914 2915 * Makefile.in ($(PACKAGE).pot): New rule. Depend on 2916 po/$(PACKAGE).pot. 2917 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword 2918 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2. 2919 Remove local srcdir path from generated file. 2920 29212004-11-04 Zack Weinberg <zack@codesourcery.com> 2922 Gerald Pfeifer <gerald@pfeifer.com> 2923 2924 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H 2925 as well. 2926 29272004-10-27 Zack Weinberg <zack@codesourcery.com> 2928 2929 PR 18075 2930 * directives.c (do_pragma): Do not defer pragmas which are unknown. 2931 (cpp_handle_deferred_pragma): Add cast to silence warning. 2932 29332004-10-14 Joseph S. Myers <jsm@polyomino.org.uk> 2934 2935 * errors.c (_cpp_begin_message): Print "error: " for errors. 2936 29372004-10-10 Andreas Jaeger <aj@suse.de> 2938 2939 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath. 2940 * Makefile.in (makedepend.o): Add dependency on mkdeps.h. 2941 29422004-10-08 Andrew Pinski <pinskia@physics.uc.edu> 2943 2944 * pch.c (cpp_write_pch_state): Remove variable z as it is not 2945 used. 2946 (cpp_read_state): Remove unused variables, m, d and mac_count. 2947 29482004-09-29 Per Bothner <per@bothner.com> 2949 2950 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore 2951 cb.line_change. Otherwise do_pragma will call the line_change 2952 call-back with a meaningless line number. 2953 29542004-09-24 Zack Weinberg <zack@codesourcery.com> 2955 2956 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to 2957 programs cluster. Use ACX_PROG_CC_WARNING_OPTS, 2958 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS. 2959 * aclocal.m4, configure: Regenerate. 2960 * init.c: Include localedir.h. 2961 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables. 2962 (DEFS): Delete. 2963 (.c.o): Use $(ALL_CFLAGS). 2964 (localedir.h, localedir.hs): New rules. 2965 (clean): Use rm -rf to remove directories. 2966 (distclean): Also delete localedir.h and localedir.hs. 2967 (init.o): Update dependencies. 2968 29692004-09-22 Kelley Cook <kcook@gcc.gnu.org> 2970 2971 * Makefile.in (aclocal.m4): Update dependencies. 2972 * configure.ac (AC_CONFIG_MACRO_DIR): New. 2973 * aclocal.m4, configure: Regenerate. 2974 29752004-09-17 Zack Weinberg <zack@codesourcery.com> 2976 2977 * charset.c (_cpp_destroy_iconv, emit_numeric_escape) 2978 (_cpp_convert_input, _cpp_default_encoding): Add comments. 2979 Some other comments in this file also tweaked. 2980 2981 * directives.c (do_pragma): Save current buffer position 2982 before lexing the pragma keywords; don't call 2983 _cpp_backup_tokens in the defer_pragmas case. 2984 29852004-09-15 Per Bothner <per@bothner.com> 2986 2987 * include/line-map.h (line_map_start): Add parameter names so 2988 preceding comment makes sense. 2989 (linemap_add): Remove from comment mention of non-existing parameter. 2990 29912004-09-09 Matt Austern <austern@apple.com> 2992 Zack Weinberg <zack@codesourcery.com> 2993 2994 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_ 2995 prefixes throughout. Add entry for PRAGMA. Remove 2996 unnecessary "= 0" from EQ. 2997 (enum cpp_ttype): Adjust OP and TK definitions to restore 2998 prefixes, via token-paste. 2999 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP): 3000 Change from #defines to additional cpp_ttype enumerators. 3001 (struct cpp_options): Add defer_pragmas. 3002 (cpp_handle_deferred_pragma): Prototype new interface. 3003 3004 * internal.h (struct cpp_reader): Add directive_result. 3005 * directives.c (struct pragma_entry): Add is_internal field; 3006 give boolean fields type bool. 3007 (start_directive): Initialize pfile->directive_result.type. 3008 (_cpp_do__Pragma): Likewise. 3009 (run_directive): Do not crash if pfile->buffer->prev is NULL. 3010 (insert_pragma_entry): Add 'internal' argument; set new->is_internal 3011 from it. 3012 (register_pragma): New static function, bulk of former 3013 cpp_register_pragma here; add 'internal' argument, pass along 3014 to insert_pragma_entry. 3015 (cpp_register_pragma): Now a wrapper around register_pragma which 3016 always passes false for 'internal' argument. 3017 (_cpp_init_internal_pragmas): Call register_pragma directly, passing 3018 true for 'internal'. 3019 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't 3020 an internal pragma, save text till the end of the line as a CPP_PRAGMA 3021 token instead of executing the pragma. 3022 (cpp_handle_deferred_pragma): New interface. 3023 * lex.c (token_spellings): Adjust OP and TK definitions to 3024 match changes to cpplib.h. 3025 (_cpp_lex_token): Check for a directive-result token and 3026 return it if present. 3027 (cpp_token_val_index): Handle CPP_PRAGMA. 3028 * macro.c (cpp_builtin_macro_text): Correct comment. 3029 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma. 3030 30312004-09-06 Serge Belyshev <belyshev@lubercy.com> 3032 3033 PR preprocessor/14699 3034 * symtab.c (ht_dump_statistics): Change type of sum_of_squares 3035 from size_t to double. 3036 30372004-08-28 Andreas Schwab <schwab@suse.de> 3038 Andreas Jaeger <aj@suse.de> 3039 3040 * configure.ac: Set PACKAGE correctly. 3041 * configure: Regenerated. 3042 30432004-08-25 Paolo Bonzini <bonzini@gnu.org> 3044 3045 * Makefile.in: Add back top_builddir. 3046 30472004-08-25 Paolo Bonzini <bonzini@gnu.org> 3048 3049 * configure.ac: Replace Automake macro invocations 3050 with manual Autoconf checks and substitutions. 3051 * configure: Regenerate. 3052 * aclocal.m4: Regenerate. 3053 * config.in: Regenerate. 3054 * Makefile.am: Removed. 3055 * Makefile.in: Heavy simplification and reorganization. 3056 30572004-08-09 Mark Mitchell <mark@codesourcery.com> 3058 3059 * configure.ac (arm*-*-eabi*): New target. 3060 (arm*-*-symbianelf*): Likewise. 3061 * configure: Regenerated. 3062 30632004-07-24 Bernardo Innocenti <bernie@develer.com> 3064 3065 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove. 3066 * directives.c: Use XNEW-family macros from libiberty. 3067 * lex.c: Likewise. 3068 * macro.c: Likewise. 3069 * cpplib.h (cpp_deps_style): Export enum with name. 3070 30712004-07-23 Matthias Klose <doko@debian.org> 3072 3073 * init.c (init_library): Use PACKAGE for the text domain. 3074 30752004-07-16 Andris Pavenis <pavenis@latnet.lv> 3076 3077 PR preprocessor/16366 3078 * internal.h (struct cpp_reader): New field dir_hash. 3079 * files.c (make_cpp_dir): Use dir_hash, not file_hash. 3080 (_cpp_init_files, _cpp_cleanup_files): Update for new field. 3081 30822004-07-04 Neil Booth <neil@duron.akihabara.co.uk> 3083 3084 PR preprocessor/16192 3085 PR preprocessor/15913 3086 PR preprocessor/15572 3087 * expr.c (_cpp_parse_expr): Handle remaining cases where an 3088 expression is missing. 3089 * init.c (post_options): Traditional cpp doesn't do // comments. 3090 30912004-06-30 Per Bothner <per@bothner.com> 3092 3093 * include/line-map.h (fileline): Remove old typedef. 3094 * internal.h (struct cpp_reader): Use source_location typedef instead. 3095 30962004-06-26 Zack Weinberg <zack@codesourcery.com> 3097 3098 Partially revert patch of 2004-06-05. 3099 * files.c (search_cache): Remove pfile argument. Don't check 3100 for file that would be found by "" or <> search here... 3101 (_cpp_find_file): ...do it here, before calling find_file_in_dir. 3102 Do not apply directory-of-current-file correction to files 3103 found by this check. Rearrange code slightly. 3104 31052004-06-21 Geoffrey Keating <geoffk@apple.com> 3106 3107 * files.c (should_stack_file): Correct swapped parameters to call 3108 to cb.read_pch. 3109 * pch.c (cpp_valid_state): Handle -fpreprocessed. 3110 31112004-06-15 Paolo Bonzini <bonzini@gnu.org> 3112 3113 * Makefile.in: Regenerate with automake 1.8.5. 3114 * aclocal.m4: Likewise. 3115 * configure: Regenerate. 3116 31172004-06-11 Zack Weinberg <zack@codesourcery.com> 3118 3119 * configure.ac: Don't invoke ACX_HEADER_STDBOOL. 3120 * configure, config.in: Regenerate. 3121 * system.h: Unconditionally define bool as unsigned char, 3122 BOOL_BITFIELD as unsigned int. 3123 * .cvsignore: New file. 3124 31252004-06-09 Geoffrey Keating <geoffk@apple.com> 3126 3127 * traditional.c (push_replacement_text): Set macro->traditional. 3128 (save_replacement_text): Likewise. 3129 * pch.c (cpp_write_pch_state): Don't write list of defined macros. 3130 (struct save_macro_item): Delete. 3131 (struct save_macro_data): Use a character array not the previous 3132 structured format. 3133 (save_macros): Save macro as text not as internal structures. 3134 (cpp_prepare_state): Update for changes to save_macro_data. 3135 (cpp_read_state): Don't read macros defined in PCH. Restore 3136 -D macros as text. 3137 * macro.c (create_iso_definition): Honour alloc_subobject. 3138 Clear traditional flag. 3139 (_cpp_create_definition): Honour alloc_subobject. 3140 * lex.c (cpp_token_val_index): New. 3141 * internal.h: Include cpp-id-data.h. 3142 (uchar): Move definition to cpp-id-data.h. 3143 (U): Likewise. 3144 (cpp_macro): Likewise. 3145 * directives.c (struct answer): Move to cpp-id-data.h. 3146 (do_assert): Honour alloc_subobject. 3147 3148 * include/symtab.h (struct ht): Add field 'alloc_subobject'. 3149 * include/cpplib.h (struct cpp_string): Add GTY marker. 3150 (enum cpp_token_fld_kind): New. 3151 (struct cpp_token): Add GTY markers. 3152 (cpp_token_val_index): Prototype. 3153 (CPP_HASHNODE_VALUE_IDX): New. 3154 (struct cpp_hashnode): Don't skip fields of 'value' when marking. 3155 * include/cpp-id-data.h: New file. 3156 31572004-06-09 Paolo Bonzini <bonzini@gnu.org> 3158 3159 * Makefile.am (all-local): New. 3160 * Makefile.in: Regenerate. 3161 31622004-06-06 Roger Sayle <roger@eyesopen.com> 3163 3164 * Makefile.am (LIBICONV): Declare. 3165 (makedepend_LDADD): Use LIBICONV. 3166 * Makefile.in: Regenerate. 3167 31682004-06-05 Andrew Pinski <pinskia@physics.uc.edu> 3169 3170 * Makefile.am (LIBINTL): Declare 3171 (makedepend_LDADD): Use LIBINTL. 3172 * Makefile.in: Regenerate. 3173 31742004-06-05 Zack Weinberg <zack@codesourcery.com> 3175 3176 * Makefile.am: Add makedepend. 3177 * Makefile.in, aclocal.m4: Regenerate. 3178 * charset.c: Insert a space to avoid a warning. 3179 * directives.c: Include mkdeps.h. 3180 (_cpp_handle_directive): Reenable macro expander if appropriate. 3181 (undefine_macros): Inline body of _cpp_free_definition for speed. 3182 Do not call undef callback or _cpp_warn_if_unused_macro. 3183 (cpp_get_deps): New interface. 3184 * files.c (search_cache): Add pfile argument. Check for file 3185 that would be found by "" or <> search here... 3186 (_cpp_find_file): ...not here. Correct recorded start_dir of 3187 files found by directory-of-current-file search that would be 3188 found by "" or <> search. 3189 * init.c (cpp_add_dependency_target): Delete. 3190 * internal.h (struct lexer_state): Add discarding_output flag. 3191 * lex.c (lex_identifier): Compute hash function while scanning. 3192 * macro.c (cpp_scan_nooutput): Disable macro expansion outside 3193 directives. 3194 * makedepend.c: New file. 3195 * mkdeps.c (struct deps): Add vpath vector. 3196 (apply_vpath, deps_add_vpath): New function. 3197 (deps_free): Free vpath vector. 3198 (deps_add_dep, deps_add_target): Use apply_vpath. 3199 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH. 3200 (ht_lookup_with_hash): New function. 3201 * cpplib.h, mkdeps.h: Update prototypes. 3202 * symtab.h: Update prototypes. 3203 (HT_HASHSTEP, HT_FINISH): New macros. 3204 32052004-05-29 Geoffrey Keating <geoffk@apple.com> 3206 3207 * symtab.c (ht_create): Set entries_owned. 3208 (ht_destroy): Honour entries_owned. 3209 (ht_expand): Likewise. 3210 (ht_load): New. 3211 * include/symtab.h (struct ht): New field 'entries_owned' 3212 (ht_load): New prototype. 3213 32142004-05-26 Paolo Bonzini <bonzini@gnu.org> 3215 3216 PR bootstrap/15651 3217 * configure.ac: Fix m4 quoting when picking 3218 the size of HOST_WIDE_INT. 3219 * configure: Regenerate. 3220 32212004-05-25 Paolo Bonzini <bonzini@gnu.org> 3222 3223 * Makefile.am: the correct directory for 3224 gettext include files is given by @INCINTL@. 3225 * Makefile.in: Regenerate. 3226 32272004-05-24 Paolo Bonzini <bonzini@gnu.org> 3228 3229 * system.h [!ENABLE_NLS]: dgettext takes two 3230 parameters. 3231 32322004-05-23 Paolo Bonzini <bonzini@gnu.org> 3233 3234 Moved libcpp from the gcc subdirectory to the toplevel. 3235 * Makefile.am: New file. 3236 * Makefile.in: Regenerate. 3237 * configure.ac: New file. 3238 * configure: Regenerate. 3239 * config.in: Regenerate. 3240 * charset.c: Moved from gcc/cppcharset.c. Add note about 3241 brokenness of input charset detection. Adjust for change 3242 in name of cppucnid.h. 3243 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h. 3244 * expr.c: Moved from gcc/cppexp.c. 3245 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h. 3246 Remove #define of O_BINARY, it is in system.h. 3247 * identifiers.c: Moved from gcc/cpphash.c. 3248 * internal.h: Moved from gcc/cpphash.h. Change header 3249 guard name. All other files adjusted to match name change. 3250 * init.c: Moved from gcc/cppinit.c. 3251 (init_library) [ENABLE_NLS]: Call bindtextdomain. 3252 * lex.c: Moved from gcc/cpplex.c. 3253 * directives.c: Moved from gcc/cpplib.c. 3254 * macro.c: Moved from gcc/cppmacro.c. 3255 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h. 3256 * traditional.c: Moved from gcc/cpptrad.c. 3257 * ucnid.h: Moved from gcc/cppucnid.h. Change header 3258 guard name. 3259 * ucnid.pl: Moved from gcc/cppucnid.pl. 3260 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header 3261 guard name. 3262 * symtab.c: Moved from gcc/hashtable.c. 3263 * line-map.c: Moved from gcc. Do not include intl.h. 3264 * mkdeps.c: Moved from gcc. 3265 * system.h: New file. 3266 * include/cpplib.h: Moved from gcc. Change header guard name. 3267 * include/line-map.h: Moved from gcc. Change header guard name. 3268 * include/mkdeps.h: Moved from gcc. Change header guard name. 3269 * include/symtab.h: Moved from gcc/hashtable.h. Change header 3270 guard name. 3271