ChangeLog 133 KB

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