ChangeLog-2008 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264
  1. 2008-12-31 Jakub Jelinek <jakub@redhat.com>
  2. PR c++/38647
  3. * parser.c (cp_parser_primary_expression) <case RID_FUNCTION_NAME>:
  4. Return error_mark_node if cp_parser_non_integral_constant_expression
  5. returns true.
  6. PR c++/38640
  7. * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
  8. 2008-12-29 Jakub Jelinek <jakub@redhat.com>
  9. PR c++/38635
  10. * parser.c (cp_parser_condition): Use cp_parser_require
  11. instead of cp_lexer_consume_token to consume =.
  12. PR c++/38637
  13. * decl.c (start_enum): If enumtype is error_mark_node, exit early.
  14. 2008-12-28 Jakub Jelinek <jakub@redhat.com>
  15. PR c++/38650
  16. * semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
  17. around volatile iteration var in condition and/or increment
  18. expression.
  19. 2008-12-27 Jakub Jelinek <jakub@redhat.com>
  20. PR c++/38639
  21. * pt.c (tsubst_omp_for_iterator): RECUR on whole init_expr instead of
  22. just its type.
  23. 2008-12-21 Jason Merrill <jason@redhat.com>
  24. PR c++/38597
  25. * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
  26. 2008-12-20 Jakub Jelinek <jakub@redhat.com>
  27. Manuel López-Ibáñez <manu@gcc.gnu.org>
  28. PR c++/36921
  29. * c-common.c (warn_about_parentheses): Remove ARG_UNUSED from
  30. arg_left. Don't warn about X<=Y<=Z if comparison's type isn't
  31. integral.
  32. 2008-12-19 Jakub Jelinek <jakub@redhat.com>
  33. PR c++/38577
  34. * call.c (build_new_method_call): Handle call being COMPOUND_EXPR
  35. or NOP_EXPR.
  36. 2008-12-18 Jakub Jelinek <jakub@redhat.com>
  37. PR c++/38427
  38. * init.c (perform_member_init): For value-initialized
  39. references call permerror instead of warning and don't emit any
  40. INIT_EXPR.
  41. 2008-12-18 Jason Merrill <jason@redhat.com>
  42. PR c++/38485
  43. * parser.c (cp_parser_token_starts_cast_expression): An EOF
  44. can't start a cast-expression.
  45. 2008-12-17 Jason Merrill <jason@redhat.com>
  46. * semantics.c (describable_type): New function.
  47. (finish_decltype_type): Use it for dependent exprs.
  48. * cp-tree.h: Declare it.
  49. * mangle.c (write_type) [DECLTYPE_TYPE]: Set skip_evaluation.
  50. (write_expression): If skip_evaluation, use type stubs.
  51. * tree.c (cp_tree_equal): Handle PARM_DECLs from different
  52. declarations of a function.
  53. * init.c (build_new): Do auto deduction if type is describable.
  54. * decl.c (cp_finish_decl): Likewise.
  55. * parser.c (cp_parser_omp_for_loop): Likewise.
  56. 2008-12-10 Jason Merrill <jason@redhat.com>
  57. PR c++/35319
  58. * mangle.c (write_builtin_type): Add mangling for decimal floating
  59. point and fixed point types.
  60. (write_type): Pass FIXED_POINT_TYPE along.
  61. 2008-12-09 Mark Mitchell <mark@codesourcery.com>
  62. PR c++/37971
  63. * class.c (resolve_address_of_overloaded_function): Check
  64. accessibility of member functions unless FLAGS indicates
  65. otherwise.
  66. * call.c (standard_conversion): Adjust flags passed to
  67. instantiate_type.
  68. (convert_default_arg): Do not perform access checks.
  69. * cp-tree.h (tsubst_flags_t): Add tf_no_access_control.
  70. 2008-12-08 Steve Ellcey <sje@cup.hp.com>
  71. * decl2.c (mark_used): Remove assemble_external call.
  72. 2008-12-08 Dodji Seketeli <dodji@redhat.com>
  73. PR debug/38390
  74. * name-lookup.c (kept_level_p): Don't forget the case of levels
  75. having using directives.
  76. 2008-12-08 Richard Henderson <rth@redhat.com>
  77. PR 38240
  78. * class.c (finish_struct_bits): Use SET_TYPE_MODE.
  79. * decl.c (record_unknown_type): Likewise.
  80. (start_enum, finish_enum): Likewise.
  81. 2008-12-05 Jakub Jelinek <jakub@redhat.com>
  82. PR c++/35336
  83. * error.c (dump_expr): Handle BIT_FIELD_REF.
  84. 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
  85. PR bootstrap/38262
  86. * Make-lang.in (cc1plus-dummy, cc1plus): Add BACKENDLIBS,
  87. remove GMPLIBS.
  88. 2008-12-04 Jason Merrill <jason@redhat.com>
  89. PR c++/37906
  90. * decl.c (grok_special_member_properties): Set TYPE_HAS_COMPLEX_DFLT
  91. here.
  92. * class.c (check_bases_and_members): Rather than assuming any
  93. user-declared default constructor is complex here.
  94. 2008-12-04 Richard Guenther <rguenther@suse.de>
  95. PR c++/38334
  96. * typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
  97. pointer access with TREE_NO_WARNING.
  98. 2008-12-03 Jason Merrill <jason@redhat.com>
  99. PR c++/38232
  100. * init.c (build_value_init): Do initial zero-initialization
  101. of a class with an implicitly-defined constructor using
  102. build_zero_init rather than in build_value_init.
  103. (build_value_init_1): Fold into build_value_init.
  104. PR c++/38256
  105. * parser.c (cp_parser_conversion_type_id): Diagnose
  106. 'operator auto' here.
  107. * decl.c (grokdeclarator): Not here.
  108. PR c++/38380
  109. * decl.c (grokdeclarator): Only set DECL_NONCONVERTING_P
  110. on explicit constructors.
  111. * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Propagate
  112. CONSTRUCTOR_IS_DIRECT_INIT.
  113. 2008-12-02 Jason Merrill <jason@redhat.com>
  114. PR c++/35782, c++/37860
  115. * call.c (build_user_type_conversion_1): Remember
  116. list-initialization.
  117. (convert_like_real): Likewise.
  118. (build_over_call): Don't require the copy constructor
  119. for copy-list-initialization.
  120. * cp-tree.h (TARGET_EXPR_LIST_INIT_P): New macro.
  121. PR c++/37234
  122. * decl.c (cp_finish_decl): Handle =default and =delete for
  123. templates, too.
  124. 2008-12-01 Jakub Jelinek <jakub@redhat.com>
  125. PR c++/38257
  126. * parser.c (cp_parser_omp_for_loop): Handle auto.
  127. * pt.c (tsubst_omp_for_iterator): Likewise.
  128. 2008-11-28 Jason Merrill <jason@redhat.com>
  129. PR c++/38233
  130. * init.c (perform_member_init): Fix value-initialization.
  131. (build_value_init_1): Add assert to catch cases that will break
  132. in the gimplifier.
  133. (build_default_init): Remove.
  134. * cp-tree.h: Remove its prototype.
  135. * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
  136. value-initialization.
  137. PR c++/38278
  138. * parser.c (cp_parser_class_name): Only call
  139. maybe_note_name_used_in_class if we actually found a class name.
  140. 2008-11-25 Jason Merrill <jason@redhat.com>
  141. PR c++/28743
  142. * decl2.c (check_classfn): Error rather than abort on parameter
  143. list mismatch.
  144. 2008-11-20 Jason Merrill <jason@redhat.com>
  145. PR c++/28513
  146. * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
  147. PR c++/37540
  148. * call.c (build_over_call): Take the address of the function even
  149. in a template.
  150. (build_new_method_call): Remember the type of the called function
  151. in a template.
  152. 2008-11-19 Dodji Seketeli <dodji@redhat.com>
  153. PR c++/37142
  154. * pt.c (coerce_template_template_parm): Use the more robust
  155. uses_template_parms instead of dependent_type_p.
  156. 2008-11-19 Dodji Seketeli <dodji@redhat.com>
  157. PR c++/35405
  158. * pt.c (lookup_template_class): Check pointers before dereferencing
  159. them.
  160. * error.c (dump_template_decl): Likewise.
  161. 2008-11-19 Jason Merrill <jason@redhat.com>
  162. PR c++/36410
  163. * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
  164. that names a class for linkage purposes.
  165. PR c++/37563
  166. * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
  167. name is not a declaration.
  168. PR c++/37256
  169. * pt.c (instantiate_decl): Don't require a definition of
  170. a template that is explicitly instantiated 'extern'.
  171. 2008-11-18 Jason Merrill <jason@redhat.com>
  172. Jakub Jelinek <jakub@redhat.com>
  173. PR c++/37962
  174. * parser.c (cp_parser_type_id): Complain about auto.
  175. * decl.c (grokdeclarator): Complain about parameters and
  176. conversion functions declared with auto.
  177. * call.c (standard_conversion): Use CLASS_TYPE_P instead of
  178. MAYBE_CLASS_TYPE_P.
  179. * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
  180. 2008-11-17 Jakub Jelinek <jakub@redhat.com>
  181. PR c++/36089
  182. * init.c (constant_value_1): Handle TREE_LIST init.
  183. 2008-11-15 Jakub Jelinek <jakub@redhat.com>
  184. PR c++/37561
  185. * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
  186. argtype instead of result_type.
  187. 2008-11-14 Jason Merrill <jason@redhat.com>
  188. PR c++/38030
  189. * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
  190. for a non-dependent call.
  191. PR c++/37740
  192. * call.c (build_aggr_conv): Increment i.
  193. 2008-11-13 Jason Merrill <jason@redhat.com>
  194. PR c++/37932
  195. * typeck2.c (process_init_constructor_record): Update bitfield
  196. handling.
  197. (check_narrowing): Update bitfield handling, print source type.
  198. 2008-11-12 Jakub Jelinek <jakub@redhat.com>
  199. PR c++/36478
  200. Revert:
  201. 2007-05-07 Mike Stump <mrs@apple.com>
  202. * parser.c (check_empty_body): Add.
  203. (cp_parser_iteration_statement): Add call to check_empty_body.
  204. 2008-11-12 Jason Merrill <jason@redhat.com>
  205. PR c++/38007
  206. * typeck.c (cp_build_modify_expr): Update bitfield handling.
  207. 2008-11-12 Jakub Jelinek <jakub@redhat.com>
  208. PR c++/34269
  209. * parser.c (cp_parser_simple_declaration): Don't commit
  210. to tentative parse if parse errors were seen.
  211. PR c++/35334
  212. * error.c (dump_expr): Handle COMPLEX_EXPR.
  213. 2008-11-10 Jakub Jelinek <jakub@redhat.com>
  214. PR c++/38021
  215. * parser.c (cp_parser_enum_specifier): After parsing :,
  216. parse definitely. Don't return early if type specifier
  217. is erroneous.
  218. 2008-11-06 David Edelsohn <edelsohn@gnu.org>
  219. PR target/26397
  220. * g++spec.c (LIBSTDCXX_STATIC): New.
  221. (lang_spec_driver): Use LIBSTDCXX_STATIC when not
  222. shared_libgcc.
  223. 2008-11-05 Fabien Chêne <fabien@gcc.gnu.org>
  224. PR c++/32519
  225. * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
  226. functions.
  227. 2008-11-05 Richard Guenther <rguenther@suse.de>
  228. PR middle-end/37742
  229. * decl.c (start_preparsed_function): Use the correct type for
  230. building the RESULT_DECL.
  231. 2008-10-31 Jakub Jelinek <jakub@redhat.com>
  232. PR c++/37967
  233. * decl.c (grokdeclarator): Diagnose auto function decl without
  234. late return type and late return type function decl where type
  235. is not auto.
  236. PR c++/37965
  237. * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
  238. no initializer.
  239. 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  240. PR 11492
  241. * class.c (check_bitfield_decl): Rename min_precision to
  242. tree_int_cst_min_precision.
  243. * decl.c (finish_enum): Likewise.
  244. 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
  245. PR c++/26997
  246. * parser.c (cp_parser_token_starts_cast_expression): New.
  247. (cp_parser_cast_expression): Peek the next token to decide whether
  248. this could be a parenthesized constructor or is definitely an
  249. actual cast.
  250. 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
  251. PR c/7543
  252. * typeck.c (build_x_binary_op): Update call to
  253. warn_about_parentheses.
  254. * parser.c (cp_parser_binary_expression): Add note about passing
  255. the correct code for unary expressions.
  256. 2008-10-24 Jakub Jelinek <jakub@redhat.com>
  257. * Make-lang.in (check-c++-subtargets): New alias for
  258. check-g++-subtargets.
  259. (lang_checks_parallelized): Add check-g++.
  260. (check_g++_parallelize): New variable.
  261. 2008-10-21 Richard Guenther <rguenther@suse.de>
  262. * semantics.c (simplify_aggr_init_exprs_r): Remove.
  263. (expand_or_defer_fn): Do not walk the function body to
  264. simplify aggr_init_exprs.
  265. 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
  266. PR c++/37004
  267. * typeck.c (cp_common_type): New. The same as
  268. type_after_usual_arithmetic_conversions but without promotions.
  269. (type_after_usual_arithmetic_conversions): Do the promotions and
  270. call cp_common_type.
  271. (common_type): Make it behave like the C version of this
  272. function. Do not handle pointer types.
  273. (common_pointer_type): Move handling of pointer types from
  274. common_type to here.
  275. (cp_build_binary_op): Use common_pointer_type instead of
  276. common_type in call to pointer_diff.
  277. Use cp_common_type instead of common_type.
  278. * cp-tree.h (common_pointer_type): Declare.
  279. 2008-10-14 Jakub Jelinek <jakub@redhat.com>
  280. PR c++/37819
  281. * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
  282. arguments if they don't already have COND_EXPR's type.
  283. 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
  284. PR c++/37650
  285. * pt.c (push_template_decl_real): Check that current_template_parms
  286. is not null.
  287. (process_partial_specialization): Assert current_template_parms not
  288. null.
  289. 2008-10-13 Doug Evans <dje@google.com>
  290. * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
  291. 2008-10-10 Jakub Jelinek <jakub@redhat.com>
  292. PR c++/37146
  293. * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
  294. COND_EXPR.
  295. 2008-10-09 Jakub Jelinek <jakub@redhat.com>
  296. PR c++/37568
  297. * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
  298. setting it to error_mark_node.
  299. 2008-10-07 Steve Ellcey <sje@cup.hp.com>
  300. * decl.c (start_cleanup_fn): Declare as inline.
  301. 2008-10-06 Jason Merrill <jason@redhat.com>
  302. PR c++/37376, other mangling issues
  303. * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
  304. (write_member_name): Break out from...
  305. (write_expression): ...here. Handle dependent COMPONENT_REF.
  306. (write_template_arg): Wrap an argument pack in 'I'/'E'.
  307. (write_builtin_type): Update char16/32_t mangling.
  308. (write_nested_name, write_prefix): Don't forget template args
  309. for typename types.
  310. * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
  311. EXPR_PACK_EXPANSION.
  312. 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
  313. * typeck.c (build_x_indirect_ref): Add location argument.
  314. (cp_build_binary_op): Pass location to warn_for_div_by_zero.
  315. (cp_build_unary_op): Add location argument.
  316. (cp_build_modify_expr): Same.
  317. * class.c (build_base_path): Pass location to build_indirect_ref.
  318. * semantics.c (handle_omp_for_class_iterator): Pass elocus to
  319. build_modify_expr.
  320. 2008-10-05 Dodji Seketeli <dodji@redhat.com>
  321. PR c++/37410
  322. * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
  323. make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
  324. of the innermost containing BLOCK.
  325. 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
  326. PR c++/37719
  327. * error.c (dump_function_decl): Save the exceptions in case of
  328. error about incompatible specifications in a specialization.
  329. 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
  330. * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
  331. 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
  332. PR c++/37683
  333. * parser.c (cp_parser_selection_statement): Fix uninitialized
  334. variable.
  335. 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
  336. PR c++/37555
  337. PR c++/37556
  338. * decl.c (grokdeclarator): Set the type for typedefs to a
  339. nested-name-specifier to error_mark_node.
  340. 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
  341. * parser.c (cp_parser_selection_statement): Implement here the
  342. -Wempty-body warning for `if' and `else' statements.
  343. * semantics.c (finish_if_stmt): Do not call empty_body_warning.
  344. 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
  345. PR c++/37649
  346. * name-lookup.c (maybe_process_template_type_declaration): Check
  347. return value of push_template_decl_real for error_mark_node.
  348. 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
  349. * semantics.c (finish_fname): Pass location to fname_decl.
  350. 2008-09-23 Jakub Jelinek <jakub@redhat.com>
  351. PR c++/37533
  352. * semantics.c (finish_omp_for): If processing_template_decl, just build
  353. MODIFY_EXPR for init instead of calling cp_build_modify_expr.
  354. 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
  355. * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
  356. (get_member_function_from_ptrfunc): Same.
  357. (build_x_binary_op): Same.
  358. (build_binary_op): Same.
  359. (cp_build_binary_op): New location argument.
  360. (pointer_diff): Pass location to cp_build_binary_op.
  361. (cp_truthvalue_conversion): Pass location to build_binary_op.
  362. (convert_ptrmem): Pass location to cp_build_binary_op.
  363. (cp_build_modify_expr): Same.
  364. (build_ptrmemfunc): Same.
  365. * init.c (expand_cleanup_for_base): Pass location to
  366. c_common_truthvalue_conversion.
  367. (build_new_1): Pass location to cp_build_binary_op.
  368. (build_vec_delete_1): Pass location to *build_binary_op,
  369. c_common_truthvalue_conversion.
  370. (build_vec_init): Same.
  371. (build_delete): Same.
  372. * decl.c (compute_array_index_type): Same.
  373. * call.c (build_new_op): Same.
  374. * rtti.c (build_dynamic_cast_1): Same.
  375. * cp-tree.h: Add argument to cp_build_binary_op.
  376. * semantics.c (handle_omp_for_class_iterator): Pass location to
  377. *build_binary_op, c_common_truthvalue_conversion.
  378. * decl2.c (get_guard_cond): Same.
  379. 2008-09-17 Richard Guenther <rguenther@suse.de>
  380. PR c++/22374
  381. * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
  382. result to the correct type.
  383. 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
  384. PR c++/37450
  385. * name-lookup.c (pushdecl_maybe_friend): Don't return the old
  386. parameter for duplicate.
  387. 2008-09-17 Jason Merrill <jason@redhat.com>
  388. PR c++/37588
  389. * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
  390. 2008-09-17 Jakub Jelinek <jakub@redhat.com>
  391. PR c++/37552
  392. * typeck.c (build_array_ref): Use protected_set_expr_location instead
  393. of SET_EXPR_LOCATION when ret might not be an expression.
  394. 2008-09-17 Jan Hubicka <jh@suse.cz>
  395. PR c++/18071
  396. * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
  397. 2008-09-16 Jakub Jelinek <jakub@redhat.com>
  398. PR c++/37531
  399. * semantics.c (finish_compound_literal): Return error_mark_node if
  400. type is errorneous.
  401. PR c++/37532
  402. * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
  403. reserved words.
  404. 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
  405. * decl.c (duplicate_decls): Call error_at.
  406. (grokfndecl): New location argument. Use location if available.
  407. (grokdeclarator): Pass declarator location to grokfndecl.
  408. * cp-tree.h (struct cp_declarator): Update comment for id_loc.
  409. * decl2.c (check_classfn): Use error_at.
  410. * parser.c (cp_parser_init_declarator): Set function_start_locus
  411. to brace location.
  412. (cp_parser_member_declaration): Set id_loc for function declarators.
  413. 2008-09-09 Jan Hubicka <jh@suse.cz>
  414. PR middle-end/37500
  415. * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
  416. 2008-09-09 Jakub Jelinek <jakub@redhat.com>
  417. PR c++/37417
  418. * tree.c (array_type_nelts_top): Add size_one_node instead of
  419. integer_one_node.
  420. 2008-09-09 Jason Merrill <jason@redhat.com>
  421. PR c++/37439
  422. * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
  423. DECL_CONTEXT set.
  424. 2008-09-09 Jakub Jelinek <jakub@redhat.com>
  425. PR c++/37389
  426. * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
  427. being error_operand_p. Don't clear value if it was error_mark_node.
  428. 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
  429. * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
  430. * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
  431. * semantics.c (anon_aggr_type_p): Remove.
  432. 2008-09-06 Jason Merrill <jason@redhat.com>
  433. PR c++/37302
  434. * parser.c (cp_parser_parameter_declaration_list): Process the
  435. PARM_DECLs as we go and push them. Return a TREE_LIST.
  436. (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
  437. (cp_parser_direct_declarator): Create a binding level and
  438. suppress deprecated warnings in the parameter list.
  439. (make_call_declarator): PARMS is now a tree.
  440. * cp-tree.h (struct cp_declarator): Function parms are now a tree.
  441. * decl.h (enum deprecated_states, deprecated_state): Move here.
  442. * decl.c: From here.
  443. (type_is_deprecated): New fn.
  444. (grokparms): PARMLIST is a tree now. Warn about parms that
  445. use deprecated types.
  446. * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
  447. 0-operand cast.
  448. * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
  449. (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
  450. function.
  451. * name-lookup.c (pushtag): Look through function parameter scopes.
  452. (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
  453. when we're parsing a function declarator.
  454. 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
  455. PR c++/37342
  456. * tree.c (cp_build_qualified_type_real): Deal with sharing of
  457. TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
  458. types.
  459. 2008-09-04 Ian Lance Taylor <iant@google.com>
  460. * parser.c (check_no_duplicate_clause): Change code parameter to
  461. enum omp_clause_code.
  462. 2008-09-03 Jakub Jelinek <jakub@redhat.com>
  463. PR c++/37348
  464. * decl.c (cp_finish_decl): Only set
  465. DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
  466. PR c++/37189
  467. * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
  468. extern decls.
  469. * decl2.c (mark_used): If defer_mark_used_calls, push decl into
  470. deferred_mark_used_calls vector and exit early.
  471. * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
  472. variables.
  473. (finish_function): Set defer_mark_used_calls for the duration of the
  474. function. Call mark_used on any queued decls.
  475. 2008-09-02 Jason Merrill <jason@redhat.com>
  476. PR c++/37208
  477. * call.c (build_over_call): Make =delete work with SFINAE.
  478. * class.c (resolve_address_of_overloaded_function): Likewise.
  479. * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
  480. threadprivate_or_deleted_p.
  481. (CP_DECL_THREADPRIVATE_P): Adjust.
  482. (DECL_DELETED_FN): Likewise.
  483. (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
  484. (SD_DELETED): New macro.
  485. * parser.c (cp_parser_init_declarator): Use them.
  486. * decl.c (start_decl): Use them.
  487. * decl2.c (mark_used): Give =deleted error even in sizeof.
  488. * typeck2.c (check_narrowing): Downgrade narrowing error to
  489. permerror.
  490. 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
  491. * typeck.c (build_array_ref): Use new location argument.
  492. * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
  493. * call.c (build_new_op): Same.
  494. * decl2.c (grok_array_decl): Same.
  495. * cp-tree.h (build_array_ref): Add location argument to prototype.
  496. 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
  497. * typeck.c (build_x_indirect_ref): Add location argument.
  498. * class.c (build_base_path): Pass location to build_indirect_ref.
  499. * pt.c (tsubst_copy_and_build): Pass location to
  500. finish_label_address_expr.
  501. * parser.c (cp_parser_unary_expression): Same.
  502. 2008-08-31 Jason Merrill <jason@redhat.com>
  503. Implement late-specified return type using 'auto'.
  504. * cp-tree.h (struct cp_declarator): Add late_return_type field to
  505. function declarator.
  506. * parser.c (cp_parser_late_return_type_opt): New fn.
  507. (cp_parser_direct_declarator): Use it.
  508. (make_call_declarator): Put it in the declarator.
  509. * decl.c (grokdeclarator): Splice in late-specified return type.
  510. * pt.c (splice_late_return_type): New fn.
  511. 2008-08-29 Michael Meissner <gnu@the-meissners.org>
  512. * decl.c (builtin_function_1): Take a bool argument to decide
  513. whether to use pushdecl or pushdecl_top_level.
  514. (duplicate_decls): Copy function specific target and optimization
  515. options on duplicate declarations.
  516. (cxx_builtin_function): Update builtin_function_1 call.
  517. (cxx_builtin_function_ext_scope): New function, guarantee that the
  518. declaration is done at global scope.
  519. * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
  520. macro, define builtin function hook for delayed machine specific
  521. builtins.
  522. * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
  523. 2008-08-30 Jason Merrill <jason@redhat.com>
  524. PR c++/37288
  525. * pt.c (dependent_type_p): Don't abort on auto outside of a template.
  526. 2008-08-29 Jason Merrill <jason@redhat.com>
  527. Implement C++0x 'auto' semantics.
  528. * decl.c (start_decl_1): Don't complain about auto being incomplete.
  529. (cp_finish_decl): Deduce auto.
  530. * init.c (build_new): Handle 'new auto'.
  531. * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
  532. message for auto than for normal template type parms.
  533. * pt.c (type_dependent_expression_p): Handle { }.
  534. (make_auto): New function.
  535. (listify_autos): New function.
  536. (do_auto_deduction): New function.
  537. (is_auto): New function.
  538. (type_uses_auto): New function.
  539. * cp-tree.h: Declare them.
  540. * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
  541. treat auto as a declspec.
  542. (cp_parser_simple_type_specifier): It's a type-specifier.
  543. 2008-08-29 Mark Mitchell <mark@codesourcery.com>
  544. * mangle.c (write_type): Add target-specific manglings for
  545. non-fundamental types to the substitution table.
  546. gcc/testsuite/
  547. 2008-08-29 Jakub Jelinek <jakub@redhat.com>
  548. PR fortran/29635
  549. PR fortran/23057
  550. * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
  551. Adjust debug_hooks->imported_module_or_decl callers.
  552. 2008-08-29 Jan Hubicka <jh@suse.cz>
  553. * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
  554. 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
  555. PR c++/37260
  556. * decl.c (reshape_init_r): Check init for error_mark_node.
  557. 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  558. PR c++/17880
  559. * semantics.c (maybe_convert_cond): Call verify_sequence_points.
  560. (finish_return_stmt): Likewise.
  561. (finish_switch_condition): Likewise.
  562. 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  563. * cp-tree.h: Fix #error directive.
  564. 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
  565. * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
  566. usual arithmetic conversions on scoped enumeration types.
  567. (common_type): Ditto.
  568. (default_conversion): Don't perform integral promotions on scoped
  569. enumeration types.
  570. (build_array_ref): Scoped enumeration types can't be used as
  571. subscripts.
  572. * decl.c (start_enum): If building a C++0x scoped enumeration,
  573. enter its scope. If provided with an underlying type, check that
  574. underlying type and set up the enumeration type accordingly.
  575. (finish_enum): Only compute an underlying type if the underlying
  576. type isn't already fixed, and only convert the enumerator values
  577. now if we've just computed the underlying type. Finish the scope
  578. of C++0x scoped enumerations.
  579. (build_enumerator): For enumerations with a fixed underlying type,
  580. check the enumerator values when the enumerator is defined.
  581. (lookup_enumerator): New.
  582. * call.c (standard_conversion): Don't allow assignment from
  583. integers to scoped enumeration types, even with -fpermissive.
  584. Don't convert from scoped enumerations to bool or any arithmetic
  585. types.
  586. (build_conditional_expr): Don't per the usual arithmetic
  587. conversions for scoped enumeration types.
  588. (convert_like_real): Check complain to see if we should
  589. produce warnings.
  590. * error.c (class_key_or_enum_as_string): Print scoped enums.
  591. * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
  592. TYPE_LANG_FLAG_5.
  593. (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
  594. (SCOPED_ENUM_P): New.
  595. (UNSCOPED_ENUM_P): New.
  596. (SET_SCOPED_ENUM_P): New.
  597. (ENUM_UNDERLYING_TYPE): New.
  598. * pt.c (lookup_template_class): Update the instantiation of enum
  599. types to deal with C++0x scoped enumerations and underlying
  600. types.
  601. * name-lookup.c (begin_scope): Deal with scoped enumeration
  602. scopes.
  603. (lookup_qualified_name): Deal with lookup into enumeration types.
  604. * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
  605. * parser.c (cp_parser_class_or_namespace_name): Rename to...
  606. (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
  607. parse a type-name that can be an enumeration type.
  608. (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
  609. (cp_parser_elaborated_type_specifier): Parse the
  610. optional `struct' or `class' following enum (in C++0x).
  611. (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
  612. enum-base clauses.
  613. 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  614. * typeck.c: Update all calls to pedwarn.
  615. * decl.c: Likewise.
  616. * call.c: Likewise.
  617. * error.c: Likewise.
  618. * pt.c: Likewise.
  619. * name-lookup.c: Likewise.
  620. * parser.c: Likewise.
  621. 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  622. PR c++/35158
  623. * parser.c (cp_parser_omp_for_loop): Handle parenthesized
  624. initializers.
  625. 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  626. * parser.c: Update all calls to inform.
  627. * typeck.c: Likewise.
  628. * init.c: Likewise.
  629. * class.c: Likewise.
  630. * call.c: Likewise.
  631. * method.c: Likewise.
  632. * friend.c: Likewise.
  633. * typeck2.c: Likewise.
  634. * pt.c: Likewise.
  635. * name-lookup.c: Likewise.
  636. * lex.c: Likewise.
  637. 2008-08-19 Jakub Jelinek <jakub@redhat.com>
  638. PR debug/37156
  639. * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
  640. 2008-08-18 Tomas Bily <tbily@suse.cz>
  641. * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
  642. 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  643. * typeck.c: Update all callers of permerror.
  644. * init.c: Likewise.
  645. * class.c: Likewise.
  646. * decl.c: Likewise.
  647. * call.c: Likewise.
  648. * except.c: Likewise.
  649. * cvt.c: Likewise.
  650. * typeck2.c: Likewise.
  651. * pt.c: Likewise.
  652. * semantics.c: Likewise.
  653. * name-lookup.c: Likewise.
  654. * lex.c: Likewise.
  655. * decl2.c: Likewise.
  656. * parser.c: Likewise.
  657. 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
  658. PR c++/34485
  659. * pt.c (check_template_shadow): Change to return a bool.
  660. * name-lookup.c (push_class_level_binding): Early return if
  661. check_template_shadow returns false.
  662. * cp-tree.h (check_template_shadow): Adjust declaration.
  663. 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
  664. PR c++/34600
  665. * decl.c (grokdeclarator): In case of extern and initializer, return
  666. error_mark_node after the error.
  667. 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  668. PR 30551
  669. * decl.c (grokfndecl): Call check_main_parameters_type only if
  670. -Wmain.
  671. 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
  672. PR c++/37087
  673. * parser.c (cp_parser_class_head): Early return error_mark_node in
  674. case of global qualification of class name or qualified name that
  675. does not name a class.
  676. 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  677. PR c++/12242
  678. * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
  679. 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  680. PR 36901
  681. * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
  682. Delete forward declarations. Check that toplev.h has not been
  683. included before this file. Include toplev.h and diagnostic.h.
  684. * error.c (cp_cpp_error): Use DK_PEDWARN.
  685. (cxx_incomplete_type_diagnostic): Update declaration.
  686. (cxx_incomplete_type_error): Use DK_ERROR.
  687. * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
  688. as argument. Use emit_diagnostic.
  689. (cxx_incomplete_type_error): Use DK_ERROR.
  690. (add_exception_specifier): Use diagnostic_t instead of custom
  691. codes.
  692. * typeck.c (complete_type_or_else): Update call to
  693. cxx_incomplete_type_diagnostic.
  694. * init.c (build_delete): Likewise.
  695. * call.c (diagnostic_fn_t): Remove unused typedef.
  696. (build_temp): Pass a pointer to diagnostic_t.
  697. (convert_like_real): Use emit_diagnostic.
  698. (joust): Check return value of warning before giving informative
  699. note.
  700. * friend.c (do_friend): Check return value of warning
  701. before giving informative note.
  702. * parser.c (cp_parser_template_id): Likewise.
  703. 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  704. PR 7651
  705. * class.c (check_bases_and_members): Warn with -Wuninitialized
  706. instead of -Wextra.
  707. 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
  708. PR c++/35985
  709. * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
  710. and make sure it is not a union.
  711. 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
  712. * semantics.c (finish_decltype_type): Initialize type.
  713. 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
  714. * semantics.c (finish_decltype_type): Handle calls to function
  715. pointers and references to functions properly.
  716. 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
  717. PR c++/36460
  718. * parser.c (cp_parser_template_argument): Don't assume that '>>'
  719. following a type-id is an error when in C++0x mode.
  720. 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  721. PR 26785
  722. * decl.c (grokdeclarator): Use explicit location with permerror_at.
  723. 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  724. PR 8715
  725. * typeck.c (cp_build_binary_op): Move code to c-common.c.
  726. 2008-08-05 Jason Merrill <jason@redhat.com>
  727. PR c++/37016
  728. * decl.c (build_ptrmemfunc_type): Don't require structural
  729. comparison of PMF types.
  730. * tree.c (cp_build_qualified_type_real): Don't clear
  731. a valid TYPE_PTRMEMFUNC_TYPE.
  732. * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
  733. templates.
  734. 2008-08-04 Jason Merrill <jason@redhat.com>
  735. PR c++/36963
  736. * typeck2.c (check_narrowing): Allow narrowing conversion
  737. from an explicit floating-point constant.
  738. PR c++/37006
  739. * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
  740. instantiations.
  741. 2008-08-04 Simon Baldwin <simonb@google.com>
  742. PR c++/36999
  743. * parser.c (cp_parser_elaborated_type_specifier): Warn only when
  744. the declaration's id is followed by a semicolon.
  745. 2008-07-31 Jakub Jelinek <jakub@redhat.com>
  746. PR c++/36405
  747. * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
  748. complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
  749. 2008-07-31 Jason Merrill <jason@redhat.com>
  750. PR c++/36633
  751. * init.c (build_new_1): Don't convert pointer to the data type
  752. until we're actually going to treat it as that type.
  753. PR c++/11309
  754. * tree.c (build_aggr_init_expr): Split out...
  755. (build_cplus_new): ...from here.
  756. (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
  757. * init.c (build_new_1): new T() means value-initialization,
  758. not default-initialization.
  759. (build_vec_init): Likewise.
  760. (build_value_init_1): Use build_aggr_init_expr.
  761. 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
  762. PR c++/36767
  763. * decl2.c (fix_temporary_vars_context_r): New function.
  764. (one_static_initialization_or_destruction): Make sure temporary
  765. variables part of the initialiser have their DECL_CONTEXT()
  766. properly set.
  767. 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  768. PR 34389
  769. * typeck.c (build_binary_op): Encapsulate code into
  770. shorten_binary_op.
  771. 2008-07-29 Jakub Jelinek <jakub@redhat.com>
  772. PR c++/36852
  773. * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
  774. TYPE_UID instead of pointers.
  775. 2008-07-29 Jan Hubicka <jh@suse.cz>
  776. * optimize.c (maybe_clone_body): Remove DECL_INLINE.
  777. * decl.c (duplicate_decls): Likewise.
  778. (grokfndecl): Likewise.
  779. (start_method): Likewise.
  780. * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
  781. Likewise.
  782. * pt.c (register_specialization, regenerate_decl_from_template):
  783. Likewise.
  784. * decl2.c (grokfield): Likewise.
  785. 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  786. PR 34985
  787. * decl.c (duplicate_decls): Merge USED flags.
  788. 2008-07-27 Jason Merrill <jason@redhat.com>
  789. PR c++/36943
  790. * decl.c (reshape_init_r): Allow C++0x initializer lists.
  791. 2008-07-28 Richard Guenther <rguenther@suse.de>
  792. Merge from gimple-tuples-branch.
  793. 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
  794. * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
  795. COND_EXPR.
  796. 2008-07-18 Jakub Jelinek <jakub@redhat.com>
  797. * decl.c (finish_function): Call gimple_body after cp_genericize.
  798. 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
  799. * optimize.c: Include gimple.h instead of tree-gimple.h.
  800. * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
  801. * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
  802. tree-iterator.h.
  803. 2008-07-16 Jakub Jelinek <jakub@redhat.com>
  804. * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
  805. 2008-07-14 Jakub Jelinek <jakub@redhat.com>
  806. * cp-gimplify.c (cp_gimplify_expr): Update comment.
  807. 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
  808. * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
  809. TREE_CHAIN.
  810. * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
  811. GIMPLE_MODIFY_STMT to MODIFY_EXPR.
  812. (cxx_omp_clause_copy_ctor): Same.
  813. (cxx_omp_clause_assign_op): Same.
  814. 2008-05-28 Jakub Jelinek <jakub@redhat.com>
  815. * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
  816. (cp_gimplify_expr): Adjust caller.
  817. 2008-05-11 Doug Kwan <dougkwan@google.com>
  818. * init.c (build_vec_delete): Add type conversion for argument
  819. 0 of POINTER_PLUS_EXPR.
  820. 2008-04-29 Doug Kwan <dougkwan@google.com>
  821. * decl2 (File): Include "gimple.h"
  822. (cp_write_global_declarations): Use gimple_body instead of
  823. DECL_SAVED_TREE.
  824. * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
  825. 2008-04-10 Diego Novillo <dnovillo@google.com>
  826. http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
  827. * optimize.c (maybe_clone_body): Re-enable call to
  828. clone_body.
  829. * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
  830. code with call to gimple_unreachable.
  831. (cp_genericize): Fix handling of clone bodies.
  832. 2008-04-04 Diego Novillo <dnovillo@google.com>
  833. http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
  834. * optimize.c (maybe_clone_body): Re-enable.
  835. 2008-02-19 Diego Novillo <dnovillo@google.com>
  836. Oleg Ryjkov <olegr@google.com>
  837. http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
  838. * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
  839. argument to gimple_seq *. Update all users.
  840. (gimplify_must_not_throw_expr): Likewise.
  841. 2008-02-04 Oleg Ryjkov <olegr@google.com>
  842. * except.c: Include gimple.h
  843. (cp_protect_cleanup_actions): Convert to tuples.
  844. * Make-lang.in (cp/except.o): Add dependency on gimple.h
  845. 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
  846. * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
  847. instead of annotating each block manually.
  848. 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
  849. * cp-gimplify.c (gimplify_cp_loop): Tuplify.
  850. (gimplify_for_stmt): Same.
  851. (gimplify_switch_stmt): Same.
  852. (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
  853. GS_OK.
  854. [WHILE_STMT]: Return GS_OK.
  855. [SWITCH_STMT]: Same.
  856. [CONTINUE_STMT]: Same.
  857. [BREAK_STMT]: Same.
  858. (cp_genericize): Set gimple_body() of cloned functions when needed.
  859. 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
  860. * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
  861. (cp_gimplify_init_expr): Convert to tuples.
  862. (gimplify_must_not_throw_expr): Make function return a
  863. gimplify_status and convert to tuples.
  864. 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
  865. * cp-gimplify.c (genericize_try_block): Enable and do not call
  866. gimplify_stmt.
  867. (genericize_catch_block): Same.
  868. (genericize_eh_spec_block): Same.
  869. Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
  870. (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
  871. 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
  872. * optimize.c (maybe_clone_body): Comment out call to clone_body.
  873. * decl.c (finish_function): Use gimple_body instead of
  874. DECL_SAVED_TREE.
  875. * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
  876. * cp-gimplify.c (genericize_try_block): Comment out.
  877. (genericize_catch_block): Same.
  878. (genericize_eh_spec_block): Same.
  879. (gimplify_cp_loop): Comment out calls to gimplify_stmt.
  880. (gimplify_for_stmt): Comment out.
  881. (gimplify_switch_stmt): Comment out call to gimplify_stmt.
  882. (cp_gimplify_omp_for): Same.
  883. (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
  884. Comment out call to gimplify_stmt and append_to_statement_list.
  885. Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
  886. (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
  887. (cp_gimplify_expr): Same.
  888. Comment out calls to genericize_*_block. Comment out call to
  889. gimplify_for_stmt.
  890. 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
  891. PR c++/36944
  892. * class.c (type_has_user_provided_default_constructor): Handle
  893. default parameters.
  894. 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
  895. * decl.c (push_library_fn): Add a parameter for the exceptions that
  896. the function may throw.
  897. (push_void_library_fn, push_throw_library_fn, expand_static_init):
  898. Adjust.
  899. (build_library_fn): Change to static.
  900. * cp-tree.h: Adjust declarations.
  901. * except.c (declare_nothrow_library_fn): New.
  902. (do_get_exception_ptr, do_begin_catch, do_free_exception,
  903. do_allocate_exception): Use the latter, adjust the declarations
  904. (ie, add empty exception-specification), consistently with the
  905. actual implementation in libsupc++.
  906. 2008-07-25 Jan Hubicka <jh@suse.cz>
  907. * typeck.c (inline_conversion): Remove.
  908. (cp_build_function_call): Do not use inline_conversion.
  909. * decl.c (duplicate_decls): Do not insist on inline being declared
  910. early.
  911. (start_cleanup_fn): Do not assume that INLINE flags prevent function
  912. from being output. We now remove static functions always.
  913. (finish_function): Do return warning on all static functions.
  914. * call.c (build_over_call): Do not use inline_conversion.
  915. * cp-tree.h (possibly_inlined_p): Declare.
  916. (inline_conversion): Remove.
  917. * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
  918. * decl2.c (cp_write_global_declarations): Likewise.
  919. (mark_used): Likewise.
  920. (possibly_inlined_p): New functions.
  921. 2008-07-25 Jason Merrill <jason@redhat.com>
  922. * class.c (type_has_user_provided_default_constructor): Handle
  923. templates.
  924. 2008-07-23 Jan Hubicka <jh@suse.cz>
  925. * decl.c (duplicate_decls): Update comment and unit-at-a-time.
  926. (grogfndecl): Drop flag_inline_trees code.
  927. * pt.c (instantiate_decl): Drop flag_iline_trees code.
  928. * lex.c (cxx_init): Do not set unit-at-a-time.
  929. 2008-07-23 Jason Merrill <jason@redhat.com>
  930. * mangle.c (write_unqualified_name): Avoid infinite recursion when
  931. trying to mangle a decl with no name.
  932. Implement defaulted/deleted functions as per N2346
  933. * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
  934. (DECL_DELETED_FN): New macro.
  935. (DECL_DEFAULTED_FN): New macro.
  936. * class.c (user_provided_p): New fn.
  937. (defaultable_fn_p): New fn.
  938. (type_has_user_provided_constructor): New fn.
  939. (type_has_user_provided_default_constructor): New fn.
  940. (check_methods): A defaulted fn is still trivial.
  941. (check_bases_and_members): Likewise.
  942. * decl.c (grok_special_member_properties): Likewise.
  943. (duplicate_decls): Complain about redeclaring a function as deleted.
  944. (start_decl): initialized==2 means deleted.
  945. (cp_finish_decl): Handle deleted/defaulted semantics.
  946. * decl2.c (grokfield): Likewise.
  947. (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
  948. Complain about using a deleted fn.
  949. * init.c (build_value_init_1): Use type_has_user_provided_constructor.
  950. (perform_member_init): Check for a user-provided default constructor
  951. even if TYPE_NEEDS_CONSTRUCTING.
  952. (build_new_1): Likewise.
  953. * call.c (build_over_call): Don't call mark_used twice.
  954. * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
  955. * search.c (check_final_overrider): Check for deleted mismatch.
  956. * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
  957. (cp_parser_pure_specifier): Handle =default and =delete.
  958. * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
  959. 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  960. PR 35058
  961. * typeck.c: All calls to pedwarn changed.
  962. * decl.c: All calls to pedwarn changed.
  963. * call.c: All calls to pedwarn changed.
  964. * error.c: All calls to pedwarn changed.
  965. * typeck2.c: All calls to pedwarn changed.
  966. * pt.c: All calls to pedwarn changed.
  967. * name-lookup.c: All calls to pedwarn changed.
  968. * parser.c: All calls to pedwarn changed.
  969. 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  970. * call.c: Fix comment typos.
  971. * class.c: Likewise.
  972. * cp-tree.h: Likewise.
  973. * cxx-pretty-print.c: Likewise.
  974. * decl.c: Likewise.
  975. * init.c: Likewise.
  976. * name-lookup.c: Likewise.
  977. * operators.def: Likewise.
  978. * parser.c: Likewise.
  979. * pt.c: Likewise.
  980. * tree.c: Likewise.
  981. * typeck.c: Likewise.
  982. 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
  983. PR c++/36871
  984. PR c++/36872
  985. * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
  986. copy constructors and copy assignment operators proper.
  987. 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
  988. * parser.c (cp_token): Remove in_system_header.
  989. (eof_token): Remove in_system_header.
  990. (cp_lexer_get_preprocessor_token): Don't set in_system_header.
  991. (cp_lexer_set_source_position_from_token): Don't set in_system_header.
  992. (cp_parser_member_declaration): Use in_system_header_at.
  993. * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
  994. (pop_tinst_level): Don't set in_system_header.
  995. (instantiate_class_template): Don't set in_system_header.
  996. (instantiate_decl): Don't set in_system_header.
  997. (instantiate_pending_templates): Don't set in_system_header.
  998. 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
  999. PR c++/36870
  1000. * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
  1001. TYPE_NOTHROW_P, not TREE_NOTHROW.
  1002. (trait_expr_value): Likewise.
  1003. 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
  1004. PR c++/36407
  1005. * call.c (convert_like_real): Don't take the error code path
  1006. when a rvalue or base conversion has the bad_p field set.
  1007. 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
  1008. * rtti.c (emit_support_tinfos): Add char16_type_node and
  1009. char32_type_node.
  1010. * typeck2.c (digest_init): Support char16_t and char32_t.
  1011. 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
  1012. * cvt.c (convert_to_void): Avoid C++ keywords.
  1013. * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
  1014. Likewise.
  1015. * friend.c (is_friend): Likewise.
  1016. * init.c (perform_member_init): Likewise.
  1017. * mangle.c (write_template_prefix, write_template_template_param):
  1018. Likewise.
  1019. * name-lookup.c (do_namespace_alias, do_using_directive,
  1020. parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
  1021. * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
  1022. cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
  1023. Likewise.
  1024. * pt.c (is_specialization_of_friend, lookup_template_class,
  1025. push_tinst_level, instantiate_class_template,
  1026. tsubst_copy_and_build): Likewise.
  1027. * tree.c (add_stmt_to_compound): Likewise.
  1028. * typeck.c (finish_class_member_access_expr): Likewise.
  1029. 2008-07-17 Julian Brown <julian@codesourcery.com>
  1030. Mark Mitchell <mark@codesourcery.com>
  1031. * decl2.c (determine_visibility): Allow target to override
  1032. visibility of class data.
  1033. 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
  1034. PR c++/36855
  1035. * semantics.c (trait_expr_value): Update __has_trivial_destructor
  1036. semantics to the current WP (N2691).
  1037. 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
  1038. PR c++/13699
  1039. * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
  1040. (pushdecl_maybe_friend): Check if a redeclaration of extern C function
  1041. complies with exception specification constraints.
  1042. 2008-07-14 Jason Merrill <jason@redhat.com>
  1043. * lex.c (init_reswords): Always set D_OBJC.
  1044. 2008-07-11 Tom Tromey <tromey@redhat.com>
  1045. Ian Lance Taylor <iant@google.com>
  1046. * lex.c (struct resword, reswords): Don't define.
  1047. (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
  1048. (init_reswords): Clarify mask code. Use c_common_reswords rather
  1049. than reswords.
  1050. 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
  1051. PR c++/13101
  1052. * decl.c (grokdeclarator): Warn about initializing variables
  1053. of storage class 'extern' only after the type of the declarator
  1054. has been properly computed.
  1055. 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
  1056. PR c++/31754
  1057. * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
  1058. carries the location of the primary type.
  1059. * parser.c (cp_parser_check_type_definition): Update documentation.
  1060. (cp_parser_check_for_definition_in_return_type,
  1061. cp_parser_check_for_invalid_template_id,
  1062. cp_parser_set_decl_spec_type,
  1063. cp_parser_check_for_definition_in_return_type,
  1064. cp_parser_diagnose_invalid_type_name,
  1065. cp_parser_new_expression, cp_parser_explicit_instantiation,
  1066. cp_parser_type_specifier, cp_parser_simple_type_specifier,
  1067. cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
  1068. messages.
  1069. 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
  1070. PR c++/31754
  1071. * pt.c, semantic.c:
  1072. * semantic.c (qualified_name_lookup_error, finish_id_expression):
  1073. Add a location_t parameter so that
  1074. error message can have a more accurate location.
  1075. * cp-tree.h: Updated prototype
  1076. * pt.c (tsubst_qualified_id): Use location in error messages.
  1077. * parser.c (cp_parser_postfix_expression,
  1078. cp_parser_objc_statement, cp_parser_trait_expr,
  1079. cp_parser_token_is_class_key,
  1080. cp_parser_uncommitted_to_tentative_parse_p,
  1081. cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
  1082. cp_parser_error, cp_parser_name_lookup_error,
  1083. cp_parser_simulate_error, cp_parser_check_decl_spec,
  1084. cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
  1085. cp_parser_diagnose_invalid_type_name,
  1086. cp_parser_parse_and_diagnose_invalid_type_name,
  1087. cp_parser_require_pragma_eol, cp_parser_make_typename_type,
  1088. cp_parser_string_literal, cp_parser_primary_expression,
  1089. cp_parser_primary_expression, cp_parser_unqualified_id,
  1090. cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
  1091. cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
  1092. cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
  1093. cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
  1094. cp_parser_jump_statement, cp_parser_block_declaration,
  1095. cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
  1096. cp_parser_function_specifier_opt, cp_parser_decltype,
  1097. cp_parser_mem_initializer_list, cp_parser_mem_initializer,
  1098. cp_parser_mem_initializer_id, cp_parser_template_parameter,
  1099. cp_parser_type_parameter, cp_parser_template_id,
  1100. cp_parser_template_name, cp_parser_template_argument): Likewise.
  1101. 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
  1102. PR c++/36760
  1103. * pt.c (tsubst_function_type): Remove warning for type qualifiers
  1104. on function return type.
  1105. 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
  1106. PR c++/36760
  1107. * pt.c (tsubst_function_type): Don't warn for type qualifiers
  1108. on function return type in case of system header.
  1109. 2008-07-09 Raksit Ashok <raksit@google.com>
  1110. * parser.c (cp_parser_postfix_expression): New warning based on flag
  1111. warn_disallowed_functions.
  1112. 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
  1113. PR c++/34963
  1114. * decl.c (grokdeclarator): Reset storage_class and staticp for friend
  1115. functions declared with a storage class qualifier.
  1116. 2008-07-03 Richard Guenther <rguenther@suse.de>
  1117. PR c++/36128
  1118. * typeck.c (cp_build_function_call): Move code to verify
  1119. builtin function arguments ...
  1120. * call.c (build_cxx_call): ... here.
  1121. 2008-07-02 Jason Merrill <jason@redhat.com>
  1122. * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
  1123. Implement WG21 N2672, Initializer List proposed wording
  1124. * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
  1125. (struct lang_type_class): Add has_list_ctor bitfield.
  1126. (TYPE_HAS_LIST_CTOR): New macro.
  1127. (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
  1128. (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
  1129. (LOOKUP_NO_NARROWING): New macro.
  1130. (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
  1131. * parser.c (cp_parse_braced_list): Split out from...
  1132. (cp_parser_initializer_clause): ...here.
  1133. (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
  1134. literal here.
  1135. (cp_lexer_next_token_is_not_keyword): New fn.
  1136. (cp_parser_parenthesized_expression_list): Handle { }.
  1137. (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
  1138. (cp_parser_assignment_expression, cp_parser_condition): Likewise.
  1139. (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
  1140. (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
  1141. (cp_parser_initializer, cp_parser_functional_cast): Likewise.
  1142. (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
  1143. (cp_parser_save_member_function_body): Likewise.
  1144. * call.c (conversion_kind): Add ck_list, ck_aggr.
  1145. (struct conversion): Add check_narrowing bitfield, conversion list.
  1146. (build_list_conv): New fn.
  1147. (build_aggr_conv): New fn.
  1148. (implicit_conversion): Call them.
  1149. (standard_conversion): Set check_narrowing if appropriate.
  1150. (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
  1151. (build_user_type_conversion_1): When converting from an init list,
  1152. we allow additional conversions except when calling a copy ctor.
  1153. (convert_like_real): Calling an explicit ctor for an init list is
  1154. ill-formed. Handle ck_list and ck_addr. Check narrowing.
  1155. (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
  1156. class doesn't have a list ctor, break the {} into a TREE_LIST.
  1157. (compare_ics): ck_list is better than other UDCs.
  1158. (set_up_extended_ref_temp): Split out from initialize_reference.
  1159. (is_std_init_list): New fn.
  1160. (is_list_ctor): New fn.
  1161. * decl.c (cxx_init_decl_processing): Create init_list_type_node.
  1162. (reshape_init_array_1): Pass it to build_constructor.
  1163. (reshape_init_class): Ditto.
  1164. (initialize_artificial_var): Pass the appropriate type.
  1165. (build_aggr_init_full_exprs): Split out from...
  1166. (check_initializer): ...here. Handle new semantics.
  1167. (build_init_list_var_init): New subroutine of check_initializer.
  1168. (grokdeclarator): Converting constructors can have more than one parm.
  1169. (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
  1170. * init.c (expand_default_init): Only do digest_init for aggregates.
  1171. * rtti.c (tinfo_base_init): Pass init_list_type_node to
  1172. build_constructor_from_list.
  1173. (generic_initializer, ptr_initializer): Ditto.
  1174. (ptm_initializer, class_initializer): Ditto.
  1175. (get_pseudo_ti_init): Ditto.
  1176. * error.c (dump_type): Handle init_list_type_node.
  1177. (maybe_warn_cpp0x): New fn.
  1178. (maybe_varn_variadic_templates): Call it.
  1179. * cvt.c (ocp_convert): Handle conversion from { }.
  1180. * tree.c (build_array_of_n_type): New fn.
  1181. * typeck2.c (store_init_value): Use init_list_type_node.
  1182. (digest_init): Likewise.
  1183. (check_narrowing): New fn.
  1184. * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
  1185. of vector of constructor elts. Handle non-aggregate types. Make
  1186. constant literals static.
  1187. * pt.c: (tsubst_copy_and_build): Adjust.
  1188. (unify): Handle { }.
  1189. * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
  1190. 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
  1191. * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
  1192. (comp_ptr_ttypes_const): Likewise.
  1193. 2008-07-01 Andrew Haley <aph@redhat.com>
  1194. * decl.c (finish_constructor_body): Don't set the return value of
  1195. the constructor if the constructor is that of a Java type.
  1196. 2008-06-30 Jakub Jelinek <jakub@redhat.com>
  1197. PR c++/36662
  1198. * decl2.c (is_late_template_attribute): If the first attribute
  1199. argument is IDENTIFIER_NODE, don't consider it when checking
  1200. if arguments are value or type dependent.
  1201. 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
  1202. PR c++/36655
  1203. * pt.c (do_type_instantiation): In c++0x mode do not warn for
  1204. extern template.
  1205. 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1206. * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
  1207. 2008-06-28 Jakub Jelinek <jakub@redhat.com>
  1208. PR c++/36364
  1209. * repo.c (repo_emit_p): Put const static data members initialized
  1210. by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
  1211. for it is 0.
  1212. 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
  1213. PR c++/36655
  1214. * pt.c (do_decl_instantiation): In c++0x mode do not warn for
  1215. extern template.
  1216. 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
  1217. PR c++/23194
  1218. * typeck.c (cp_build_function_call): Show example syntax in
  1219. diagnostic.
  1220. 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
  1221. * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
  1222. cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
  1223. pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
  1224. build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
  1225. pedwarn to permerror.
  1226. * init.c (perform_member_init, build_new_1, build_new): Likewise.
  1227. * decl.c (warn_extern_redeclared_static, duplicate_decls,
  1228. * identify_goto, check_previous_goto_1, check_goto, define_label,
  1229. check_tag_decl, start_decl, check_class_member_definition_namespace,
  1230. grokfndecl, grokdeclarator): Likewise.
  1231. * except.c (check_handlers): Likewise.
  1232. * typeck2.c (digest_init): Likewise.
  1233. * pt.c (check_specialization_namespace,
  1234. check_explicit_instantiation_namespace,
  1235. maybe_process_partial_specialization, check_explicit_specialization,
  1236. convert_template_argument, do_decl_instantiation,
  1237. do_type_instantiation, instantiate_decl): Likewise.
  1238. * semantics.c (finish_template_type_parm): Likewise.
  1239. * name-lookup.c (pushdecl_maybe_friend,
  1240. check_for_out_of_scope_variable): Likewise.
  1241. * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
  1242. coerce_new_type): Likewise.
  1243. * parser.c (cp_parser_nested_name_specifier_opt,
  1244. cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
  1245. cp_parser_class_head, cp_parser_check_class_key): Likewise.
  1246. (cp_parser_parameter_declaration): Check flag_permissive instead of
  1247. flag_pedantic_errors.
  1248. * call.c (joust): Change pedwarn to warning.
  1249. * friend.c (make_friend_class): Likewise.
  1250. 2008-06-16 Jan Hubicka <jh@suse.cz>
  1251. * method.c: Include cgraph.h.
  1252. (use_thunk): Use cgraph_add_new_function instead of calling backend
  1253. directly.
  1254. 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  1255. * parser.c: Fix comment typo.
  1256. 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
  1257. PR c++/35320
  1258. * decl2.c (grokbitfield): Receive the list of attributes, pass it to
  1259. grokdeclarator and apply it to the created declaration.
  1260. * cp-tree.h (grokbitfield): Update prototype.
  1261. * parser.c (cp_parser_member_declaration): Don't apply the attributes
  1262. since they are now applied in grokbitfield. Adjusted the call to
  1263. grokbitfield.
  1264. (cp_parser_objc_class_ivars): Likewise.
  1265. 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
  1266. PR c++/35317
  1267. * class.c (type_requires_array_cookie): Do not consider delete[]
  1268. operators with an ellipsis as second argument.
  1269. 2008-06-09 Jakub Jelinek <jakub@redhat.com>
  1270. PR c++/36408
  1271. * semantics.c (stmt_expr_value_expr): Don't crash on empty
  1272. STATEMENT_LIST.
  1273. 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
  1274. PR c++/35242
  1275. * pt.c (maybe_process_partial_specialization): Check the tree
  1276. returned by push_template_decl for error_mark_node.
  1277. * parser.c (cp_parser_class_head): Likewise, check the tree
  1278. returned by the latter.
  1279. 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
  1280. PR c++/35327
  1281. * decl.c (grokdeclarator): In case of wrong return type return
  1282. immediately error_mark_node.
  1283. 2008-06-06 Jakub Jelinek <jakub@redhat.com>
  1284. * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
  1285. dependent_omp_for_p, begin_omp_task, finish_omp_task,
  1286. finish_omp_taskwait): New prototypes.
  1287. (cxx_omp_clause_default_ctor): Add outer argument.
  1288. (finish_omp_for): Add new clauses argument.
  1289. * cp-gimplify.c (cxx_omp_finish_clause): New function.
  1290. (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
  1291. (cxx_omp_clause_default_ctor): Add outer argument.
  1292. (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
  1293. * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
  1294. * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
  1295. Add par_clauses argument. If decl is present in parallel's
  1296. lastprivate clause, change that clause to shared and add
  1297. a lastprivate clause for decl to OMP_FOR_CLAUSES.
  1298. Fix wording of error messages. Adjust finish_omp_for caller.
  1299. Add clauses argument. Parse loops with random access iterators.
  1300. (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
  1301. functions.
  1302. (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
  1303. cp_parser_omp_for_loop callers.
  1304. (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
  1305. functions.
  1306. (cp_parser_omp_clause_name): Handle collapse and untied
  1307. clauses.
  1308. (cp_parser_omp_clause_schedule): Handle auto schedule.
  1309. (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
  1310. and PRAGMA_OMP_CLAUSE_UNTIED.
  1311. (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
  1312. (OMP_TASK_CLAUSE_MASK): Define.
  1313. (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
  1314. (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
  1315. (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
  1316. PRAGMA_OMP_TASKWAIT.
  1317. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
  1318. OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
  1319. (tsubst_omp_for_iterator): New function.
  1320. (dependent_omp_for_p): New function.
  1321. (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
  1322. loops. Adjust finish_omp_for caller. Handle loops with random
  1323. access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
  1324. (tsubst_expr): Handle OMP_TASK.
  1325. * semantics.c (cxx_omp_create_clause_info): New function.
  1326. (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
  1327. OMP_CLAUSE_COLLAPSE.
  1328. (cxx_omp_predetermined_sharing): Removed.
  1329. * semantics.c (finish_omp_for): Allow pointer iterators. Use
  1330. handle_omp_for_class_iterator and dependent_omp_for_p. Handle
  1331. collapsed for loops. Adjust c_finish_omp_for caller. Add new
  1332. clauses argument. Fix check for type dependent cond or incr.
  1333. Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
  1334. fold_convert to convert incr amount to difference_type. Only
  1335. fold if not in template. If decl is mentioned in lastprivate
  1336. clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
  1337. access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
  1338. changes.
  1339. (finish_omp_threadprivate): Allow static class members of the
  1340. current class.
  1341. (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
  1342. finish_omp_taskwait): New functions.
  1343. * parser.c (cp_parser_binary_expression): Add prec argument.
  1344. (cp_parser_assignment_expression): Adjust caller.
  1345. * cp-tree.h (outer_curly_brace_block): New prototype.
  1346. * decl.c (outer_curly_brace_block): No longer static.
  1347. 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
  1348. PR c++/36404
  1349. * pt.c (push_template_decl_real): Consistently return error_mark_node
  1350. on error.
  1351. 2008-06-02 Tomas Bily <tbily@suse.cz>
  1352. * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
  1353. (cp_build_unary_op): Likewise.
  1354. (cp_build_indirect_ref): Use CONVERT_EXPR_P.
  1355. (maybe_warn_about_returning_address_of_local): Likewise.
  1356. 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
  1357. PR c++/35243
  1358. * pt.c (tsubst_initializer_list): Consistently check the tree
  1359. returned by tsubst_pack_expansion for error_mark_node.
  1360. 2008-05-27 Michael Matz <matz@suse.de>
  1361. PR c++/27975
  1362. * call.c (build_new_op): Make warning conditional on
  1363. OPT_Wenum_compare.
  1364. 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
  1365. PR c++/35909
  1366. * call.c (convert_like_real): Convert bitfield to desired type
  1367. before creating temporary.
  1368. 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
  1369. * Makefile.in: Adjusted dependencies on c-incpath.o.
  1370. 2008-05-23 Jakub Jelinek <jakub@redhat.com>
  1371. PR c++/36237
  1372. * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
  1373. fold_build_cleanup_point_expr on build_call_a results.
  1374. PR c++/36308
  1375. * semantics.c (omp_clause_info_fndecl): New function.
  1376. (finish_omp_clauses): Use it.
  1377. 2008-05-21 Jakub Jelinek <jakub@redhat.com>
  1378. PR c++/36023
  1379. * cp-tree.h (check_array_initializer): New prototype.
  1380. * decl.c (check_array_initializer): New function.
  1381. (check_initializer): Call it.
  1382. * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
  1383. 2008-05-21 Tom Tromey <tromey@redhat.com>
  1384. * mangle.c (save_partially_mangled_name): Remove.
  1385. (restore_partially_mangled_name): Likewise.
  1386. (write_encoding): Update.
  1387. (write_unqualified_name): Likewise.
  1388. (start_mangling): Always use name_obstack. Remove 'ident_p'
  1389. argument.
  1390. (get_identifier_nocopy): Remove.
  1391. (finish_mangling_internal): Rename from finish_mangling.
  1392. (finish_mangling): New function.
  1393. (finish_mangling_get_identifier): Likewise.
  1394. (partially_mangled_name, partially_mangled_name_len): Remove.
  1395. (mangle_decl_string): Change return type. Update.
  1396. (mangle_decl, mangle_type_string, mangle_special_for_type,
  1397. mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
  1398. mangle_ref_init_variable): Update.
  1399. 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
  1400. PR c++/35331
  1401. * semantics.c (begin_class_definition): Extend checks on the first
  1402. argument.
  1403. 2008-05-12 Tomas Bily <tbily@suse.cz>
  1404. * typeck2.c (digest_init): Use CONVERT_EXPR_P.
  1405. * call.c (build_over_call): Likewise.
  1406. * error.c (dump_expr): Use CASE_CONVERT.
  1407. * class.c (fixed_type_or_null): Likewise.
  1408. 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
  1409. * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
  1410. in error message.
  1411. (cp_parser_omp_clause_schedule): Remove superfluous "expected"
  1412. in error message.
  1413. 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
  1414. * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
  1415. DECL_LOOPING_CONST_OR_PURE_P attributes.
  1416. * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
  1417. DECL_PURE_P.
  1418. 2008-05-02 Simon Baldwin <simonb@google.com>
  1419. PR bootstrap/36108
  1420. * typeck.c (build_array_ref): Remove warn_array_subscript_range.
  1421. 2008-05-01 Simon Baldwin <simonb@google.com>
  1422. * typeck.c (build_array_ref): Call warn_array_subscript_range.
  1423. 2008-04-30 Jakub Jelinek <jakub@redhat.com>
  1424. PR c++/35986
  1425. * pt.c (more_specialized_fn): Stop the loop even if there are no
  1426. arguments before ellipsis.
  1427. 2008-04-29 Jakub Jelinek <jakub@redhat.com>
  1428. PR c++/35650
  1429. * parser.c (cp_parser_lookup_name): Look through single function
  1430. OVERLOAD.
  1431. PR c++/35987
  1432. * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
  1433. COMPOUND_EXPR if the second argument would be error_mark_node.
  1434. 2008-04-28 Jason Merrill <jason@redhat.com>
  1435. Liu Guanwei <liu_gw@163.com>
  1436. PR c++/57
  1437. * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
  1438. in default arguments.
  1439. 2008-04-25 Jan Hubicka <jh@suse.cz>
  1440. * typeck.c (check_return_expr): Update.
  1441. * decl.c (start_preparsed_function): Update.
  1442. * method.c (use_thunk): Update.
  1443. 2008-04-24 Jakub Jelinek <jakub@redhat.com>
  1444. PR c++/35758
  1445. * cp-tree.h (cp_reconstruct_complex_type): New prototype.
  1446. * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
  1447. * decl2.c (is_late_template_attribute): Only make vector_size
  1448. late tmpl attribute if argument is type or value dependent.
  1449. (cp_reconstruct_complex_type): New function.
  1450. 2008-04-24 Richard Guenther <rguenther@suse.de>
  1451. * typeck.c (cp_build_function_call): Call
  1452. check_builtin_function_arguments.
  1453. 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
  1454. * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
  1455. (build_ptrmemfunc1): Don't set TREE_INVARIANT.
  1456. * init.c (build_zero_init): Don't set TREE_INVARIANT.
  1457. * class.c (build_base_path): Don't set TREE_INVARIANT.
  1458. (build_vtbl_ref_1): Don't set TREE_INVARIANT.
  1459. (build_vtbl_initializer): Don't set TREE_INVARIANT.
  1460. * decl.c (build_enumerator): Don't set TREE_INVARIANT.
  1461. * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
  1462. (generic_initializer): Don't set TREE_INVARIANT.
  1463. (ptr_initializer): Don't set TREE_INVARIANT.
  1464. (ptm_initializer): Don't set TREE_INVARIANT.
  1465. (class_initializer): Don't set TREE_INVARIANT.
  1466. * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
  1467. * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
  1468. (build_template_parm_index): Don't set TREE_INVARIANT.
  1469. (reduce_template_parm_level): Don't set TREE_INVARIANT.
  1470. (process_template_parm): Don't set TREE_INVARIANT.
  1471. 2008-04-22 Jason Merrill <jason@redhat.com>
  1472. PR c++/35316
  1473. * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
  1474. to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
  1475. * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
  1476. 2008-04-22 Jakub Jelinek <jakub@redhat.com>
  1477. PR c++/35747
  1478. * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
  1479. expression is errorneous.
  1480. 2008-04-21 Jason Merrill <jason@redhat.com>
  1481. PR c++/35325
  1482. * tree.c (cp_tree_equal): Handle FIXED_CST.
  1483. PR c++/35678
  1484. * pt.c (template_template_parm_bindings_ok_p): Set
  1485. processing_template_decl while in this function.
  1486. 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
  1487. * cvt.c (type_promotes_to): Support char16_t and char32_t.
  1488. * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
  1489. char16_t and char32_t.
  1490. * lex.c (reswords): Add char16_t and char32_t (for c++0x).
  1491. * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
  1492. extended builtin type "u8char{16,32}_t".
  1493. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
  1494. RID_CHAR{16,32}.
  1495. (cp_lexer_print_token): Support CPP_STRING{16,32}.
  1496. (cp_parser_is_string_literal): Idem.
  1497. (cp_parser_string_literal): Idem.
  1498. (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
  1499. CPP_STRING{16,32}.
  1500. (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
  1501. * tree.c (char_type_p): Support char16_t and char32_t as char types.
  1502. * typeck.c (string_conv_p): Support char16_t and char32_t.
  1503. 2008-04-17 Jason Merrill <jason@redhat.com>
  1504. PR c++/35773
  1505. * call.c (build_user_type_conversion_1): Represent second step of
  1506. copy-init with an rvalue conversion.
  1507. (convert_like_real) [ck_user]: Don't implicitly add it here.
  1508. 2008-04-15 Jakub Jelinek <jakub@redhat.com>
  1509. PR c/35751
  1510. * decl.c (layout_var_decl): If extern or static var has variable
  1511. size, set TREE_TYPE (decl) to error_mark_node.
  1512. 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
  1513. PR target/35921
  1514. * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
  1515. to clone.
  1516. 2008-04-09 Jason Merrill <jason@redhat.com>
  1517. PR c++/35708
  1518. * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
  1519. not a pushed variable.
  1520. 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
  1521. * call.c (build_op_delete_call): Fix quotation in warning message.
  1522. * decl.c (grokdeclarator): Quote keyword in error message.
  1523. * pt.c (check_for_bare_parameter_packs): Fix quotation in error
  1524. message.
  1525. * parser.c (cp_parser_check_type_definition): Print error string
  1526. directly rather than using "%s".
  1527. (cp_parser_postfix_expression): Fix quotation.
  1528. (cp_parser_decltype): Likewise.
  1529. (cp_parser_sizeof_operand): Fix quotation. Simplify.
  1530. * parser.c (cp_parser_non_integral_constant_expression): Build error
  1531. message with CONCAT rather than using "%s".
  1532. (cp_parser_primary_expression): Fix quotation.
  1533. (cp_parser_postfix_expression): Likewise.
  1534. (cp_parser_postfix_dot_deref_expression): Likewise.
  1535. (cp_parser_unary_expression): Likewise.
  1536. (cp_parser_new_expression): Likewise.
  1537. (cp_parser_delete_expression): Likewise.
  1538. * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
  1539. as `)', not as `('. Fix quotation.
  1540. (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
  1541. (cp_parser_primary_expression): Likewise.
  1542. (cp_parser_nested_name_specifier_opt): Likewise.
  1543. (cp_parser_postfix_expression): Likewise.
  1544. (cp_parser_postfix_open_square_expression): Likewise.
  1545. (cp_parser_parenthesized_expression_list): Likewise.
  1546. (cp_parser_pseudo_destructor_name): Likewise.
  1547. (cp_parser_new_expression): Likewise.
  1548. (cp_parser_direct_new_declarator): Likewise.
  1549. (cp_parser_delete_expression): Likewise.
  1550. (cp_parser_cast_expression): Likewise.
  1551. (cp_parser_question_colon_clause): Likewise.
  1552. (cp_parser_builtin_offsetof): Likewise.
  1553. (cp_parser_trait_expr): Likewise.
  1554. (cp_parser_label_for_labeled_statement): Likewise.
  1555. (cp_parser_compound_statement): Likewise.
  1556. (cp_parser_selection_statement): Likewise.
  1557. (cp_parser_condition): Likewise.
  1558. (cp_parser_iteration_statement): Likewise.
  1559. (cp_parser_already_scoped_statement): Likewise.
  1560. (cp_parser_simple_declaration): Likewise.
  1561. (cp_parser_linkage_specification): Likewise.
  1562. (cp_parser_static_assert): Likewise.
  1563. (cp_parser_decltype): Likewise.
  1564. (cp_parser_conversion_function_id): Likewise.
  1565. (cp_parser_operator_function_id): Likewise.
  1566. (cp_parser_operator): Likewise.
  1567. (cp_parser_type_parameter): Likewise.
  1568. (cp_parser_template_id): Likewise.
  1569. (cp_parser_explicit_instantiation): Likewise.
  1570. (cp_parser_explicit_specialization): Likewise.
  1571. (cp_parser_enum_specifier): Likewise.
  1572. (cp_parser_namespace_definition): Likewise.
  1573. (cp_parser_namespace_alias_definition): Likewise.
  1574. (cp_parser_using_declaration): Likewise.
  1575. (cp_parser_using_directive): Likewise.
  1576. (cp_parser_asm_definition): Likewise.
  1577. (cp_parser_direct_declarator): Likewise.
  1578. (cp_parser_ptr_operator): Likewise.
  1579. (cp_parser_parameter_declaration_clause): Likewise.
  1580. (cp_parser_initializer_clause): Likewise.
  1581. (cp_parser_class_specifier): Likewise.
  1582. (cp_parser_member_specification_opt): Likewise.
  1583. (cp_parser_member_declaration): Likewise.
  1584. (cp_parser_pure_specifier): Likewise.
  1585. (cp_parser_constant_initializer): Likewise.
  1586. (cp_parser_base_clause): Likewise.
  1587. (cp_parser_exception_specification_opt): Likewise.
  1588. (cp_parser_try_block): Likewise.
  1589. (cp_parser_function_try_block): Likewise.
  1590. (cp_parser_handler): Likewise.
  1591. (cp_parser_throw_expression): Likewise.
  1592. (cp_parser_asm_operand_list): Likewise.
  1593. (cp_parser_attributes_opt): Likewise.
  1594. (cp_parser_label_declaration): Likewise.
  1595. (cp_parser_constructor_declarator_p): Likewise.
  1596. (cp_parser_template_declaration_after_export): Likewise.
  1597. (cp_parser_single_declaration): Likewise.
  1598. (cp_parser_objc_message_expression): Likewise.
  1599. (cp_parser_objc_message_args): Likewise.
  1600. (cp_parser_objc_encode_expression): Likewise.
  1601. (cp_parser_objc_defs_expression): Likewise.
  1602. (cp_parser_objc_protocol_expression): Likewise.
  1603. (cp_parser_objc_selector_expression): Likewise.
  1604. (cp_parser_objc_protocol_refs_opt): Likewise.
  1605. (cp_parser_objc_typename): Likewise.
  1606. (cp_parser_objc_method_keyword_params): Likewise.
  1607. (cp_parser_objc_superclass_or_category): Likewise.
  1608. (cp_parser_objc_try_catch_finally_statement): Likewise.
  1609. (cp_parser_objc_synchronized_statement): Likewise.
  1610. (cp_parser_objc_throw_statement): Likewise.
  1611. (cp_parser_omp_var_list_no_open): Likewise.
  1612. (cp_parser_omp_clause_default): Likewise.
  1613. (cp_parser_omp_clause_if): Likewise.
  1614. (cp_parser_omp_clause_num_threads): Likewise.
  1615. (cp_parser_omp_clause_reduction): Likewise.
  1616. (cp_parser_omp_clause_schedule): Likewise.
  1617. (cp_parser_omp_critical): Likewise.
  1618. (cp_parser_omp_for_loop): Likewise.
  1619. (cp_parser_omp_sections_scope): Likewise.
  1620. * parser.c (cp_parser_template_parameter_list): Simplify.
  1621. 2008-04-07 James E. Wilson <wilson@tuliptree.org>
  1622. * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
  1623. 2008-04-07 Jason Merrill <jason@redhat.com>
  1624. PR c++/35734
  1625. * class.c (type_has_user_nondefault_constructor): A template
  1626. counts as a nondefault constructor.
  1627. 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
  1628. * decl.c (cxx_push_function_context): Delete.
  1629. (cxx_pop_function_context): Delete.
  1630. (start_preparsed_function): Merge cxx_push_function_context (!f->decl
  1631. code only).
  1632. * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
  1633. LANG_HOOKS_FUNCTION_FINAL): Delete.
  1634. (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
  1635. LANG_HOOKS_MISSING_NORETURN_OK_P.
  1636. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
  1637. Delete prototype.
  1638. * semantics.c (current_stmt_tree): Fix comment.
  1639. 2008-04-03 Jakub Jelinek <jakub@redhat.com>
  1640. PR c++/35741
  1641. * semantics.c (finish_offsetof): Undo effect of convert_from_reference
  1642. before calling fold_offsetof.
  1643. 2008-04-03 Tom Tromey <tromey@redhat.com>
  1644. * Make-lang.in (c++_OBJS): New variable.
  1645. 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
  1646. * optimize.c (clone_body): New, from tree-inline.c.
  1647. 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
  1648. * method.c (synthesize_method): Use {push,pop}_function_context.
  1649. * name-lookup.c (push_to_top_level): Likewise.
  1650. * parser.c (cp_parser_late_parsing_for_member): Likewise.
  1651. 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
  1652. PR c++/35578
  1653. * parser.c (cp_parser_decl_specifier_seq): Add location to error
  1654. message.
  1655. 2008-03-27 Tom Tromey <tromey@redhat.com>
  1656. * Make-lang.in: Revert automatic dependency patch.
  1657. 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
  1658. PR obj-c++/35704
  1659. * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
  1660. (build_compound_expr): New, for compatibility with C
  1661. build_compound_expr.
  1662. (cp_build_compound_expr): Renamed from build_compound_expr.
  1663. (build_c_cast): New, for compatibility with C build_c_cast.
  1664. (cp_build_c_cast): Renamed from build_c_cast.
  1665. * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
  1666. * decl.c (cxx_maybe_build_cleanup): Ditto.
  1667. * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
  1668. (cp_build_compound_expr): Renamed from build_compound_expr.
  1669. (build_c_cast): Add C-compatible prototype.
  1670. (cp_build_c_cast): Renamed from build_c_cast.
  1671. * typeck2.c (build_functional_cast): Use cp_build_c_cast.
  1672. * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
  1673. 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
  1674. * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
  1675. tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
  1676. ending in a pack expansion, both of which can occur when
  1677. substituting into a nested template.
  1678. (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
  1679. instantiating the sizeof...(X) form, make tsubst_copy do the work.
  1680. * parser.c (cp_parser_template_parameter): Deal with unnamed
  1681. non-type template parameter packs identified by pack expansions in
  1682. the parameter type.
  1683. 2008-03-26 Jakub Jelinek <jakub@redhat.com>
  1684. PR c++/35546
  1685. * pt.c (apply_late_template_attributes): Don't call tsubst on
  1686. first attribute argument if it is IDENTIFIER_NODE.
  1687. PR c++/35332
  1688. * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
  1689. and LTGT_EXPR to pp_expression.
  1690. 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
  1691. * pt.c (coerce_template_template_parm): Moved the body of the loop
  1692. of coerce_template_template_parms here, to make iteration over a
  1693. template argument pack simpler.
  1694. Also, allow matching of a template parameter pack in the template
  1695. template parameter to a template parameter in the template
  1696. template argument.
  1697. (coerce_template_template_parms): Deal with variadic template
  1698. template parameters. Use coerce_template_template_parm.
  1699. (unify): Make sure we coerce the template template argument's
  1700. template arguments to the template template parameter's template
  1701. parameters, not the other way around.
  1702. 2008-03-25 Tom Tromey <tromey@redhat.com>
  1703. * Make-lang.in: Remove .o targets.
  1704. (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
  1705. (GXX_OBJS): Update.
  1706. (c++_OBJS): New variable.
  1707. (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
  1708. 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
  1709. * typeck.c (composite_pointer_type_r): Add SFINAE support.
  1710. (composite_pointer_type): Ditto.
  1711. (common_type): Fix call to composite_pointer_type.
  1712. (cxx_sizeof_nowarn): New; used to be a macro.
  1713. (cxx_sizeof_expr): Add SFINAE support.
  1714. (cxx_alignof_expr): Ditto.
  1715. (decay_conversion): Fix calls for SFINAE support.
  1716. (rationalize_conditional_expr): Add SFINAE support.
  1717. (build_class_member_access_expr): Ditto.
  1718. (finish_class_member_access_expr): Ditto.
  1719. (build_x_indirect_ref): Ditto.
  1720. (build_indirect_ref): Original version renamed to
  1721. cp_build_indirect_ref; new version provides a bridge from
  1722. c-common.
  1723. (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
  1724. support.
  1725. (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
  1726. (build_function_call): Original version renamed to
  1727. cp_build_function_call; new version provides a bridge from
  1728. c-common.
  1729. (cp_build_function_call): Was build_function_call; added SFINAE
  1730. support.
  1731. (convert_arguments): Add SFINAE support.
  1732. (build_x_binary_op): Ditto.
  1733. (build_binary_op): Original version renamed to cp_build_binary_op;
  1734. new version provides a bridge from c-common.
  1735. (cp_build_binary_op): Was build_binary_op; added SFINAE support.
  1736. (pointer_diff): Fix calls for SFINAE.
  1737. (build_x_unary_op): Add SFINAE support.
  1738. (condition_conversion): Fix calls for SFINAE.
  1739. (build_unary_op): Original version renamed to cp_build_unary_op;
  1740. new version provides a bridge from c-common.
  1741. (cp_build_unary_op): Was build_unary_op; added SFINAE support.
  1742. (unary_complex_lvalue): Fix calls for SFINAE.
  1743. (build_x_conditional_expr): Add SFINAE support.
  1744. (build_x_compound_expr_from_list): Fix calls for SFINAE.
  1745. (build_x_compound_expr): Add SFINAE support.
  1746. (convert_ptrmem): Fix calls for SFINAE.
  1747. (build_static_cast_1): Add SFINAE support.
  1748. (build_static_cast): Ditto.
  1749. (build_reinterpret_cast_1): Ditto.
  1750. (build_reinterpret_cast): Ditto.
  1751. (build_const_cast_1): Ditto.
  1752. (build_const_cast): Ditto.
  1753. (build_c_cast): Ditto.
  1754. (build_modify_expr): Original version renamed to
  1755. cp_build_modify_expr; new version provides a bridge from c-common.
  1756. (cp_build_modify_expr): Was build_modify_expr; added SFINAE
  1757. support.
  1758. (build_x_modify_expr): Add SFINAE support.
  1759. (build_ptrmemfunc): Fix calls for SFINAE.
  1760. (convert_for_assignment): Add SFINAE support.
  1761. (convert_for_initialization): Ditto.
  1762. (check_return_expr): Fix calls for SFINAE.
  1763. (lvalue_or_else): Add SFINAE support.
  1764. * init.c (perform_member_init): Fix calls for SFINAE.
  1765. (emit_mem_initializers): Ditto.
  1766. (expand_virtual_init): Ditto.
  1767. (expand_cleanup_for_base): Ditto.
  1768. (build_aggr_init): Add SFINAE support.
  1769. (expand_default_init): Ditto.
  1770. (expand_aggr_init_1): Fix calls for SFINAE.
  1771. (build_offset_ref): Ditto.
  1772. (build_new_1): Add SFINAE support.
  1773. (build_new): Ditto.
  1774. (build_vec_delete_1): Fix calls for SFINAE.
  1775. (get_temp_regvar): Ditto.
  1776. (build_vec_init): Add SFINAE support.
  1777. (build_dtor_call): Fix calls for SFINAE.
  1778. (build_delete): Ditto.
  1779. (push_base_cleanups): Ditto.
  1780. (build_vec_delete_1): Ditto.
  1781. * class.c (build_base_path): Fix calls for SFINAE.
  1782. (build_simple_base_path): Ditto.
  1783. (convert_to_base_statically): Ditto.
  1784. (build_vfn_ref): Ditto.
  1785. (resolve_address_of_overloaded_function): Ditto.
  1786. * decl.c (check_initializer): Fix calls for SFINAE.
  1787. (register_dtor_fn): Ditto.
  1788. (compute_array_index_type): Ditto.
  1789. (finish_enum): Ditto.
  1790. (start_preparsed_function): Ditto.
  1791. (cxx_maybe_build_cleanup): Ditto.
  1792. * call.c (convert_like): Add COMPLAIN argument.
  1793. (convert_like_with_context): Ditto.
  1794. (build_this): Fix calls for SFINAE.
  1795. (build_user_type_conversion): Ditto.
  1796. (resolve_args): Ditto.
  1797. (build_new_function_call): Add SFINAE support.
  1798. (build_operator_new_call): Fix calls for SFINAE.
  1799. (build_object_call): Add SFINAE support.
  1800. (build_conditional_expr): Ditto.
  1801. (build_new_op): Ditto.
  1802. (build_op_delete_call): Fix calls for SFINAE.
  1803. (build_temp): Ditto.
  1804. (convert_like_real): Add SFINAE support.
  1805. (build_x_va_arg): Fix calls for SFINAE.
  1806. (convert_default_arg): Ditto.
  1807. (build_over_call): Add SFINAE support.
  1808. (build_java_interface_fn_ref): Fix calls for SFINAE.
  1809. (build_special_member_call): Add SFINAE support.
  1810. (build_new_method_call): Ditto.
  1811. (perform_implicit_conversion): Ditto.
  1812. (perform_direct_initialization_if_possible): Ditto.
  1813. (initialize_reference): Fix calls for SFINAE.
  1814. * method.c (do_build_assign_ref): Fix calls for SFINAE.
  1815. * rtti.c (build_headof): Fix calls for SFINAE.
  1816. (get_tinfo_decl_dynamic): Ditto.
  1817. (get_typeid): Ditto.
  1818. (build_dynamic_cast_1): Add SFINAE support.
  1819. (build_dynamic_cast): Ditto.
  1820. (tinfo_base_init): Fix calls for SFINAE.
  1821. * except.c (do_get_exception_ptr): Fix calls for SFINAE.
  1822. (do_end_catch): Ditto.
  1823. (initialize_handler_parm): Ditto.
  1824. (expand_start_catch_block): Ditto.
  1825. (do_allocate_exception): Ditto.
  1826. (do_free_exception): Ditto.
  1827. (build_throw): Ditto.
  1828. * cvt.c (build_up_reference): Fix calls for SFINAE.
  1829. (convert_to_reference): Ditto.
  1830. (ocp_convert): Ditto.
  1831. (convert_to_void): Add SFINAE support.
  1832. * tree.c (build_dummy_object): Fix calls for SFINAE.
  1833. (stabilize_expr): Ditto.
  1834. * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
  1835. parameter.
  1836. (build_new_method_call): Ditto.
  1837. (build_special_member_call): Ditto.
  1838. (build_new_op): Ditto.
  1839. (perform_implicit_conversion): Ditto.
  1840. (perform_direct_initialization_if_possible): Ditto.
  1841. (convert_to_void): Ditto.
  1842. (build_aggr_init): Ditto.
  1843. (build_new): Ditto.
  1844. (build_vec_init): Ditto.
  1845. (build_dynamic_cast): Ditto.
  1846. (finish_call_expr): Ditto
  1847. (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
  1848. (cxx_sizeof_nowarn): Remove macro; add function declaration.
  1849. (build_class_member_access_expr): Add tsubst_flags_t parameter.
  1850. (finish_class_member_access_expr): Ditto.
  1851. (build_x_indirect_ref): Ditto.
  1852. (cp_build_indirect_ref): New.
  1853. (cp_build_function_call): Add tsubst_flags_t parameter.
  1854. (build_x_unary_op): Ditto.
  1855. (cp_build_unary_op): New.
  1856. (build_x_conditional_expr): Add tsubst_flags_t parameter.
  1857. (build_x_compound_expr): Ditto.
  1858. (build_compound_expr): Ditto.
  1859. (build_static_cast): Ditto.
  1860. (build_reinterpret_cast): Ditto.
  1861. (build_const_cast): Ditto.
  1862. (build_c_cast): Ditto.
  1863. (build_x_modify_expr): Ditto.
  1864. (cp_build_modify_expr): New.
  1865. (convert_for_initialization): Add tsubst_flags_t parameter.
  1866. (cp_build_binary_op): Remove macro; add function declaration.
  1867. (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
  1868. (lvalue_or_else): Ditto.
  1869. (build_functional_cast): Ditto.
  1870. * typeck2.c (digest_init): Fix calls for SFINAE.
  1871. (process_init_constructor_array): Ditto.
  1872. (process_init_constructor_record): Ditto.
  1873. (build_x_arrow): Ditto.
  1874. (build_m_component_ref): Ditto.
  1875. (build_functional_cast): Add SFINAE support.
  1876. * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
  1877. * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
  1878. (finish_expr_stmt): Ditto.
  1879. (finish_for_expr): Ditto.
  1880. (finish_asm_stmt): Ditto.
  1881. (finish_non_static_data_member): Ditto.
  1882. (finish_qualified_id_expr): Ditto.
  1883. (finish_call_expr): Add SFINAE support.
  1884. (finish_increment_expr): Fix calls for SFINAE.
  1885. (finish_unary_op_expr): Ditto.
  1886. (simplify_aggr_init_expr): Ditto.
  1887. (finish_omp_clauses): Ditto.
  1888. (finish_omp_for): Ditto.
  1889. (finish_omp_barrier): Ditto.
  1890. (finish_omo_flush): Ditto.
  1891. * decl2.c (grok_array_decl): Fix calls or SFINAE.
  1892. (build_anon_union_vars): Ditto.
  1893. (get_guard_cond): Ditto.
  1894. (set_guard): Ditto.
  1895. (one_static_initialization_or_destruction): Ditto.
  1896. (do_static_initialization_or_destruction): Ditto.
  1897. (generate_ctor_or_dtor_function): Ditto.
  1898. (build_offset_ref_call_from_tree): Ditto.
  1899. * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
  1900. (cp_parser_postfix_dot_deref_expression): Ditto.
  1901. (cp_parser_unary_expression): Ditto.
  1902. (cp_parser_new_expression): Ditto.
  1903. (cp_parser_cast_expression): Ditto.
  1904. (cp_parser_binary_expression): Ditto.
  1905. (cp_parser_question_colon_clause): Ditto.
  1906. (cp_parser_assignment_expression): Ditto.
  1907. (cp_parser_expression): Ditto.
  1908. (cp_parser_builtin_offsetof): Ditto.
  1909. (cp_parser_template_argument): Ditto.
  1910. (cp_parser_functional_cast): Ditto.
  1911. 2008-03-24 Tom Tromey <tromey@redhat.com>
  1912. * lex.c (handle_pragma_interface): Don't copy the filename.
  1913. (handle_pragma_implementation): Copy filename using xstrdup.
  1914. 2008-03-21 Paolo Carlini <pcarlini@suse.de>
  1915. * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
  1916. (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
  1917. (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
  1918. (PROMOTES_TO_AGGR_TYPE): Remove.
  1919. (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
  1920. * typeck.c (unary_complex_lvalue, build_modify_expr,
  1921. convert_for_initialization): Adjust.
  1922. * init.c (is_aggr_type): Remove.
  1923. (is_class_type): Add.
  1924. (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
  1925. build_delete): Adjust.
  1926. * lex.c (make_aggr_type): Remove.
  1927. (make_class_type): Add.
  1928. (cxx_make_type): Adjust.
  1929. * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
  1930. Adjust.
  1931. * decl.c (build_typename_type, make_typename_type,
  1932. make_unbound_class_template, cxx_init_decl_processing,
  1933. check_tag_decl, groktypename, start_decl_1, layout_var_decl,
  1934. check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
  1935. grok_op_properties, xref_tag, check_function_type): Adjust.
  1936. * call.c (check_dtor_name, standard_conversion, implicit_conversion,
  1937. add_builtin_candidate, add_builtin_candidates,
  1938. build_user_type_conversion_1, convert_like_real, build_cxx_call,
  1939. is_subseq, compare_ics): Adjust.
  1940. * method.c (use_thunk): Adjust.
  1941. * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
  1942. create_tinfo_types): Adjust.
  1943. * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
  1944. build_up_reference, convert_to_reference, convert_from_reference,
  1945. ocp_convert, build_expr_type_conversion): Adjust.
  1946. * tree.c (bind_template_template_parm, error_type): Adjust.
  1947. * dump.c (cp_dump_tree): Adjust.
  1948. * search.c (lookup_member): Adjust.
  1949. * friend.c (make_friend_class, do_friend): Adjust.
  1950. * typeck2.c (store_init_value, process_init_constructor_array,
  1951. process_init_constructor_record, build_x_arrow, build_m_component_ref,
  1952. build_functional_cast): Adjust.
  1953. * pt.c (finish_member_template_decl, process_template_parm,
  1954. lookup_template_class, tsubst_function_type, tsubst,
  1955. tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
  1956. Adjust.
  1957. * semantics.c (begin_class_definition, finish_base_specifier,
  1958. finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
  1959. Adjust.
  1960. * name-lookup.c (constructor_name_p, push_overloaded_decl,
  1961. do_class_using_decl, lookup_qualified_name,
  1962. maybe_process_template_type_declaration): Adjust.
  1963. * decl2.c (grok_array_decl, check_member_template,
  1964. constrain_class_visibility): Adjust.
  1965. * parser.c (cp_parser_class_name): Adjust.
  1966. 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
  1967. * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
  1968. 2008-03-17 Jason Merrill <jason@redhat.com>
  1969. PR c++/35548
  1970. * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
  1971. a temp directly to a reference as per DR391.
  1972. 2008-03-12 Richard Guenther <rguenther@suse.de>
  1973. PR c++/35469
  1974. Revert:
  1975. 2008-02-04 Richard Guenther <rguenther@suse.de>
  1976. PR java/35035
  1977. * decl.c (record_builtin_java_type): Make jboolean a
  1978. integer type again where its mode doesn't match that of bool.
  1979. 2008-01-25 Richard Guenther <rguenther@suse.de>
  1980. PR c++/33887
  1981. * decl.c (record_builtin_java_type): Make __java_boolean
  1982. a variant of bool.
  1983. * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
  1984. after TYPE_MAIN_VARIANT check.
  1985. 2008-03-10 Jakub Jelinek <jakub@redhat.com>
  1986. PR c++/35328
  1987. * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
  1988. if errorcount.
  1989. PR c++/35337
  1990. * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
  1991. DECL_P in not a variable and appears more than once error messages.
  1992. 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
  1993. Revert:
  1994. 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
  1995. PR c++/35049
  1996. PR c++/35096
  1997. * typeck.c (structural_comptypes): Call cp_comptypes.
  1998. (comptypes): New; called from the C/C++ common bits to perform
  1999. strict checks.
  2000. (cp_comptypes): Renamed from comptypes, which is already used,
  2001. with a different signature, by the C++ front end.
  2002. (build_reinterpret_cast_1): Call cp_comptypes.
  2003. (ptr_reasonably_similar): Ditto.
  2004. * decl.c (decls_match): Ditto.
  2005. * cvt.c (convert_to_reference): Ditto.
  2006. * cp-tree.h (same_type_p): Ditto.
  2007. (same_or_base_type_p): Ditto.
  2008. (comptypes): Rename to cp_comptypes.
  2009. * pt.c (canonical_type_parameter): Call cp_comptypes.
  2010. 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
  2011. * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
  2012. test for equivalence between pointer and references.
  2013. 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2014. PR 24924
  2015. * class.c (finish_struct_anon): Use permerror instead of pedwarn.
  2016. (check_field_decls): Likewise.
  2017. (note_name_declared_in_class): Likewise.
  2018. * call.c (build_new_op): Likewise.
  2019. (convert_like_real): Likewise.
  2020. (build_over_call): Likewise.
  2021. * lex.c (unqualified_fn_lookup_error): Likewise.
  2022. * parser.c (cp_parser_template_id): Likewise.
  2023. * cvt.c (warn_ref_binding): Likewise.
  2024. (convert_to_reference): Likewise.
  2025. (ocp_convert): Likewise.
  2026. (convert_to_void): Use error instead of pedwarn.
  2027. * error.c (cp_cpp_error): Use pedantic_warning_kind.
  2028. * decl.c (compute_array_index_type): Use constant_expression_error.
  2029. 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
  2030. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
  2031. that auto is either a storage class or a simple type specifier,
  2032. depending on the dialect.
  2033. (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
  2034. specifier in C++98 mode, error in C++0x mode (since we don't
  2035. support auto as a type specifier, yet).
  2036. (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
  2037. storage specifier in C++0x mode.
  2038. (cp_parser_simple_type_specifier): Parse `auto' as a
  2039. simple-type-specifier, but error because we don't support it yet.
  2040. 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2041. * parser.c (cp_parser_nonclass_name): New.
  2042. (cp_parser_pseudo_destructor_name): Use it instead of
  2043. cp_parser_type_name.
  2044. (cp_parser_type_name): Move code to cp_parser_nonclass_name.
  2045. 2008-02-29 Tom Tromey <tromey@redhat.com>
  2046. * parser.c (struct cp_token) <input_file_stack_index>: Remove.
  2047. (cp_lexer_get_preprocessor_token): Update.
  2048. (cp_lexer_set_source_position_from_token): Don't call
  2049. restore_input_file_stack.
  2050. * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
  2051. 2008-02-28 Richard Guenther <rguenther@suse.de>
  2052. Revert:
  2053. 2008-02-26 Richard Guenther <rguenther@suse.de>
  2054. * decl.c (duplicate_decls): Remove decl from global mapping
  2055. before ggc_freeing it.
  2056. 2008-02-27 Jakub Jelinek <jakub@redhat.com>
  2057. PR c++/35368
  2058. * rtti.c: Include c-pragma.h.
  2059. (push_abi_namespace, pop_abi_namespace): New functions.
  2060. (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
  2061. create_tinfo_types, emit_support_tinfos): Use them.
  2062. * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
  2063. 2008-02-26 Jason Merrill <jason@redhat.com>
  2064. PR c++/35315
  2065. * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
  2066. to name the struct for linkage purposes even if it has attributes.
  2067. (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
  2068. 2008-02-26 Tom Tromey <tromey@redhat.com>
  2069. * parser.c (eof_token): Remove old location code.
  2070. (check_empty_body): Remove test of USE_MAPPED_LOCATION.
  2071. * decl2.c (generate_ctor_or_dtor_function): Remove old location
  2072. code.
  2073. (cp_write_global_declarations): Likewise.
  2074. * lex.c (cxx_init): Remove old location code.
  2075. (handle_pragma_implementation): Remove test of
  2076. USE_MAPPED_LOCATION.
  2077. * pt.c (tsubst): Remove old location code.
  2078. * error.c (cp_print_error_function): Remove test of
  2079. USE_MAPPED_LOCATION.
  2080. * decl.c (pop_label): Remove old location code.
  2081. (finish_function): Likewise.
  2082. 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2083. PR 26264
  2084. * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
  2085. 2008-02-26 Richard Guenther <rguenther@suse.de>
  2086. * decl.c (duplicate_decls): Remove decl from global mapping
  2087. before ggc_freeing it.
  2088. 2008-02-26 Paolo Carlini <pcarlini@suse.de>
  2089. PR c++/35323
  2090. * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
  2091. 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2092. * typeck.c (build_class_member_access_expr): Add appropriate
  2093. OPT_W* parameter to warning.
  2094. (build_reinterpret_cast_1): Likewise.
  2095. * name-lookup.c (push_overloaded_decl): Likewise.
  2096. 2008-02-25 Paolo Carlini <pcarlini@suse.de>
  2097. PR c++/35333
  2098. * error.c (dump_expr): Handle CONJ_EXPR.
  2099. 2008-02-25 Paolo Carlini <pcarlini@suse.de>
  2100. PR c++/35338
  2101. * error.c (dump_type): Handle FIXED_POINT_TYPE.
  2102. (dump_expr): Handle FIXED_CST.
  2103. 2008-02-24 Jason Merrill <jason@redhat.com>
  2104. * parser.c (cp_parser_declaration): Handle "inline namespace".
  2105. (cp_parser_namespace_definition): Likewise.
  2106. PR c++/33486
  2107. * name-lookup.c (arg_assoc_namespace): Look down into inline
  2108. namespaces, too.
  2109. 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2110. * typeck.c (check_for_casting_away_constness): Use 1 single
  2111. argument, the type of cast, to decide what diagnostics generate.
  2112. (build_static_cast_1): Remove unused code. Update call to
  2113. check_for_casting_away_constness.
  2114. (build_reinterpret_cast_1): Update call to
  2115. check_for_casting_away_constness.
  2116. (build_const_cast_1): Likewise.
  2117. 2008-02-24 Paolo Carlini <pcarlini@suse.de>
  2118. * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
  2119. VEC_NEW_EXPR), forward to pp_expression.
  2120. * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
  2121. 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
  2122. PR c++/34749
  2123. * friend.c (do_friend): Call cplus_decl_attributes earlier.
  2124. 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
  2125. PR C++/34715
  2126. * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
  2127. template decls' function decl.
  2128. 2008-02-22 Paolo Carlini <pcarlini@suse.de>
  2129. PR c++/35282
  2130. Revert:
  2131. 2008-02-14 Paolo Carlini <pcarlini@suse.de>
  2132. PR c++/28743
  2133. * pt.c (determine_specialization): In case of function templates,
  2134. when the type of DECL does not match FN there is no match.
  2135. 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
  2136. PR c/19999
  2137. * typeck.c (build_binary_op): Warn about floating point
  2138. comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
  2139. 2008-02-19 Jason Merrill <jason@redhat.com>
  2140. PR c++/34950
  2141. * pt.c (resolve_overloaded_unification): Set processing_template_decl
  2142. while we look for possible bindings.
  2143. 2008-02-19 Jakub Jelinek <jakub@redhat.com>
  2144. PR c++/35028
  2145. * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
  2146. PR c++/34964
  2147. PR c++/35244
  2148. * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
  2149. vars. Afterwards ensure v is VAR_DECL.
  2150. PR c++/35078
  2151. * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
  2152. call cp_finish_decl.
  2153. * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
  2154. early.
  2155. 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
  2156. PR c++/35023
  2157. PR c++/35024
  2158. PR c++/35026
  2159. * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
  2160. is error_mark_node, return an error early.
  2161. (find_parameter_packs_r): Pass the pointer set along to recursive
  2162. calls of cp_walk_subtrees; don't try to manage the pointer set
  2163. ourselves.
  2164. (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
  2165. (make_pack_expansion): Ditto.
  2166. (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
  2167. a second pass through the tree with find_parameter_packs_r; that
  2168. second pass no longer does anything.
  2169. (push_template_decl_real): If we have an erroneous declaration,
  2170. set its type to error_mark_node before returning an error.
  2171. 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
  2172. PR c++/34050
  2173. * pt.c (tsubst_initializer_list): Deal with the use of
  2174. VOID_TYPE_NODE to indicate value-initialization of the bases.
  2175. 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2176. Jason Merrill <jason@redhat.com>
  2177. PR c++/5645
  2178. PR c++/11159
  2179. * class.c (type_has_user_nondefault_constructor): New fn.
  2180. * cp-tree.h: Declare it.
  2181. * init.c (emit_mem_initializers): Use it for -W warning about
  2182. missing base initializer.
  2183. 2008-02-14 Paolo Carlini <pcarlini@suse.de>
  2184. PR c++/28743
  2185. * pt.c (determine_specialization): In case of function templates,
  2186. when the type of DECL does not match FN there is no match.
  2187. 2008-02-13 Jakub Jelinek <jakub@redhat.com>
  2188. Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2189. PR c++/35138
  2190. * parser.c (cp_parser_pseudo_destructor_name): If next tokens
  2191. are not identifier :: ~, return before calling cp_parser_type_name.
  2192. 2008-02-13 Jason Merrill <jason@redhat.com>
  2193. PR c++/34962, c++/34937, c++/34939
  2194. * decl2.c (is_late_template_attribute): Always defer attributes
  2195. vector_size and weak.
  2196. PR c++/34774
  2197. * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
  2198. of enumerators, too.
  2199. 2008-02-12 Jason Merrill <jason@redhat.com>
  2200. PR c++/34824
  2201. * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
  2202. if we're doing conversions to call a user-defined conversion function.
  2203. 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
  2204. PR c++/29048
  2205. * semantics.c (finish_qualified_id_expr): Avoid duplicate access
  2206. check here, too.
  2207. 2008-02-12 Jakub Jelinek <jakub@redhat.com>
  2208. PR c++/34862
  2209. * init.c (build_new_1): Don't create placement_expr before
  2210. constructing alloc_call. Verify that the pointer is passed by
  2211. value to operator new.
  2212. 2008-02-11 Jason Merrill <jason@redhat.com>
  2213. PR c++/35097
  2214. * pt.c (tsubst): Don't look up a template typedef in an explicit
  2215. specialization.
  2216. 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
  2217. PR c++/35113
  2218. * tree.c (cp_build_qualified_type_real): When building a
  2219. cv-qualified array type, build it as a unique type with
  2220. build_cplus_array_type_1 and then adopt the unqualified type's
  2221. main variant.
  2222. 2008-02-11 Paolo Carlini <pcarlini@suse.de>
  2223. PR c++/35077
  2224. * decl.c (groktypename): Check grokdeclarator return.
  2225. 2008-02-10 Jason Merrill <jason@redhat.com>
  2226. PR c++/34094
  2227. * decl2.c (cp_write_global_declarations): Don't write out static
  2228. data members with DECL_IN_AGGR_P set.
  2229. 2008-02-08 Jason Merrill <jason@redhat.com>
  2230. PR c++/35116
  2231. * tree.c (build_target_expr_with_type): Handle void initializer.
  2232. (bot_manip): Remap slot before recursing.
  2233. 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2234. PR other/35107
  2235. * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
  2236. 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
  2237. PR c++/35056
  2238. * tree.c: Include tree-flow.h.
  2239. (build_target_expr): Check type compatibility.
  2240. * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
  2241. * call.c (convert_like_real): Convert bitfield to expected type.
  2242. 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
  2243. PR c++/35049
  2244. PR c++/35096
  2245. * typeck.c (structural_comptypes): Call cp_comptypes.
  2246. (comptypes): New; called from the C/C++ common bits to perform
  2247. strict checks.
  2248. (cp_comptypes): Renamed from comptypes, which is already used,
  2249. with a different signature, by the C++ front end.
  2250. (build_reinterpret_cast_1): Call cp_comptypes.
  2251. (ptr_reasonably_similar): Ditto.
  2252. * decl.c (decls_match): Ditto.
  2253. * cvt.c (convert_to_reference): Ditto.
  2254. * cp-tree.h (same_type_p): Ditto.
  2255. (same_or_base_type_p): Ditto.
  2256. (comptypes): Rename to cp_comptypes.
  2257. * pt.c (canonical_type_parameter): Call cp_comptypes.
  2258. 2008-02-05 Jakub Jelinek <jakub@redhat.com>
  2259. PR c++/33553
  2260. * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
  2261. value dependent expression.
  2262. 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
  2263. PR c++/35074
  2264. * decl2.c (save_template_attributes): When we're modifying the
  2265. TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
  2266. all of the other variants to add those same attributes. Otherwise,
  2267. the main variant will be inconsistent with those other variants.
  2268. 2008-02-04 Richard Guenther <rguenther@suse.de>
  2269. PR java/35035
  2270. * decl.c (record_builtin_java_type): Make jboolean a
  2271. integer type again where its mode doesn't match that of bool.
  2272. 2008-02-02 Jason Merrill <jason@redhat.com>
  2273. Mark Mitchell <mark@codesourcery.com>
  2274. PR c++/33916
  2275. * init.c (build_value_init_1): New function.
  2276. (build_value_init): New function.
  2277. * typeck2.c (build_functional_cast): Call it.
  2278. * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
  2279. * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
  2280. TYPE_HAS_CONSTRUCTOR.
  2281. * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
  2282. add_implicitly_declared_members): Adjust.
  2283. (check_field_decls): Adjust. Remove warnings about reference/const
  2284. in class without constructor.
  2285. (check_bases_and_members): Adjust. Give those warnings here instead.
  2286. * decl.c (fixup_anonymous_aggr): Adjust.
  2287. (check_initializer): Adjust, clarify logic slightly.
  2288. (grok_special_member_properties): Adjust, only set if user-provided.
  2289. * rtti.c (create_tinfo_types): Don't set.
  2290. * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
  2291. Use same_type_ignoring_top_level_qualifiers_p.
  2292. * pt.c (check_explicit_specialization): Adjust.
  2293. (instantiate_class_template): Adjust.
  2294. 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
  2295. Jakub Jelinek <jakub@redhat.com>
  2296. PR c++/34935
  2297. PR c++/34936
  2298. * typeck.c (structural_comptypes): Handle comparisons of
  2299. VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
  2300. REAL_TYPE nodes.
  2301. * mangle.c (write_builtin_type): Map down to the canonical type,
  2302. which will be one of the predefined type nodes.
  2303. 2008-01-29 Michael Meissner <michael.meissner@amd.com>
  2304. PR 35004
  2305. * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
  2306. bits to allow for expansion of the number of middle end tree
  2307. codes.
  2308. 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
  2309. PR c++/34055
  2310. PR c++/34103
  2311. PR c++/34219
  2312. PR c++/34606
  2313. PR c++/34753
  2314. PR c++/34754
  2315. PR c++/34755
  2316. PR c++/34919
  2317. PR c++/34961
  2318. * typeck.c (check_return_expr): Tweak call to
  2319. check_for_bare_parameter_packs.
  2320. * class.c (add_method): Be careful with error_mark_nodes.
  2321. * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
  2322. signature.
  2323. * pt.c (struct find_parameter_pack_data): Remove
  2324. SET_PACKS_TO_ERROR.
  2325. (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
  2326. (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
  2327. (make_pack_expansion): Ditto.
  2328. (check_for_bare_parameter_packs): Parameter is now a tree, not a
  2329. tree*.
  2330. (process_template_parm): Tweak call to
  2331. check_for_bare_parameter_packs.
  2332. (push_template_decl_real): Tweak calls to
  2333. check_for_bare_parameter_packs. If bare parameter packs are found
  2334. in the list of exceptions, clear out that list after giving an
  2335. error.
  2336. * semantics.c (finish_cond): Tweak call to
  2337. check_for_bare_parameter_packs.
  2338. (finish_expr_stmt): Ditto.
  2339. (finish_for_expr): Ditto.
  2340. (finish_switch_cond): Ditto.
  2341. (finish_mem_initializers): Ditto.
  2342. (finish_member_declaration): Ditto.
  2343. (finish_static_assert): Check for bare parameter packs in the
  2344. condition.
  2345. * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
  2346. attributes of a declaration.
  2347. * parser.c (cp_parser_using_declaration): Tweak call to
  2348. check_for_bare_parameter_packs.
  2349. (cp_parser_base_clause): Ditto.
  2350. 2008-01-28 Jason Merrill <jason@redhat.com>
  2351. PR c++/35007
  2352. * class.c (build_base_path): Fix !want_pointer case.
  2353. 2008-01-27 Jason Merrill <jason@redhat.com>
  2354. PR c++/27177
  2355. * class.c (build_base_path): Fix previous change.
  2356. 2008-01-26 Jakub Jelinek <jakub@redhat.com>
  2357. PR c++/34965
  2358. * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
  2359. and TRUTH_XOR_EXPR.
  2360. 2008-01-26 Richard Guenther <rguenther@suse.de>
  2361. PR c++/34235
  2362. * typeck.c (build_binary_op): Remove code to shorten compares.
  2363. 2008-01-25 Richard Guenther <rguenther@suse.de>
  2364. PR c++/33887
  2365. * decl.c (record_builtin_java_type): Make __java_boolean
  2366. a variant of bool.
  2367. * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
  2368. after TYPE_MAIN_VARIANT check.
  2369. 2008-01-25 Jason Merrill <jason@redhat.com>
  2370. PR c++/27177
  2371. * class.c (build_base_path): Don't mess with virtual access if
  2372. skip_evaluation.
  2373. * call.c (standard_conversion): Don't check whether source type
  2374. is complete.
  2375. * decl2.c (is_late_template_attribute): Don't defer attribute
  2376. visibility just because the type is dependent.
  2377. 2008-01-25 Jason Merrill <jason@redhat.com>
  2378. Mark Mitchell <mark@codesourcery.com>
  2379. PR c++/31780
  2380. * call.c (standard_conversion): Allow conversion from integer/real
  2381. to complex.
  2382. (compare_ics): Such a conversion is worse than a normal arithmetic
  2383. conversion.
  2384. 2008-01-25 Richard Guenther <rguenther@suse.de>
  2385. PR c++/33887
  2386. * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
  2387. to true.
  2388. 2008-01-24 Paolo Carlini <pcarlini@suse.de>
  2389. PR c++/34603
  2390. * pt.c (push_template_decl_real): Return error_mark_node in case
  2391. of template definition of non-template.
  2392. 2008-01-24 Jason Merrill <jason@redhat.com>
  2393. PR c++/34913
  2394. * decl2.c (is_late_template_attribute): Defer any attribute with
  2395. dependent args. Also defer type attributes if the type is dependent.
  2396. 2008-01-22 Jakub Jelinek <jakub@redhat.com>
  2397. Alexandre Oliva <aoliva@redhat.com>
  2398. PR c++/33984
  2399. * call.c (reference_binding): For bitfields use the declared bitfield
  2400. type.
  2401. (add_builtin_candidates): Likewise.
  2402. * class.c (layout_class_type): For bitfields copy over the
  2403. original type quals.
  2404. 2008-01-22 Jason Merrill <jason@redhat.com>
  2405. PR c++/28560
  2406. * decl.c (groktypename): Also ignore attributes on dependent
  2407. possibly-class types.
  2408. PR c++/34912
  2409. * friend.c (do_friend): Check for prior declaration of a friend
  2410. function of a local class.
  2411. * name-lookup.c (lookup_name_innermost_nonclass_level):
  2412. No longer static.
  2413. * name-lookup.h: Declare it.
  2414. 2008-01-22 Tom Tromey <tromey@redhat.com>
  2415. PR c++/34829:
  2416. * init.c (build_new_1): Only disallow Java aggregates.
  2417. 2008-01-22 Jakub Jelinek <jakub@redhat.com>
  2418. PR c++/34607
  2419. * semantics.c (finish_omp_for): Don't call c_finish_omp_for
  2420. if decl or init is error_mark_node.
  2421. PR c++/34918
  2422. * error.c (dump_expr): Handle VECTOR_CST.
  2423. 2008-01-21 Jason Merrill <jason@redhat.com>
  2424. PR c++/33959
  2425. * pt.c (tsubst_aggr_type): Make sure our context is complete.
  2426. PR c++/34573
  2427. * pt.c (retrieve_local_specialization): Robustify.
  2428. (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
  2429. PR c++/34846
  2430. * pt.c (tsubst): Only call retrieve_local_specialization if the
  2431. original typedef was in a function template.
  2432. PR c++/34196
  2433. * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
  2434. 2008-01-21 Richard Guenther <rguenther@suse.de>
  2435. PR c++/34850
  2436. * error.c (cp_print_error_function): Deal with recursive
  2437. BLOCK trees.
  2438. 2008-01-20 Paolo Carlini <pcarlini@suse.de>
  2439. PR c++/34891
  2440. * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
  2441. 2008-01-20 Paolo Carlini <pcarlini@suse.de>
  2442. PR c++/34776
  2443. PR c++/34486
  2444. * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
  2445. on non-IS_AGGR_TYPE scope.
  2446. (constructor_name_p): Assert IS_AGGR_TYPE.
  2447. 2008-01-18 Ian Lance Taylor <iant@google.com>
  2448. PR c++/33407
  2449. * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
  2450. (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
  2451. DECL_IS_OPERATOR_NEW flag.
  2452. 2008-01-16 Richard Guenther <rguenther@suse.de>
  2453. PR c++/33819
  2454. * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
  2455. for conversions to type variants.
  2456. 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
  2457. * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
  2458. declaration and code. Update copyright year.
  2459. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2460. PR c++/34399
  2461. * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
  2462. know we have a class type.
  2463. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2464. PR c++/34751
  2465. * pt.c (coerce_template_parameter_pack): When substituting into
  2466. the type of a non-type template parameter pack. use the
  2467. deduced/substituted arguments.
  2468. * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
  2469. can be a parameter pack with the ellipsis following it. When we
  2470. have an erroneous declaration, allow it to be a parameter pack.
  2471. (cp_parser_template_parameter): Complain about default
  2472. arguments on non-type template parameter packs, and parse them
  2473. using the new cp_parser_default_argument.
  2474. (cp_parser_parameter_declaration): Complain about parameter packs
  2475. with default arguments. Move parsing of default arguments into a
  2476. new function, cp_parser_default_argument.
  2477. (cp_parser_default_argument): New; extracted from
  2478. cp_parser_parameter_declaration.
  2479. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2480. PR c++/34051
  2481. PR c++/34055
  2482. PR c++/34102
  2483. PR c++/34103
  2484. * typeck.c (check_return_expr): If there are bare parameter packs
  2485. in the return value, set it to error_mark_node.
  2486. * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
  2487. * pt.c (find_parameter_packs_r): Look at the type of
  2488. IDENTIFIER_NODEs (e.g., for user-defined conversions).
  2489. (check_for_bare_parameter_packs): Flip the result: now returns
  2490. TRUE when there were bare parameter packs, FALSE otherwise.
  2491. (push_template_decl_real): Deal with flipped result of
  2492. check_for_bare_parameter_packs.
  2493. * semantics.c (finish_cond): If there are bare parameter packs in
  2494. the conditional, set it to error_mark_node.
  2495. (finish_expr_stmt): If there are bare parameter packs in the
  2496. expression, set it to error_mark_node.
  2497. (finish_for_expr): Ditto.
  2498. (finish_switch_cond): If there are bare parameter packs in
  2499. the conditional, set it to error_mark_node.
  2500. (finish_mem_initializers): If there are bare parameter packs in
  2501. the member initializer, set it to error_mark_node.
  2502. (finish_member_declaration): Check the attributes of the
  2503. declaration for bare parameter packs, and remove the attributes if
  2504. any have bare parameter packs.
  2505. * parser.c (cp_parser_using_declaration): Check the using
  2506. declaration for bare parameter packs.
  2507. (cp_parser_base_clause): If there are bare parameter packs in a
  2508. base specifier, don't add it to the chain.
  2509. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2510. PR c++/34314
  2511. * error.c (dump_simple_decl): Display ellipsis for template
  2512. non-type parameter packs.
  2513. (dump_decl): Display ellipsis for template type parameter packs.
  2514. (dump_template_decl): Display ellipsis for template template
  2515. parameter packs.
  2516. * pt.c (redeclare_class_template): When redeclaring a class
  2517. template, check for collisions between template parameters and
  2518. template parameter packs.
  2519. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2520. PR c++/33964
  2521. * pt.c (process_partial_specialization): Don't mark template
  2522. parameters that occur in non-deduced contexts.
  2523. (struct pair_fn_data): Add include_nondeduced_p.
  2524. (for_each_template_parm_r): Only visit non-deduced contexts if
  2525. include_nondeduced_p is set.
  2526. (for_each_template_parm): Added parameter include_nondeduced_p,
  2527. which states whether template parameters found in non-deduced
  2528. contexts should be visited.
  2529. (uses_template_parms): Visit all template parameters, even those
  2530. in non-deduced contexts.
  2531. 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
  2532. PR c++/34052
  2533. * pt.c (check_default_tmpl_args): Check for parameter packs that
  2534. aren't at the end of a primary template.
  2535. (push_template_decl_real): Remove check for parameter packs that
  2536. aren't at the end of a primary template; that now happens in
  2537. check_default_tmpl_args.
  2538. * semantics.c (finish_template_template_parm): Use
  2539. check_default_tmpl_args to check for errors in the template
  2540. parameter list.
  2541. 2008-01-12 Doug Kwan <dougkwan@google.com>
  2542. * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
  2543. instead of OPT_Wreturn_type in warning due to ignored return type
  2544. qualifiers.
  2545. * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
  2546. instead of OPT_Wreturn_type in warning due to ignored return type
  2547. qualifiers.
  2548. 2008-01-08 Jakub Jelinek <jakub@redhat.com>
  2549. PR c++/33890
  2550. * semantics.c (finish_omp_for): Don't call
  2551. fold_build_cleanup_point_expr if processing_template_decl.
  2552. 2008-01-04 Paolo Carlini <pcarlini@suse.de>
  2553. Jakub Jelinek <jakub@redhat.com>
  2554. PR c++/34611
  2555. * error.c (dump_template_argument): Deal with TREE_LIST.
  2556. 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
  2557. * parser.c (cp_parser_check_decl_spec): Don't warn about "long
  2558. long" in C++0x mode; change the warning to note that "long long"
  2559. is only unsupported in C++98 mode.
  2560. Copyright (C) 2008 Free Software Foundation, Inc.
  2561. Copying and distribution of this file, with or without modification,
  2562. are permitted in any medium without royalty provided the copyright
  2563. notice and this notice are preserved.