ChangeLog-2007 113 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344
  1. 2007-12-20 Jason Merrill <jason@redhat.com>
  2. PR c++/34111
  3. * call.c (standard_conversion): Derived-to-base is considered a
  4. standard conversion.
  5. 2007-12-19 Jakub Jelinek <jakub@redhat.com>
  6. PR c++/34513
  7. * parser.c (cp_parser_omp_parallel): For non-combined parallel
  8. call cp_parser_statement rather than
  9. cp_parser_already_scoped_statement.
  10. 2007-12-18 Jason Merrill <jason@redhat.com>
  11. PR c++/34206
  12. * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
  13. use template parms.
  14. (dependent_type_p_r): Handle the domain of an array.
  15. 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
  16. Jakub Jelinek <jakub@redhat.com>
  17. PR c++/32565
  18. PR c++/33943
  19. PR c++/33965
  20. * pt.c (template_template_parm_bindings_ok_p): New; verifies
  21. bindings of template template parameters after all template
  22. arguments have been deduced.
  23. (coerce_template_parms): Don't complain when COMPLAIN doesn't
  24. include tf_error.
  25. (fn_type_unification): Use template_template_parm_bindings_ok_p.
  26. (unify): Deal with variadic, bound template template parameters.
  27. (get_class_bindings): Use template_template_parm_bindings_ok_p.
  28. 2007-12-18 Jakub Jelinek <jakub@redhat.com>
  29. PR c++/34488
  30. * decl.c (grokdeclarator): Reject friend sfk_constructor
  31. FUNCTION_TYPE.
  32. 2007-12-17 Jakub Jelinek <jakub@redhat.com>
  33. PR c/34506
  34. * parser.c (cp_parser_omp_all_clauses): Accept optional comma
  35. in between clauses.
  36. 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
  37. PR debug/7081
  38. * cp-lang.c (cp_classify_record): New.
  39. (LANG_HOOKS_CLASSIFY_RECORD): Override.
  40. 2007-12-11 Jakub Jelinek <jakub@redhat.com>
  41. PR c++/34238
  42. * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
  43. PR c++/34364
  44. * rtti.c (build_dynamic_cast): Call convert_from_reference even for
  45. dynamic_cast in a template.
  46. 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
  47. PR c++/34059
  48. * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
  49. MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
  50. 2007-12-10 Jakub Jelinek <jakub@redhat.com>
  51. PR c++/34395
  52. * error.c (dump_type_prefix, dump_type_suffix): Handle
  53. TYPE_PACK_EXPANSION.
  54. PR c++/34394
  55. * error.c (dump_expr): Handle ABS_EXPR.
  56. 2007-12-09 Jakub Jelinek <jakub@redhat.com>
  57. PR c++/34178
  58. PR c++/34340
  59. * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
  60. in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
  61. Return 2 also if DECL_EXPLICIT_INSTANTIATION.
  62. * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
  63. flag_use_repository and repo_emit_p returned 2.
  64. 2007-12-06 Jakub Jelinek <jakub@redhat.com>
  65. PR c++/34336
  66. * tree.c (stabilize_call, stabilize_init): Do nothing if
  67. processing_template_decl.
  68. 2007-12-05 Jakub Jelinek <jakub@redhat.com>
  69. PR c++/34271
  70. * semantics.c (finish_decltype_type): For SCOPE_REF issue an
  71. error instead of assertion failure.
  72. * parser.c (cp_parser_decltype): If closing paren is not found,
  73. return error_mark_node.
  74. 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
  75. PR c++/34101
  76. * name-lookup.c (arg_assoc_template_arg): Recurse on argument
  77. packs.
  78. (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
  79. since arg_assoc_template_arg will deal with them (better).
  80. 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
  81. PR c++/33509
  82. * pt.c (tsubst_exception_specification): Handle substitutions into
  83. member templates, where tsubst_pack_expansion returns a
  84. TYPE_PACK_EXPANSION.
  85. 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
  86. PR c++/33091
  87. * pt.c (unify_pack_expansion): If we didn't deduce any actual
  88. bindings for the template parameter pack, don't try to keep the
  89. empty deduced arguments.
  90. (unify): If a parameter is a template-id whose template argument
  91. list contains a pack expansion that is not at the end, then we
  92. cannot unify against that template-id.
  93. 2007-12-02 Paolo Carlini <pcarlini@suse.de>
  94. PR c++/34061
  95. * pt.c (current_template_args): Use error_operand_p.
  96. 2007-12-02 Paolo Carlini <pcarlini@suse.de>
  97. PR c++/34273
  98. * error.c (dump_decl): Handle TREE_BINFO.
  99. 2007-12-01 Ollie Wild <aaw@google.com>
  100. PR c++/8171
  101. * typeck.c (build_binary_op): Add conversion of pointers to function
  102. members appearing as operands to the equality operators.
  103. 2007-11-30 Jakub Jelinek <jakub@redhat.com>
  104. PR c++/34275
  105. * error.c (dump_expr): Handle OBJ_TYPE_REF.
  106. 2007-11-29 Jakub Jelinek <jakub@redhat.com>
  107. PR c++/34270
  108. * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
  109. in templates.
  110. * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
  111. Likewise.
  112. PR c++/34267
  113. PR c++/34268
  114. * parser.c (cp_parser_decltype): Don't call finish_id_expression
  115. on ~type.
  116. * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
  117. and ~type early.
  118. 2007-11-27 Jakub Jelinek <jakub@redhat.com>
  119. PR tree-optimization/34181
  120. * method.c (use_thunk): Don't inline the call in the thunk.
  121. PR c++/34213
  122. * tree.c (decl_linkage): Static data members and static member
  123. functions in anonymous ns classes are lk_external.
  124. 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
  125. PR c++/34081
  126. * decl.c (start_preparsed_function): Pass
  127. processing_template_decl for the new allocate_struct_function
  128. parameter.
  129. 2007-11-25 Richard Guenther <rguenther@suse.de>
  130. * decl.c (poplevel): Use BLOCK_CHAIN.
  131. 2007-11-24 Ollie Wild <aaw@google.com>
  132. * typeck.c (delta_from_ptrmemfunc): New function.
  133. (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
  134. (build_binary_op): Call delta_from_ptrmemfunc.
  135. 2007-11-23 Jakub Jelinek <jakub@redhat.com>
  136. PR c++/30293
  137. PR c++/30294
  138. * decl.c (cp_finish_decl): Disallow variable or field
  139. definitions if extern "Java" aggregates.
  140. (grokparms): Disallow parameters with extern "Java"
  141. aggregates.
  142. (check_function_type): Disallow function return values
  143. with extern "Java" aggregates.
  144. * init.c (build_new_1): Disallow placement new with
  145. extern "Java" aggregates.
  146. 2007-11-23 Mark Mitchell <mark@codesourcery.com>
  147. Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  148. PR c++/5310
  149. * call.c (convert_like_real): Build a zero constant when __null is
  150. converted to an integer type.
  151. 2007-11-22 Jakub Jelinek <jakub@redhat.com>
  152. PR c++/34094
  153. * decl2.c (cp_write_global_declarations): Issue error about static
  154. data members in anonymous namespace which are declared and used,
  155. but not defined.
  156. 2007-11-20 Jakub Jelinek <jakub@redhat.com>
  157. PR c++/34089
  158. * parser.c (cp_parser_class_head): Reject function template ids.
  159. PR c++/28879
  160. * tree.c (build_cplus_array_type_1): Don't pass any VLA types
  161. when processing_template_decl to build_array_type.
  162. PR c++/33962
  163. * pt.c (more_specialized_fn): Don't segfault if one or
  164. both argument list end with ellipsis.
  165. 2007-11-18 Jakub Jelinek <jakub@redhat.com>
  166. PR c++/30988
  167. * semantics.c (finish_call_expr): Set
  168. current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
  169. or OVERLOAD with all noreturn functions.
  170. 2007-11-16 Jakub Jelinek <jakub@redhat.com>
  171. PR c++/34100
  172. * pt.c (apply_late_template_attributes): Do nothing if decl's type is
  173. error_mark_node.
  174. 2007-11-13 Jakub Jelinek <jakub@redhat.com>
  175. PR c++/34054
  176. PR c++/34056
  177. PR c++/34057
  178. PR c++/34058
  179. PR c++/34060
  180. * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
  181. set to error_mark_node the outermost POINTER_TYPE to the pack if
  182. it is seen in a POINTER_TYPE.
  183. (push_template_decl_real): If check_for_bare_parameter_packs
  184. fails for function return type, set the return type to
  185. integer_type_node. If check_for_bare_parameter_packs failed
  186. for non-function, return error_mark_node.
  187. PR c++/29225
  188. * call.c (build_new_op): Call resolve_args before calling
  189. build_over_call.
  190. 2007-11-11 Tom Tromey <tromey@redhat.com>
  191. PR c++/17577:
  192. * lex.c (handle_pragma_implementation): Use cpp_included_before.
  193. 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  194. PR c++/8570
  195. * pt.c (redeclare_class_template): Update error message. Use a
  196. note to show the previous declaration.
  197. (tsubst_friend_class): Use the location of the friend template as
  198. the input location before calling redeclare_class_template.
  199. 2007-11-11 Jakub Jelinek <jakub@redhat.com>
  200. PR c++/34068
  201. * semantics.c (finish_pseudo_destructor_expr): Handle
  202. object == error_mark_node.
  203. 2007-11-10 Jakub Jelinek <jakub@redhat.com>
  204. PR c++/32241
  205. * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
  206. is not scalar type, let finish_class_member_access_expr handle
  207. diagnostics. Pass BIT_NOT_EXPR argument to
  208. finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
  209. 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
  210. PR c++/33510
  211. * decl.c (cp_complete_array_type): If any of the initializer
  212. elements are pack expansions, don't compute the array size yet.
  213. 2007-11-08 Andrew Pinski <pinskia@gmail.com>
  214. PR c++/30297:
  215. * tree.c (decl_linkage): Fields have no linkage.
  216. 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
  217. * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
  218. 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
  219. PR c++/33045
  220. PR c++/33837
  221. PR c++/33838
  222. * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
  223. Be careful with ERROR_MARK_NODEs.
  224. * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
  225. argument.
  226. 2007-11-07 Jakub Jelinek <jakub@redhat.com>
  227. PR c++/33501
  228. * call.c (build_over_call): Don't check TREE_ADDRESSABLE
  229. on incomplete type.
  230. 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
  231. PR c++/33977
  232. PR c++/33886
  233. * tree.c (c_build_qualified_type): Define bridge to
  234. cp_build_qualified_type.
  235. 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
  236. PR c++/31439
  237. PR c++/32114
  238. PR c++/32115
  239. PR c++/32125
  240. PR c++/32126
  241. PR c++/32127
  242. PR c++/32128
  243. PR c++/32253
  244. PR c++/32566
  245. * typeck.c (check_return_expr): Pass address of retval to
  246. check_for_bare_parameter_packs.
  247. * class.c (build_base_field): Tolerate bases that have no layout
  248. due to errors.
  249. (end_of_base): Ditto.
  250. * tree.c (canonical_type_variant): Be careful with
  251. ERROR_MARK_NODE.
  252. * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
  253. tree*.
  254. * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
  255. which states whether parameter packs should be replaced with
  256. ERROR_MARK_NODE.
  257. (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
  258. possible. If set_packs_to_error is set true, replace the parameter
  259. pack with ERROR_MARK_NODE. Manage our own pointer sets.
  260. (uses_parameter_packs): Don't set parameter packs to
  261. ERROR_MARK_NODE.
  262. (check_for_bare_parameter_packs): Now takes a pointer to a tree,
  263. which may be modified (if it is a parameter pack). Instructs
  264. find_parameter_packs_r to replace parameter packs with
  265. ERROR_MARK_NODE (so that they won't cause errors later on).
  266. (process_template_parm): Pass pointer to
  267. check_for_bare_parameter_packs.
  268. (process_partial_specialization): Replace pack expansions before
  269. the end of the template argument list with ERROR_MARK_NODE.
  270. (push_template_decl_real): Pass pointer to
  271. check_for_bare_parameter_packs. Replace parameter packs not at the
  272. end of the template parameter list with ERROR_MARK_NODE.
  273. (convert_template_argument): Be more careful about using DECL_NAME
  274. on only declarations.
  275. (unify): Can't unify against ERROR_MARK_NODE.
  276. * semantics.c (finish_cond): Pass pointer to
  277. check_for_bare_parameter_packs.
  278. (finish_expr_stmt): Ditto.
  279. (finish_for_expr): Ditto.
  280. (finish_switch_cond): Pass pointer to
  281. check_for_bare_parameter_packs, and call it before we put the
  282. condition into the statement.
  283. (finish_mem_initializers): Pass pointer to
  284. check_for_bare_parameter_packs.
  285. (finish_member_declaration): Ditto.
  286. * parser.c (cp_parser_base_clause): Ditto.
  287. 2007-11-06 Jakub Jelinek <jakub@redhat.com>
  288. PR target/33168
  289. * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
  290. with the final TREE_READONLY flag in place. processing_template_decl
  291. is known to be 0 in this part of function.
  292. PR c++/33894
  293. * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
  294. OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
  295. * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
  296. * semantics.c (finish_omp_atomic): Revert most of the
  297. 2007-02-05 changes, just keep the new representation of
  298. OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
  299. 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
  300. PR c++/33871
  301. * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
  302. local.
  303. 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
  304. PR c++/33996
  305. PR c++/33235
  306. PR c++/33930
  307. * typeck.c (merge_types): Don't lose rvalue references when
  308. merging types.
  309. * call.c (build_over_call): Don't elide move constructors just
  310. because the copy constructor is trivial (!).
  311. (compare_ics): If comparing cv-qualifiers fails, we can still order
  312. based on binding lvalues vs. rvalues.
  313. 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
  314. PR c++/33939
  315. * pt.c (unify_pack_expansion): bring handling of function call
  316. arguments into line with type_unification_real.
  317. 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  318. * typeck.c (build_binary_op): Use pedwarn instead of error for
  319. consistency.
  320. 2007-11-05 Jakub Jelinek <jakub@redhat.com>
  321. PR c++/33836
  322. * parser.c (cp_parser_unary_expression): For &&label call
  323. cp_parser_non_integral_constant_expression and return error_mark_node
  324. if it returned true.
  325. PR c++/33969
  326. * decl.c (grokdeclarator): Don't call build_memfn_type if type
  327. is neither FUNCTION_TYPE nor METHOD_TYPE.
  328. 2007-11-02 Jakub Jelinek <jakub@redhat.com>
  329. PR c++/33516
  330. * parser.c (cp_parser_nested_name_specifier_opt): Use
  331. TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
  332. typedef of currently open class.
  333. 2007-11-02 Paolo Carlini <pcarlini@suse.de>
  334. PR c++/33495
  335. * error.c (dump_expr): Deal specially with statements.
  336. 2007-11-01 Jason Merrill <jason@redhat.com>
  337. PR c++/30897
  338. * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
  339. template parms.
  340. (lookup_template_class): Use it to get the outer template args
  341. for instantiating one.
  342. PR c++/29236
  343. * pt.c (reduce_template_parm_level): tsubst the parameters
  344. of a template template parm.
  345. 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
  346. PR c++/33955
  347. * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
  348. 2007-11-01 Jakub Jelinek <jakub@redhat.com>
  349. PR c++/32384
  350. * parser.c (cp_parser_postfix_dot_deref_expression): If
  351. POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
  352. first and if that succeeds and type is SCALAR_TYPE_P, create
  353. PSEUDO_DTOR_EXPR.
  354. PR c++/32260
  355. * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
  356. (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
  357. as for std::type_info.
  358. 2007-10-31 Paolo Carlini <pcarlini@suse.de>
  359. PR c++/33494
  360. * cxx-pretty-print.c (pp_cxx_typeid_expression,
  361. pp_cxx_delete_expression): Change to static linkage.
  362. * cxx-pretty-print.h: Adjust declarations.
  363. * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
  364. MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
  365. MODOP_EXPR): Forward to pp_expression.
  366. * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
  367. Fix typo.
  368. 2007-10-31 Christian Bruel <christian.bruel@st.com>
  369. Mark Mitchell <mark@codesourcery.com>
  370. PR c++/19531
  371. * typeck.c (check_return_expr): Don't set named_return_value_okay_p
  372. if retval is volatile.
  373. 2007-10-30 Jakub Jelinek <jakub@redhat.com>
  374. PR c++/33616
  375. * decl2.c (build_offset_ref_call_from_tree): Call
  376. build_non_dependent_expr on object prior to building ADDR_EXPR from it
  377. if FN is DOTSTAR_EXPR.
  378. 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
  379. PR c++/31993
  380. PR c++/32252
  381. * pt.c (find_parameter_packs_r): Fix typo in comment.
  382. (convert_template_argument): Look at the pattern of a pack
  383. expansion to determine what kind of entity we're converting.
  384. (coerce_template_parameter_pack): When we have coerced a non-type
  385. template parameter pack, substitute into the type of that pack.
  386. (tsubst_pack_expansion): When our substitution of a parameter pack
  387. is a "trivial" substitution of itself, just substitute into the
  388. pack expansion rather than actually expanding.
  389. 2007-10-29 Jakub Jelinek <jakub@redhat.com>
  390. PR c++/33841
  391. * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
  392. for non-integral type bitfields. Return true if bitfield is correct, false
  393. error has been diagnosed.
  394. (check_field_decls): If check_bitfield_decl returned false, call also
  395. check_field_decl.
  396. 2007-10-28 Paolo Carlini <pcarlini@suse.de>
  397. Mark Mitchell <mark@codesourcery.com>
  398. PR c++/30659
  399. * pt.c (do_decl_instantiation): If the VAR_DECL is not a
  400. class member error out and return.
  401. 2007-10-27 Jakub Jelinek <jakub@redhat.com>
  402. * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
  403. to current_function_decl rather than 0.
  404. PR c++/33844
  405. * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
  406. ->* rather than .*.
  407. * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
  408. 2007-10-27 Jason Merrill <jason@redhat.com>
  409. PR c++/5247
  410. * call.c (convert_default_arg): Detect recursion.
  411. 2007-10-27 Jakub Jelinek <jakub@redhat.com>
  412. PR c++/33842
  413. * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
  414. * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
  415. OFFSETOF_EXPR.
  416. (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
  417. functions.
  418. * error.c (dump_expr): Handle OFFSETOF_EXPR.
  419. 2007-10-26 Jason Merrill <jason@redhat.com>
  420. PR c++/24791
  421. * pt.c (get_template_info): New fn.
  422. (template_class_depth): Use it.
  423. (push_template_decl_real): Check that the template args of the
  424. definition match the args of the previous declaration.
  425. 2007-10-26 Paolo Carlini <pcarlini@suse.de>
  426. PR c++/31988
  427. * decl2.c (coerce_new_type): Do not allow a default argument for
  428. the first parameter.
  429. 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
  430. PR c++/33839
  431. * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
  432. don't see the leading '('. Only lookup names if we get an
  433. IDENTIFIER_NODE.
  434. 2007-10-26 Jakub Jelinek <jakub@redhat.com>
  435. PR c++/33744
  436. * parser.c (cp_parser_parenthesized_expression_list): Set
  437. greater_than_is_operator_p to true in between the parens.
  438. 2007-10-26 Paolo Carlini <pcarlini@suse.de>
  439. PR c++/31747
  440. * decl.c (grokdeclarator): In case of conflicting specifiers
  441. just return error_mark_node.
  442. 2007-10-26 Ollie Wild <aaw@google.com>
  443. * expr.c (cxx_expand_expr): Removed.
  444. * cp-tree.h (exx_expand_expr): Removed.
  445. * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
  446. with c_expand_expr.
  447. 2007-10-25 Paolo Carlini <pcarlini@suse.de>
  448. PR c++/33843
  449. * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
  450. 2007-10-23 Jason Merrill <jason@redhat.com>
  451. PR c++/25950 (DR 391)
  452. * call.c (struct conversion): Remove check_copy_constructor_p.
  453. (reference_binding): Always bind a reference directly to a
  454. compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
  455. temporary creation.
  456. (check_constructor_callable): Remove.
  457. (convert_like_real): Don't call it.
  458. (initialize_reference): Don't call check_constructor_callable.
  459. (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
  460. LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
  461. conversions if LOOKUP_NO_TEMP_BIND.
  462. (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
  463. (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
  464. second conversion.
  465. * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
  466. 2007-10-22 Jakub Jelinek <jakub@redhat.com>
  467. PR c++/33372
  468. * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
  469. before checking if its type is integral.
  470. 2007-10-22 Jason Merrill <jason@redhat.com>
  471. PR c++/33620
  472. * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
  473. * pt.c (apply_late_template_attributes): Splice out dependent
  474. attributes from DECL_ATTRIBUTES.
  475. * decl.c (cxx_maybe_build_cleanup): Use build_address.
  476. 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  477. * typeck.c (build_binary_op) : Use appropriate warning option
  478. instead of unnamed warning.
  479. 2007-10-16 Paolo Carlini <pcarlini@suse.de>
  480. PR c++/31446
  481. * pt.c (current_template_args): Do not change TREE_LIST elements
  482. with a TREE_VALUE of error_mark_node.
  483. 2007-10-16 Mark Mitchell <mark@codesourcery.com>
  484. * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
  485. * decl.c (start_decl): Tidy.
  486. (start_decl_1): Call cp_apply_type_quals_to_decl after completing
  487. the type.
  488. (grokdeclarator): Clarify comment.
  489. 2007-10-14 Andrew Pinski <pinskia@gmail.com>
  490. PR c++/30303
  491. * decl.c (grokfndecl): Return NULL after the "definition of
  492. implicitly-declared" error happened.
  493. 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
  494. PR c++/26698
  495. * call.c (build_user_type_conversion_1): Do not consider conversion
  496. functions to convert a (possibly cv-qualified) object to the (possibly
  497. cv-qualified) same object type (or a reference to it), to a (possibly
  498. cv-qualified) base class of that type (or a reference to it).
  499. 2007-10-12 Paolo Carlini <pcarlini@suse.de>
  500. * pt.c (tsubst): Use template_parm_level_and_index.
  501. 2007-10-12 Jakub Jelinek <jakub@redhat.com>
  502. PR c++/32121
  503. * parser.c (cp_parser_compound_statement): Handle label-declarations
  504. at the beginning of the compound statement.
  505. (cp_parser_block_declaration): Issue diagnostics about __label__
  506. not at the beginning of a block.
  507. 2007-10-11 Paolo Carlini <pcarlini@suse.de>
  508. PR c++/33461
  509. * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
  510. to convert_template_argument.
  511. (coerce_template_parms): Return error_mark_node after fixed-length
  512. error.
  513. (tsubst_decl): Check for error_mark_node the return value of the
  514. first tsubst in 'case VAR_DECL'.
  515. 2007-10-08 Ollie Wild <aaw@google.com>
  516. * typeck2.c (digest_init): Call cplus_expand_constant after
  517. convert_for_initialization.
  518. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
  519. * expr.c (cplus_expand_constant): Updated function description.
  520. 2007-10-04 Jason Merrill <jason@redhat.com>
  521. PR c++/20416
  522. * call.c (initialize_reference): Handle local static reference
  523. temps properly.
  524. 2007-10-03 Jason Merrill <jason@redhat.com>
  525. PR c++/32470
  526. * name-lookup.c (push_namespace_with_attrs): Fold back into...
  527. (push_namespace): Here.
  528. (handle_namespace_attrs): New fn for the attr code.
  529. (leave_scope): Don't pop_visibility.
  530. * name-lookup.h (struct cp_binding_level): Remove has_visibility.
  531. * parser.c (cp_parser_namespace_definition): Call
  532. handle_namespace_attrs and pop_visibility as appropriate.
  533. PR c++/11756
  534. * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
  535. 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
  536. * decl.c (duplicate_decls): Preserve linkage flags for mere
  537. redeclarations of gnu_inline definitions.
  538. 2007-10-03 Jason Merrill <jason@redhat.com>
  539. PR c++/15764
  540. * decl.c (wrap_cleanups_r): New fn.
  541. (wrap_temporary_cleanups): New fn.
  542. (initialize_local_var): Call it.
  543. 2007-09-29 Jason Merrill <jason@redhat.com>
  544. PR c++/33094
  545. * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
  546. constant to not have DECL_EXTERNAL if it's file-local.
  547. 2007-09-28 Ollie Wild <aaw@google.com>
  548. Revert
  549. 2007-09-27 Ollie Wild <aaw@google.com>
  550. * typeck2.c (digest_init): Call cplus_expand_constant after
  551. convert_for_initialization.
  552. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
  553. * expr.c (cplus_expand_constant): Updated function description.
  554. 2007-09-28 Jason Merrill <jason@redhat.com>
  555. PR c++/10179
  556. * class.c (layout_empty_base): Take rli parameter, update
  557. rli->record_align if empty base has user-specified alignment.
  558. (build_base_field): Pass rli to it.
  559. 2007-09-28 Paolo Carlini <pcarlini@suse.de>
  560. PR c++/33213
  561. * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
  562. 2007-09-28 Paolo Carlini <pcarlini@suse.de>
  563. PR c++/33118
  564. * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
  565. (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
  566. (dump_parameters): Just call dump_type for argument packs too.
  567. 2007-09-28 Jakub Jelinek <jakub@redhat.com>
  568. PR c++/31434
  569. * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
  570. qualification by creating qualified PACK_EXPANSION_PATTERN and
  571. then calling make_pack_expansion on it.
  572. 2007-09-27 Ollie Wild <aaw@google.com>
  573. * typeck2.c (digest_init): Call cplus_expand_constant after
  574. convert_for_initialization.
  575. * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
  576. * expr.c (cplus_expand_constant): Updated function description.
  577. 2007-09-27 Jason Merrill <jason@redhat.com>
  578. PR c++/33571
  579. * decl2.c (is_late_template_attribute): Don't crash on unknown
  580. attribute.
  581. 2007-09-27 Paolo Carlini <pcarlini@suse.de>
  582. PR c++/33493
  583. * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
  584. * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
  585. spaces in the formatting.
  586. * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
  587. 2007-09-27 Jakub Jelinek <jakub@redhat.com>
  588. * error.c (cxx_print_error_function): Add third argument, pass
  589. it over to lhd_print_error_function.
  590. (cp_print_error_function): If diagnostic->abstract_origin, print
  591. virtual backtrace.
  592. * cp-tree.h (struct diagnostic_info): New forward decl.
  593. (cxx_print_error_function): Add third argument.
  594. 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
  595. PR c++/33207
  596. * name-lookup.c (pushtag): Do not create an implicit typedef before
  597. the associated type declaration is known to be valid.
  598. 2007-09-25 Jakub Jelinek <jakub@redhat.com>
  599. * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
  600. rather than pointers.
  601. 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
  602. PR c++/14688
  603. * search.c (check_final_overrider): Fail if
  604. targetm.comp_type_attributes returns 0.
  605. 2007-09-24 Jason Merrill <jason@redhat.com>
  606. PR c++/33239
  607. * pt.c (resolve_typename_type): Don't look things up in the original
  608. template if it would mean losing template arguments.
  609. 2007-09-24 Jakub Jelinek <jakub@redhat.com>
  610. PR c++/33506
  611. * cp-tree.h (cxx_type_hash_eq): New prototype.
  612. * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
  613. * tree.c (cxx_type_hash_eq): New function.
  614. 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
  615. PR c++/33185
  616. * tree.c (cp_build_qualified_type_real): Build a canonical
  617. ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
  618. 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
  619. PR c++/33112
  620. PR c++/33185
  621. * tree.c (cplus_array_compare): Compare pointers, not types.
  622. (build_cplus_array_type_1): Store new array type into the hash
  623. table before building the canonical type; build the canonical type
  624. correctly.
  625. (cp_build_qualified_type_real): Put all of the array types with
  626. cv-qualified element types into the C++ array hash table, built as
  627. variants of the unqualified versions.
  628. 2007-09-23 Jason Merrill <jason@redhat.com>
  629. PR c++/16370
  630. * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
  631. for deprecation warnings.
  632. 2007-09-22 Jason Merrill <jason@redhat.com>
  633. PR c++/15269
  634. * call.c (build_over_call): Warn about deprecated virtuals.
  635. PR c++/19407
  636. * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
  637. (MAYBE_TAGGED_TYPE_P): Remove.
  638. * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
  639. instead of calling is_late_template_attribute again.
  640. (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
  641. (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
  642. Don't crash on typedefs from non-template classes.
  643. * decl2.c (grokfield): Don't sorry about attrs on template parms.
  644. (is_late_template_attribute): All attributes applied to template
  645. parms or typename types are dependent. Static.
  646. (splice_template_attributes): Pass decl through.
  647. (save_template_attributes): Likewise.
  648. 2007-09-20 Jakub Jelinek <jakub@redhat.com>
  649. PR c++/33496
  650. * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
  651. returned from tsubst_pack_expansion.
  652. (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
  653. (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
  654. 2007-09-20 Paolo Carlini <pcarlini@suse.de>
  655. PR c++/33460
  656. * semantics.c (finish_id_expression): Use consistently
  657. context_for_name_lookup.
  658. * decl.c (fixup_anonymous_aggr): Fix error message for
  659. anonymous struct (vs union).
  660. 2007-09-19 Jason Merrill <jason@redhat.com>
  661. PR c++/7586
  662. * pt.c (tsubst): Handle typedefs by looking for the specialization.
  663. (retrieve_specialization): Only tagged types use
  664. DECL_TEMPLATE_INSTANTIATIONS.
  665. (instantiate_class_template): Push nested classes too.
  666. (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
  667. tagged types.
  668. * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
  669. * init.c (is_aggr_type): Remove redundant tests.
  670. * class.c (push_nested_class): Use CLASS_TYPE_P.
  671. 2007-09-20 Paolo Carlini <pcarlini@suse.de>
  672. PR c++/33459
  673. * init.c (build_zero_init): If, recursively, build_zero_init
  674. returns a NULL_TREE, do not append it to the VEC of constructors.
  675. 2007-09-18 Jason Merrill <jason@redhat.com>
  676. PR c++/17743
  677. * pt.c (apply_late_template_attributes): Set processing_template_decl.
  678. (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
  679. ATTR_FLAG_TYPE_IN_PLACE.
  680. (tsubst): Do unqualified lookup to find typedefs from current class.
  681. [ARRAY_TYPE]: Propagate alignment info.
  682. * decl2.c (is_late_template_attribute): Only defer handling of
  683. attribute aligned if the expression is dependent.
  684. (save_template_attributes): If we're deferring any attributes,
  685. make this a naming typedef.
  686. 2007-09-18 Paolo Carlini <pcarlini@suse.de>
  687. PR c++/33462 (again)
  688. * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
  689. va_arg instead of __builtin_va_arg.
  690. 2007-09-18 Paolo Carlini <pcarlini@suse.de>
  691. PR c++/33462
  692. * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
  693. (pp_cxx_primary_expression): Use it.
  694. * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
  695. * error.c (dump_expr): Use it.
  696. 2007-09-18 Paolo Carlini <pcarlini@suse.de>
  697. PR c++/33463
  698. * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
  699. out case TYPEID_EXPR to...
  700. (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
  701. and pp_cxx_right_paren.
  702. * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
  703. * error.c (dump_expr): Use it.
  704. 2007-09-18 Paolo Carlini <pcarlini@suse.de>
  705. PR c++/33464
  706. * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
  707. (pp_cxx_primary_expression): Use it.
  708. * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
  709. * error.c (dump_expr): Use it.
  710. 2007-09-16 Paolo Carlini <pcarlini@suse.de>
  711. PR c++/33124
  712. * init.c (build_new): Remove warning for zero-element
  713. allocations.
  714. 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
  715. PR c++/32756
  716. * call.c (maybe_handle_implicit_object): Set this_p, clear
  717. rvaluedness_matches_p.
  718. (compare_ics): Do not compare rvaluedness matching when one of the
  719. operands is an implicit object.
  720. 2007-09-14 Jason Merrill <jason@redhat.com>
  721. PR c++/17743, c++/19163
  722. * decl2.c (is_late_template_attribute): New fn.
  723. (splice_template_attributes, save_template_attributes): New fns.
  724. (cplus_decl_attributes): Call save_template_attributes.
  725. * pt.c (apply_late_template_attributes): New fn.
  726. (instantiate_class_template, tsubst_decl): Use it.
  727. * cp-tree.h: Declare is_late_template_attribute.
  728. 2007-09-13 Tom Tromey <tromey@redhat.com>
  729. * parser.c (cp_lexer_new_main): Don't use
  730. c_lex_return_raw_strings.
  731. (cp_lexer_get_preprocessor_token): Update. Add special case when
  732. lexer is NULL.
  733. 2007-09-11 Jan Hubicka <jh@suse.cz>
  734. * method.c (use_thunk): Use tree_rest_of_compilation
  735. * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
  736. (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
  737. * cp-tree.h (expand_body): Kill.
  738. (emit_associated_thunks): Declare.
  739. * semantics.c (emit_associated_thunks): Export.
  740. (expand_body): Kill.
  741. 2007-09-09 David Daney <ddaney@avtrex.com>
  742. PR c++/33324
  743. * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
  744. to calculate cookie_ptr.
  745. 2007-09-08 Jason Merrill <jason@redhat.com>
  746. PR c++/33342
  747. * pt.c (most_specialized_class): Set processing_template_decl
  748. while tsubsting partial spec args.
  749. 2007-09-06 Jason Merrill <jason@redhat.com>
  750. * decl2.c (get_guard): Copy visibility from the guarded variable.
  751. 2007-09-06 Jan Hubicka <jh@suse.cz>
  752. * semantics.c (expand_body): Do not mark arguments of clones used.
  753. 2007-09-06 Paolo Carlini <pcarlini@suse.de>
  754. PR c++/32674
  755. * decl.c (cp_finish_decl): When processing_template_decl,
  756. deal correctly with init as TREE_LIST.
  757. 2007-09-06 Tom Tromey <tromey@redhat.com>
  758. * decl.c (finish_function): Put return's location on line zero of
  759. file.
  760. 2007-09-05 Jason Merrill <jason@redhat.com>
  761. PR c++/15745
  762. * except.c (prepare_eh_type): Use type_decays_to.
  763. PR c++/15097
  764. * init.c (build_delete): Use build_headof to get the address of the
  765. complete object if we aren't using the deleting destructor.
  766. * rtti.c (build_headof): No longer static.
  767. * cp-tree.h: Declare it.
  768. 2007-09-06 Jakub Jelinek <jakub@redhat.com>
  769. * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
  770. decl if a prototype for XX is provided with throw().
  771. PR c++/33289
  772. * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
  773. on __*_chk non-__builtin_* decls.
  774. 2007-09-05 Paolo Carlini <pcarlini@suse.de>
  775. PR c++/30302
  776. * semantics.c (finish_id_expression): Use context_for_name_lookup
  777. insted of DECL_CONTEXT, to see through anonymous structs and unions.
  778. * class.c (finish_struct_anon): Deal correctly with anonymous
  779. structs (vs unions, as GNU extension) in error messages.
  780. 2007-09-05 Jan Hubicka <jh@suse.cz>
  781. * sematics.c (expand_body): Remove unnecesary import_export_decl
  782. call, DECL_EXTERNAL checks and current_function_decl saving.
  783. 2007-09-05 Paolo Carlini <pcarlini@suse.de>
  784. PR c++/29731 (again)
  785. * parser.c (cp_parser_primary_expression): Return error_mark_node
  786. when a statement-expression is found in a template-argument list.
  787. 2007-09-04 Jason Merrill <jason@redhat.com>
  788. * except.c (initialize_handler_parm): Use
  789. fold_build_cleanup_point_expr.
  790. PR c++/31419
  791. * call.c (reference_binding): Don't look for user-defined conversions
  792. to the same type.
  793. PR c++/31411
  794. * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
  795. the MUST_NOT_THROW_EXPR.
  796. 2007-09-04 Richard Sandiford <richard@codesourcery.com>
  797. * decl.c (cp_finish_decl): Call determine_visibility before
  798. make_rtl_for_nonlocal_decl.
  799. 2007-09-04 Jason Merrill <jason@redhat.com>
  800. PR c++/14032
  801. * pt.c (most_specialized_class): Substitute outer template
  802. arguments into the arguments of a member template partial
  803. specialization.
  804. (strip_innermost_template_args): New fn.
  805. 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
  806. * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
  807. 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  808. * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
  809. * decl.c (cp_make_fname_decl): Likewise,
  810. * parser.c (cp_parser_string_literal): Likewise,
  811. * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
  812. * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
  813. Likewise,
  814. 2007-09-02 Paolo Carlini <pcarlini@suse.de>
  815. PR c++/33208
  816. * typeck.c (build_unary_op): Fix error message for
  817. Boolean expression as operand to operator--.
  818. 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  819. * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
  820. * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
  821. Likewise.
  822. 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
  823. PR c++/32597
  824. * init.c (build_default_init): Make extern.
  825. * cp-tree.h (build_default_init): Declare here.
  826. * pt.c (tsubst_expr): When the instantiation of the initializer of
  827. a variable results in an empty list, default-initialize the
  828. variable.
  829. (tsubst_copy_and_build): When the instantiation of the initializer
  830. in a new expression results in an empty initializer list,
  831. default-initialize it.
  832. 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
  833. * mangle.c (write_type): Change mangling of rvalue reference from
  834. `RR' to `O'.
  835. 2007-08-31 Jakub Jelinek <jakub@redhat.com>
  836. * decl.c (duplicate_decls): Remove duplicated line.
  837. 2007-08-31 Paolo Carlini <pcarlini@suse.de>
  838. PR c++/33210
  839. * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
  840. BOUND_TEMPLATE_TEMPLATE_PARM.
  841. 2007-08-31 Paolo Carlini <pcarlini@suse.de>
  842. PR c++/32113
  843. * search.c (lookup_member): Check the name argument for
  844. error_mark_node.
  845. 2007-08-31 Paolo Carlini <pcarlini@suse.de>
  846. PR c++/33212
  847. * parser.c (cp_parser_trait_expr): Check rerurn value of
  848. cp_parser_type_id.
  849. 2007-08-30 Ollie Wild <aaw@google.com>
  850. * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
  851. convert_ptrmem for pointer to member conversions.
  852. (convert_to_pointer_force): Update cp_convert_to_pointer call.
  853. (ocp_convert): Update cp_convert_to_pointer call.
  854. * typeck.c (convert_ptrmem): Add conditional for null pointers to
  855. members.
  856. (build_static_cast_1): Check can_convert for conversions in either
  857. direction.
  858. (get_delta_difference_1): New function.
  859. (get_delta_difference): Refactor to call get_delta_difference_1.
  860. 2007-08-30 Jakub Jelinek <jakub@redhat.com>
  861. * decl.c (start_preparsed_function): Set
  862. DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
  863. 2007-08-28 Paolo Carlini <pcarlini@suse.de>
  864. PR c++/33209
  865. * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
  866. BOUND_TEMPLATE_TEMPLATE_PARM.
  867. 2007-08-28 Jakub Jelinek <jakub@redhat.com>
  868. PR c++/32596
  869. PR c++/32400
  870. * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
  871. and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
  872. 2007-08-27 Jason Merrill <jason@redhat.com>
  873. PR c++/29000
  874. * pt.c (build_non_dependent_expr, type_dependent_expression_p):
  875. Look inside STMT_EXPR.
  876. * semantics.c (stmt_expr_value_expr): New fn.
  877. * cp-tree.h: Declare it.
  878. PR c++/28558
  879. * decl.c (groktypename): Ignore attributes applied to class type.
  880. 2007-08-28 Richard Guenther <rguenther@suse.de>
  881. * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
  882. 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
  883. * error.c (dump_expr): Handle COMPLEX_CST.
  884. * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
  885. (pp_cxx_expression): Likewise.
  886. 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
  887. * decl.c (GNU_INLINE_P): New.
  888. (duplicate_decls): Handle gnu_inline. Merge attributes and
  889. some flags in overriding definitions.
  890. (redeclaration_error_message): Handle gnu_inline.
  891. (start_preparsed_function): Likewise.
  892. 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  893. * call.c (sufficient_parms_p): Constify.
  894. * class.c (same_signature_p): Likewise.
  895. * cp-gimplify.c (is_invisiref_parm,
  896. cxx_omp_privatize_by_reference): Likewise.
  897. * cp-objcp-common.c (has_c_linkage): Likewise.
  898. * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
  899. sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
  900. grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
  901. num_artificial_parms_for, comp_template_parms,
  902. template_parameter_pack_p, any_dependent_template_arguments_p,
  903. any_type_dependent_arguments_p, any_value_dependent_elements_p,
  904. repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
  905. zero_init_p, member_p, cp_lvalue_kind,
  906. builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
  907. varargs_function_p, is_dummy_object, special_function_kind,
  908. string_conv_p, type_unknown_p, comp_except_specs, compparms,
  909. comp_cv_qualification, is_bitfield_expr_with_lowered_type,
  910. unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
  911. cp_has_mutable_p, at_least_as_qualified_p,
  912. invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
  913. * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
  914. * except.c (nothrow_libfn_p): Likewise.
  915. * method.c (skip_artificial_parms_for, num_artificial_parms_for):
  916. Likewise.
  917. * pt.c (comp_template_parms, template_parameter_pack_p,
  918. any_type_dependent_arguments_p, any_value_dependent_elements_p,
  919. any_dependent_template_arguments_p): Likewise.
  920. * repo.c (repo_export_class_p): Likewise.
  921. * semantics.c (anon_aggr_type_p): Likewise.
  922. * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
  923. builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
  924. varargs_function_p, member_p, is_dummy_object, pod_type_p,
  925. zero_init_p, special_function_p): Likewise.
  926. * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
  927. comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
  928. compparms, invalid_nonstatic_memfn_p,
  929. is_bitfield_expr_with_lowered_type, unlowered_expr_type,
  930. string_conv_p, ptr_reasonably_similar, cp_type_readonly,
  931. cp_has_mutable_p, lvalue_or_else): Likewise.
  932. 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
  933. * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
  934. * cp-objcp-common.c (cp_tree_size): Ditto.
  935. * tree.c (cp_walk_subtrees): Ditto
  936. * cp-tree.def (TINST_LEVEL): Go away.
  937. * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
  938. move together with other non-tree structs.
  939. (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
  940. (union lang_tree_node): Eliminate tinst_level field.
  941. (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
  942. (current_instantiation, outermost_tinst_level): Return
  943. a "struct tinst_level *".
  944. * error.c (print_instantiation_partial_context): Change second
  945. parameter to a "struct tinst_level *". Replace accessor macros
  946. with field access.
  947. (print_instantiation_full_context): Likewise.
  948. * lex.c (in_main_input_context): Likewise.
  949. * pt.c (struct pending_templates): New.
  950. (pending_templates, last_pending_template): Use it as a type.
  951. (current_tinst_level): Change typo to "struct tinst_level *"
  952. (reopen_tinst_level): Accept "struct tinst_level *", return decl.
  953. (add_pending_template): Construct a "struct pending_template".
  954. Replace TINST_LEVEL accessor macros with field access.
  955. (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
  956. (pop_tinst_level): Likewise.
  957. (instantiate_pending_templates): Likewise. Factor common code used
  958. when an instantiation has been done.
  959. (outermost_tinst_level): Replace tree_last with loop.
  960. (current_instantiation): Return a "struct tinst_level *".
  961. 2007-08-24 Ollie Wild <aaw@google.com>
  962. * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
  963. * name-lookup.h (cp_binding_level): Remove vtables member.
  964. 2007-08-24 Richard Guenther <rguenther@suse.de>
  965. * tree.c (cp_cannot_inline_tree_fn): Remove.
  966. * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
  967. * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
  968. Remove define.
  969. 2007-08-24 Jakub Jelinek <jakub@redhat.com>
  970. PR c++/32567
  971. * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
  972. error_mark_node right away if build_expr_type_conversion
  973. returned it.
  974. PR c++/32898
  975. * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
  976. is error_mark_node rather than NULL_TREE.
  977. * pt.c (check_explicit_specialization): Likewise.
  978. PR c++/31941
  979. * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
  980. TARGET_VTABLE_USES_DESCRIPTORS targets properly.
  981. 2007-08-22 Jason Merrill <jason@redhat.com>
  982. PR c++/29365
  983. * pt.c (outermost_tinst_level): New function.
  984. * lex.c (in_main_input_context): New function.
  985. * cp-tree.h: Declare it.
  986. * decl2.c (constrain_class_visibility): Use it to avoid warning
  987. about uses of the anonymous namespace in the main input file.
  988. 2007-08-21 Jakub Jelinek <jakub@redhat.com>
  989. * init.c (build_new_1): Use get_target_expr instead of save_expr.
  990. 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
  991. PR c++/7302
  992. * class.c (finish_struct_1): Warn when a class has virtual
  993. functions and accessible non-virtual destructor.
  994. 2007-08-20 Richard Guenther <rguenther@suse.de>
  995. PR c++/22369
  996. PR c++/22451
  997. * call.c (build_new_method_call): Convert initializer to
  998. the basetype.
  999. * init.c (build_aggr_init): Do not fiddle with types.
  1000. (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
  1001. * except.c (build_throw): Do not drop qualifiers for the
  1002. pointer type.
  1003. * typeck.c (get_member_function_from_ptrfunc): Do not
  1004. fiddle with types, instead convert.
  1005. (build_ptrmemfunc1): Convert to the target type for
  1006. initialization.
  1007. (gfc_trans_allocate): Convert result to target type.
  1008. * cp-objcp-common.c (cxx_get_alias_set): Pointers to
  1009. pointer-to-member structures shall have alias set zero as well.
  1010. 2007-08-20 Richard Guenther <rguenther@suse.de>
  1011. * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
  1012. Remove.
  1013. * cp-tree.h (cp_auto_var_in_fn_p): Remove.
  1014. (nonstatic_local_decl_p): Likewise.
  1015. * tree.c (cp_auto_var_in_fn_p): Remove.
  1016. * decl.c (nonstatic_local_decl_p): Remove.
  1017. 2007-08-20 Richard Guenther <rguenther@suse.de>
  1018. * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
  1019. Remove define.
  1020. * tree.h (cp_walk_tree): New define to walk_tree_1 with
  1021. cp_walk_subtrees lh parameter.
  1022. (cp_walk_tree_without_duplicates): New define to
  1023. walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
  1024. * tree.c (count_trees): Call
  1025. cp_walk_tree_without_duplicates.
  1026. (verify_stmt_tree): Call cp_walk_tree.
  1027. (break_out_target_exprs): Likewise.
  1028. (WALK_SUBTREE): Likewise.
  1029. * cp-gimplify.c (cp_genericize): Likewise.
  1030. * cp-pt.c (find_parameter_packs_r): Likewise.
  1031. (uses_parameter_packs): Likewise.
  1032. (make_pack_expansion): Likewise.
  1033. (check_for_bare_parameter_packs): Likewise.
  1034. (for_each_template_parm): Likewise.
  1035. * decl.c (check_default_argument): Call
  1036. cp_walk_tree_without_duplicates.
  1037. * except.c (build_throw): Likewise.
  1038. * decl2.c (type_visibility): Likewise.
  1039. * semantics.c (expand_or_defer_fn): Likewise.
  1040. (finalize_nrv): Call cp_walk_tree.
  1041. 2007-08-20 Jakub Jelinek <jakub@redhat.com>
  1042. PR c++/33025
  1043. * init.c (build_new_1): Rename placement_var variable to placement_expr.
  1044. Initialize it with save_expr rather than get_temp_regvar.
  1045. 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1046. PR c++/28989
  1047. * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
  1048. lvalues.
  1049. 2007-08-17 Ollie Wild <aaw@google.com>
  1050. PR c++/31749
  1051. * name-lookup.c (do_nonmember_using_decl): Shift implicit type
  1052. declarations into appropriate slots for comparison. Fix type
  1053. comparison.
  1054. 2007-08-17 Paolo Carlini <pcarlini@suse.de>
  1055. PR c++/32112
  1056. * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
  1057. * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
  1058. 2007-08-17 Paolo Carlini <pcarlini@suse.de>
  1059. PR c++/32870
  1060. * parser.c (cp_parser_class_head): Improve error message.
  1061. 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
  1062. * pt.c (instantiate_decl): Set input_location
  1063. for the function end.
  1064. 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1065. * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
  1066. Constify.
  1067. * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
  1068. class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
  1069. cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
  1070. cxx_warn_unused_global_decl, cp_expr_size): Likewise.
  1071. * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
  1072. * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
  1073. * typeck.c (cp_type_quals): Likewise.
  1074. * typeck2.c (cxx_incomplete_type_diagnostic,
  1075. cxx_incomplete_type_error): Likewise.
  1076. 2007-08-16 Paolo Carlini <pcarlini@suse.de>
  1077. PR c++/31132
  1078. * pt.c (tsubst_friend_function): When check_classfn
  1079. returns error_mark_node likewise return it.
  1080. 2007-08-15 Jakub Jelinek <jakub@redhat.com>
  1081. PR c++/32992
  1082. * typeck.c (check_return_expr): Don't NRV optimize vars in
  1083. anonymous unions.
  1084. * decl.c (finish_function): Comment fix.
  1085. 2007-08-15 Paolo Carlini <pcarlini@suse.de>
  1086. PR c++/33035
  1087. * pt.c (push_template_decl_real): Depending on TYPE_P
  1088. use either TYPE_CONTEXT or DECL_CONTEXT.
  1089. 2007-08-14 Mark Mitchell <mark@codesourcery.com>
  1090. * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
  1091. constructors and destructors return this.
  1092. 2007-08-14 Paolo Carlini <pcarlini@suse.de>
  1093. PR c++/27211
  1094. * decl2.c (check_classfn): Return error_mark_node in case of error;
  1095. in that case, do not call add_method.
  1096. * decl.c (start_decl): Deal with check_classfn returning
  1097. error_mark_node.
  1098. (grokfndecl): Likewise.
  1099. * pt.c (tsubst_friend_function): Likewise.
  1100. 2007-08-14 Andrew Pinski <pinskia@gmail.com>
  1101. PR c++/30428
  1102. * typeck.c (build_binary_op): Disallow vector float types with
  1103. BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
  1104. 2007-08-11 Ian Lance Taylor <iant@google.com>
  1105. * cp-objcp-common.c (cxx_get_alias_set): Change return type to
  1106. alias_set_type.
  1107. * cp-tree.h (cxx_get_alias_set): Update declaration.
  1108. 2007-08-10 Ollie Wild <aaw@google.com>
  1109. * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
  1110. type lookups.
  1111. (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
  1112. function parameter.
  1113. (unqualified_namespace_lookup): Fix ambiguous_decl call.
  1114. (lookup_using_namespace): Fix ambiguous_decl call.
  1115. (qualified_lookup_using_namespace): Fix ambiguous_decl call.
  1116. 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1117. * call.c (name_as_c_string): Use CONST_CAST.
  1118. * decl.c (build_decl): Likewise.
  1119. * parser.c (cp_parser_string_literal): Likewise.
  1120. 2007-08-10 Paolo Carlini <pcarlini@suse.de>
  1121. PR c++/17763
  1122. * error.c (dump_expr): Consistently use the *_cxx_*
  1123. variants of the pretty-print functions.
  1124. 2007-08-10 Paolo Carlini <pcarlini@suse.de>
  1125. PR c++/22256
  1126. * decl.c (check_special_function_return_type): Just error
  1127. on return type specified for conversion operator.
  1128. 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
  1129. * typeck2.c (readonly_error): Handle general expressions.
  1130. * error.c (dump_expr): Handle POINTER_PLUS_EXPR
  1131. 2007-08-06 Dan Hipschman <dsh@google.com>
  1132. * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
  1133. access function name.
  1134. 2007-08-04 Alfred Minarik <a.minarik@aon.at>
  1135. PR pch/13676
  1136. * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
  1137. * g++spec.c (lang_specific_driver): Check them.
  1138. 2007-08-06 Paolo Carlini <pcarlini@suse.de>
  1139. PR c++/19532
  1140. * pt.c (inline_needs_template_parms): Fix comment; change return type
  1141. to bool.
  1142. 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
  1143. Revert:
  1144. 2007-03-26 Dirk Mueller <dmueller@suse.de>
  1145. * parser.c (cp_parser_member_declaration): Pedwarn
  1146. about stray semicolons after member declarations.
  1147. 2007-08-02 Lee Millward <lee.millward@gmail.com>
  1148. PR c++/30849
  1149. PR c++/30850
  1150. PR c++/30851
  1151. * parser.c (cp_parser_asm_definition): Detect and discard asm
  1152. statements with invalid inputs or outputs.
  1153. (cp_parser_asm_operand_list): Return error mark node if any
  1154. of the operands are invalid. Adjust documentation.
  1155. 2007-08-02 Nick Clifton <nickc@redhat.com>
  1156. * typeck.c: Change copyright header to refer to version 3 of the
  1157. GNU General Public License and to point readers at the COPYING3
  1158. file and the FSF's license web page.
  1159. * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
  1160. config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
  1161. Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
  1162. cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
  1163. tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
  1164. cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
  1165. cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
  1166. name-lookup.h, parser.c: Likewise.
  1167. 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1168. PR middle-end/32668
  1169. * call.c (magic_varargs_p): Honor the "type generic" attribute.
  1170. 2007-07-30 Paolo Carlini <pcarlini@suse.de>
  1171. PR c++/32108
  1172. * semantics.c (finish_label_stmt): Reject the __label__
  1173. extension outside function scopes.
  1174. 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1175. * parser.c (eof_token): Un-constify.
  1176. (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
  1177. cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
  1178. casts.
  1179. 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
  1180. * pt.c, tree.c, typeck2.c: Fix comment typos.
  1181. 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
  1182. Mark Mitchell <mark@codesourcery.com>
  1183. PR c++/30917
  1184. * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
  1185. hidden due to friend declarations in local classes.
  1186. 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
  1187. * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
  1188. * cp-tree.def (DECLTYPE_TYPE): New.
  1189. * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
  1190. (dump_type_prefix): Ditto.
  1191. (dump_type_suffix): Ditto.
  1192. * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
  1193. * mangle.c (write_type): Handle DECLTYPE_TYPE.
  1194. * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
  1195. types.
  1196. (DECLTYPE_TYPE_EXPR): New.
  1197. (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
  1198. (finish_declared_type): Declare.
  1199. * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
  1200. DECLTYPE_TYPE nodes.
  1201. (pp_cxx_type_id): Ditto.
  1202. * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
  1203. (tsubst): Substitute into a DECLTYPE_TYPE node.
  1204. (tsubst_copy): Ditto.
  1205. (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
  1206. nodes.
  1207. (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
  1208. * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
  1209. structural equality (because we can't hash the expressions).
  1210. (finish_declared_type): New.
  1211. * lex.c (reswords): Add "decltype" keyword.
  1212. * parser.c cp_lexer_next_token_is_decl_specifier_keyword
  1213. (cp_parser_postfix_expression): Add member_access_only_p to
  1214. restrict postfix expression to member access expressions.
  1215. (cp_parser_unary_expression): Update call to
  1216. cp_parser_postfix_expression to reflect new parameter.
  1217. (cp_parser_declared_type): New.
  1218. (cp_parser_simple_type_specifier): Parse decltype types.
  1219. 2007-07-27 Mark Mitchell <mark@codesourcery.com>
  1220. PR c++/32346
  1221. * call.c (convert_for_arg_passing): Only widen bitfields to their
  1222. declared types if necessary.
  1223. 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1224. * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
  1225. Constify.
  1226. 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1227. * decl.c (typename_hash, typename_compare): Constify.
  1228. * mangle.c (hash_type, compare_type): Likewise.
  1229. * pt.c (eq_local_specializations, hash_local_specialization):
  1230. Likewise.
  1231. * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
  1232. list_hash): Likewise.
  1233. * typeck2.c (pat_compare): Likewise.
  1234. 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
  1235. * method.c (implicitly_declare_fn): Increase alignment if member
  1236. function pointer format requires it.
  1237. 2007-07-24 Paolo Carlini <pcarlini@suse.de>
  1238. PR c++/29001
  1239. * typeck.c (check_return_expr): Do not pass a null argument
  1240. to null_ptr_cst_p.
  1241. 2007-07-24 Paolo Carlini <pcarlini@suse.de>
  1242. PR c++/32561
  1243. * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
  1244. only on VAR_DECL.
  1245. 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
  1246. PR c++/32839
  1247. * typeck.c (convert_arguments): Only use default args if we have
  1248. a function decl.
  1249. PR c++/30818
  1250. * typeck.c (structural_comptypes): No need to check
  1251. resolve_typename_type return value here.
  1252. * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
  1253. * pt.c (resolve_typename_type): Follow typename typedefs. Return
  1254. original type rather than error_mark_node in case of failure.
  1255. * parser.c (cp_parser_nested_name_specifier_opt): Adjust
  1256. resolve_typename_type result check.
  1257. (cp_parser_direct_declarator, cp_parser_head,
  1258. cp_parser_constructor_declarator_p): Likewise.
  1259. 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
  1260. * pt.c (template_parms_variadic_p): Remove.
  1261. * cp-tree.h: Remove the prototype for template_parms_variadic_p.
  1262. 2007-07-12 Jakub Jelinek <jakub@redhat.com>
  1263. PR c++/30854
  1264. * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
  1265. argument to dump_aggr_init_expr_args instead of false.
  1266. 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
  1267. * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
  1268. canonical types; otherwise, fall back to structural type
  1269. comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
  1270. internal compiler error if the canonical types are wrong.
  1271. 2007-07-11 Paolo Carlini <pcarlini@suse.de>
  1272. PR c++/32560
  1273. * parser.c (cp_parser_make_indirect_declarator): When the
  1274. the code argument is ERROR_MARK return cp_error_declarator.
  1275. 2007-07-09 Geoffrey Keating <geoffk@apple.com>
  1276. PR 32617
  1277. * decl.c (cxx_init_decl_processing): Don't set
  1278. force_align_functions_log.
  1279. (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
  1280. * typeck.c (cxx_alignof_expr): When alignof is used on a plain
  1281. FUNCTION_DECL, return its alignment.
  1282. 2007-07-09 Richard Guenther <rguenther@suse.de>
  1283. * decl.c (start_preparsed_function): Do not promote return type.
  1284. 2007-07-08 Paolo Carlini <pcarlini@suse.de>
  1285. PR c++/30535
  1286. * pt.c (unify): Never pass error_mark_node to template_decl_level.
  1287. 2007-07-07 Mark Mitchell <mark@codesourcery.com>
  1288. PR c++/32232
  1289. * pt.c (resolve_overloaded_unification): Robustify. Return a
  1290. bool, not an int.
  1291. (type_unification_real): Adjust accordingly.
  1292. 2007-07-06 Richard Guenther <rguenther@suse.de>
  1293. * init.c (build_new_1): Use the correct pointer type.
  1294. * typeck2.c (build_m_component_ref): Likewise.
  1295. 2007-07-05 Mark Mitchell <mark@codesourcery.com>
  1296. PR c++/32245
  1297. * init.c (build_zero_init): Always build an initializer for
  1298. non-static storage.
  1299. * typeck2.c (build_functional_cast): Use build_zero_init.
  1300. PR c++/32251
  1301. * init.c (build_new_1): Always pass the allocation function to
  1302. build_op_delete_call.
  1303. * call.c (build_op_delete_call): Handle operator delete with a
  1304. variable-argument list. Do not issue an error when no matching
  1305. deallocation function is available for a new operator.
  1306. PR c++/31992
  1307. * cp-tree.h (any_value_dependent_elements_p): Declare it.
  1308. * decl.c (value_dependent_init_p): New function.
  1309. (cp_finish_decl): Use it.
  1310. * pt.c (value_dependent_expression_p): Use
  1311. any_value_dependent_elements_p.
  1312. * parser.c (cp_parser_primary_expression): Add comment about
  1313. treating dependent qualified names as integral
  1314. constant-expressions.
  1315. 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
  1316. * decl.c (build_ptrmemfunc_type): Always use structural equality
  1317. tests when comparing pointer-to-member-function types, because the
  1318. handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
  1319. types.
  1320. 2007-07-03 Mark Mitchell <mark@codesourcery.com>
  1321. * init.c (build_new): Tweak comment.
  1322. 2007-06-29 Dave Brolley <brolley@redhat.com>
  1323. PR c++/31743
  1324. * parser.c (cp_parser_new_type_id): Don't reduce a named array
  1325. type to its base type and number of elements here.
  1326. * init.c (build_new): Call complete_type_or_else to ensure that the
  1327. type is complete and to issue a diagnostic if it is not.
  1328. (build_new_1): Don't call complete_type_or_else here.
  1329. 2007-07-03 Richard Guenther <rguenther@suse.de>
  1330. PR c++/32609
  1331. * class.c (fixed_type_or_null): Re-lookup the hashtable slot
  1332. after recursing.
  1333. 2007-07-02 Simon Baldwin <simonb@google.com>
  1334. * parser.c (cp_parser_elaborated_type_specifier): Added a warning
  1335. for inner-style nested forward declarations that don't declare
  1336. anything useful.
  1337. 2007-07-02 Jakub Jelinek <jakub@redhat.com>
  1338. PR c++/31748
  1339. * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
  1340. DECL_P in not a variable and appears more than once error messages.
  1341. 2007-07-01 Ollie Wild <aaw@google.com>
  1342. * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
  1343. (select_decl): Remove function.
  1344. (unqualified_namespace_lookup): Populate binding by calling
  1345. ambiguous_decl. Remove select_decl call.
  1346. (lookup_qualified_name): Remove select_decl call.
  1347. * decl.c (lookup_and_check_tag): Check for ambiguous references.
  1348. * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
  1349. generation when name lookup is ambiguous.
  1350. 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
  1351. PR c++/31724
  1352. * init.c (build_new_1): Use structural equality on the copy of the
  1353. array type.
  1354. 2007-06-28 Geoffrey Keating <geoffk@apple.com>
  1355. * decl2.c (determine_visibility): Implement
  1356. flag_visibility_ms_compat effect on type info.
  1357. * decl.c (cxx_init_decl_processing): Implement
  1358. global effect of flag_visibility_ms_compat.
  1359. 2007-06-28 Geoffrey Keating <geoffk@apple.com>
  1360. * decl2.c (start_objects): Mark constructor-running function
  1361. as artificial.
  1362. 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
  1363. PR c++/32111
  1364. * decl.c (grokdeclarator): Reset friendp for member functions declared
  1365. friend of their own class.
  1366. 2007-06-23 Mark Mitchell <mark@codesourcery.com>
  1367. * decl2.c (determine_visibility): Don't look for dllexport here.
  1368. (determine_visibility_from_class): Tidy.
  1369. 2007-06-18 Simon Baldwin <simonb@google.com>
  1370. PR c++/31923
  1371. * parser.c (cp_parser_single_declaration): Added check for storage
  1372. class other than sc_none in parsed declaration, and a flag to indicate
  1373. if the call is part of an explicit template specialization parse.
  1374. * (cp_parser_explicit_specialization): Specialization check flag added
  1375. to call to cp_parser_single_declaration(), set true.
  1376. * (cp_parser_template_declaration_after_export): Specialization check
  1377. flag added to call to cp_parser_single_declaration(), set false.
  1378. * pt.c (check_explicit_specialization): Added code to copy visiblity
  1379. and linkage from the templated function to the explicit specialization.
  1380. 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1381. * typeck.c (build_binary_op): For templates build the
  1382. expression in pieces to avoid the assert in build2_stat.
  1383. (get_member_function_from_ptrfunc):
  1384. Change over to using POINTER_PLUS_EXPR and convert
  1385. the second operand to sizetype.
  1386. * typeck2.c (build_m_component_ref): Likewise.
  1387. * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
  1388. instead of PLUS_EXPR for pointers.
  1389. (build_new_1): Likewise.
  1390. (build_vec_delete_1): Likewise.
  1391. (build_vec_delete): Likewise.
  1392. * class.c (build_base_path): Likewise.
  1393. (build_base_path): Likewise.
  1394. (convert_to_base_statically): Likewise.
  1395. (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
  1396. (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
  1397. instead of PLUS_EXPR.
  1398. (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
  1399. instead of PLUS_EXPR for pointers.
  1400. * call.c (build_special_member_call): Likewise.
  1401. * rtti.c (build_headof): Likewise.
  1402. Use sizetype instead of ptrdiff_type_node.
  1403. (tinfo_base_init): Create a POINTER_PLUS_EXPR
  1404. instead of PLUS_EXPR for pointers.
  1405. * except.c (expand_start_catch_block): Do a
  1406. NEGATIVE and then a POINTER_PLUS_EXPR instead
  1407. of a MINUS_EXPR.
  1408. * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
  1409. PLUS_EXPR on pointer types over to use
  1410. POINTER_PLUS_EXPR and remove the conversion
  1411. to the pointer types.
  1412. * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
  1413. adding to a pointer type. Use size_int instead of
  1414. ssize_int. Convert the index to sizetype before
  1415. adding it to the pointer.
  1416. 2007-06-15 Mark Mitchell <mark@codesourcery.com>
  1417. * cp-tree.h (DECL_VAR_MARKED_P): Remove.
  1418. (DECL_ANON_UNION_VAR_P): New macro.
  1419. * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
  1420. than DECL_VAR_MARKED_P, to keep track of which variables we have
  1421. seen.
  1422. * decl.c (redeclaration_error_message): Complain about redeclaring
  1423. anonymous union members at namespace scope.
  1424. * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
  1425. 2007-06-14 Geoff Keating <geoffk@apple.com>
  1426. * decl2.c (determine_visibility): Ensure that functions with
  1427. hidden types as parameters are hidden.
  1428. PR 31093
  1429. * decl2.c (determine_visibility): Remove duplicate code for
  1430. handling type info.
  1431. 2007-06-12 Ian Lance Taylor <iant@google.com>
  1432. PR libstdc++/29286
  1433. * init.c (avoid_placement_new_aliasing): New static function.
  1434. (build_new_1): Call it.
  1435. 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
  1436. * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
  1437. (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
  1438. 2007-06-08 Jakub Jelinek <jakub@redhat.com>
  1439. PR c++/32177
  1440. * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
  1441. on init, the non-decl cond operand and increment value.
  1442. 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
  1443. PR c++/30759
  1444. * decl.c (check_initializer): Report an error when a brace enclosed
  1445. initializer is used for a non-aggregate type in C++98.
  1446. (redeclaration_error_message): Rewrote flag_cpp0x in terms of
  1447. cxx_dialect.
  1448. (grokdeclarator): Likewise.
  1449. (move_fn_p): Likewise.
  1450. * typeck.c (check_return_expr): Likewise.
  1451. * call.c (reference_binding): Likewise.
  1452. * error.c (cp_cpp_error): Likewise.
  1453. * pt.c (check_default_tmpl_args): Likewise.
  1454. (tsubst): Likewise.
  1455. * lex.c (init_reswords): Likewise.
  1456. * parser.c (p_parser_primary_expression): Likewise.
  1457. (TOKEN_PRECEDENCE): Likewise.
  1458. (cp_parser_init_declarator): Likewise.
  1459. (cp_parser_ptr_operator): Likewise.
  1460. (cp_parser_parameter_declaration): Likewise.
  1461. (cp_parser_enclosed_template_argument_list): Likewise.
  1462. (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
  1463. (cp_parser_next_token_ends_template_argument_p): Likewise.
  1464. 2007-06-04 Simon Baldwin <simonb@google.com>
  1465. * decl.c (grokdeclarator): Readability change. Moved case labels
  1466. into direct switch statement scope.
  1467. 2007-06-04 Paolo Carlini <pcarlini@suse.de>
  1468. * call.c (convert_like_real): Remove pointless code.
  1469. 2007-05-31 Mark Mitchell <mark@codesourcery.com>
  1470. * decl.c (get_atexit_fn_ptr_type): New function.
  1471. (get_atexit_node): Use it.
  1472. (start_cleanup_fn): Likewise.
  1473. (register_dtor_fn): Use the object's destructor, instead of a
  1474. separate cleanup function, where possible.
  1475. * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
  1476. (atexit_fn_ptr_type_node): New macro.
  1477. * decl2.c (build_cleanup): Use build_address.
  1478. 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
  1479. * typeck.c (build_binary_op): Include types in error.
  1480. 2007-05-31 Jakub Jelinek <jakub@redhat.com>
  1481. PR c++/31806
  1482. * decl.c (cp_finish_decl): Also clear was_readonly if a static var
  1483. needs runtime initialization.
  1484. 2007-05-31 Paolo Carlini <pcarlini@suse.de>
  1485. PR c++/32158
  1486. * semantics.c (finish_trait_expr): Complete the types.
  1487. 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
  1488. Douglas Gregor <doug.gregor@gmail.com>
  1489. Pedro Lamarao <pedro.lamarao@mndfck.org>
  1490. Howard Hinnant <howard.hinnant@gmail.com>
  1491. PR c++/7412
  1492. PR c++/29939
  1493. * typeck.c (comptypes): Don't consider rvalue and lvalue
  1494. reference types to be equivalent.
  1495. (check_return_expr): Move from certain lvalues when returning
  1496. them.
  1497. * decl.c (grokdeclarator): Implement reference collapsing.
  1498. (copy_fn_p): Don't consider constructors taking rvalue references
  1499. to be copy constructors.
  1500. (move_fn_p): New.
  1501. * call.c (conversion): New "rvaluedness_matches_p" member.
  1502. (convert_class_to_reference): Require reference type as first
  1503. parameter instead of base type.
  1504. (reference_binding): Add logic to handle rvalue references.
  1505. (implicit_conversion): Update inaccurate comment.
  1506. (convert_like_real): Disable creation of temporaries that are
  1507. impossible to initialize for types with move constructors.
  1508. (build_over_call): Elide move constructors when possible.
  1509. (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
  1510. (maybe_handle_ref_bind): Return conversion instead of type node.
  1511. (compare_ics): Add logic to use "rvaluedness_matches_p" values to
  1512. determine preferred conversion sequences.
  1513. * cp-tree.h (TYPE_REF_IS_RVALUE): New.
  1514. (LOOKUP_PREFER_RVALUE): New.
  1515. (DECL_MOVE_CONSTRUCTOR_P): New.
  1516. (struct cp_declarator): Add "reference" member for reference
  1517. types, with new "rvalue_ref" flag.
  1518. (cp_build_reference_type): Declare.
  1519. (move_fn_p): Declare.
  1520. * error.c (dump_type_prefix): Format rvalue reference types
  1521. correctly in error messages.
  1522. * except.c (build_throw): Move from certain lvalues when
  1523. throwing.
  1524. * mangle.c (write_type): Mangle rvalue references differently
  1525. than regular references.
  1526. * parser.c (make_reference_declarator): Add boolean parameter for
  1527. rvalue references.
  1528. (cp_parser_make_indirect_declarator): New.
  1529. (cp_parser_new_declarator_opt): Call
  1530. cp_parser_make_indirect_declarator.
  1531. (cp_parser_conversion_declarator_opt): Ditto.
  1532. (cp_parser_declarator): Ditto.
  1533. (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
  1534. declarators.
  1535. * pt.c (tsubst): Implement reference collapsing.
  1536. (maybe_adjust_types_for_deduction): Implement special template
  1537. parameter deduction rule for rvalue references.
  1538. (type_unification_real): Update calls to
  1539. maybe_adjust_types_for_deduction.
  1540. (try_one_overload): Ditto.
  1541. (unify_pack_expansion): Ditto.
  1542. * tree.c (lvalue_p_1): Handle rvalue reference types.
  1543. (cp_build_reference_type): New.
  1544. 2007-05-30 Jakub Jelinek <jakub@redhat.com>
  1545. PR c++/31809
  1546. * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
  1547. variables that need runtime initialization.
  1548. 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
  1549. PR c++/31339
  1550. * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
  1551. case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
  1552. case POSTDECREMENT_EXPR>): Return the error_mark_node
  1553. if either the real or imaginary parts would an
  1554. error_mark_node.
  1555. 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
  1556. Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1557. PR c++/31745
  1558. * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
  1559. token is a closing brace, false if there are no tokens left.
  1560. (cp_parser_namespace_alias_definition): Only consume the next token if
  1561. it is a closing brace.
  1562. * parser.c (cp_parser_class_specifier): Likewise.
  1563. 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
  1564. * semantics.c (finish_member_declaration): Fix a typo in the
  1565. last checkin.
  1566. 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
  1567. PR c++/31431
  1568. PR c++/31432
  1569. PR c++/31434
  1570. PR c++/31435
  1571. PR c++/31437
  1572. PR c++/31438
  1573. PR c++/31442
  1574. PR c++/31443
  1575. PR c++/31444
  1576. PR c++/31445
  1577. * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
  1578. * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
  1579. * pt.c (check_for_bare_parameter_packs): Return bool indicated
  1580. whether everything was okay. Fix indentation.
  1581. (push_template_decl_real): Check for bare parameter packs in
  1582. function parameters; where errors occur, mark the parameter types
  1583. with ERROR_MARK_NODEs to avert ICEs.
  1584. (coerce_template_parameter_pack): New.
  1585. (coerce_template_parms): Moved parameter pack coercion into
  1586. coerce_template_parameter_pack, and permit it anywhere in the
  1587. template parameter list (not just at the end). Parameter and
  1588. argument indices can vary (somewhat) separately now, so add
  1589. PARM_IDX and ARG_IDX.
  1590. (fn_type_unification): Don't set an argument pack as incomplete if
  1591. no argument pack was deduced.
  1592. (type_unification_real): If a type parameter is a parameter pack
  1593. and has not otherwise been deduced, it will be deduced to an empty
  1594. parameter pack.
  1595. (more_specialized_fn): Use the actual lengths of the argument
  1596. lists when comparing against expansions.
  1597. * semantics.c (finish_member_declaration): If a field's type has
  1598. bare parameter packs, error and set its type to ERROR_MARK_NODE.
  1599. 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
  1600. PR target/27067
  1601. * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
  1602. 2007-05-22 Ollie Wild <aaw@google.com>
  1603. * name-lookup.c (ambiguous_decl): Adds check for hidden types.
  1604. (unqualified_namespace_lookup): Adds check for hidden types.
  1605. 2007-05-22 Ollie Wild <aaw@google.com>
  1606. * decl.c (duplicate_decls): Verify namespace names are unique.
  1607. 2007-05-21 Mark Mitchell <mark@codesourcery.com>
  1608. * decl.c (cxx_maybe_build_cleanup): Handle
  1609. __attribute__((cleanup)).
  1610. 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1611. * cvt.c (cp_convert_and_check): Don't check warnings if the
  1612. conversion failed.
  1613. 2007-05-18 Geoffrey Keating <geoffk@apple.com>
  1614. * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
  1615. 2007-05-14 Paolo Carlini <pcarlini@suse.de>
  1616. PR c++/29928
  1617. * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
  1618. type only if is a class type (5.2.8/4).
  1619. 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
  1620. * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
  1621. * decl.c (grokdeclarator): Use unsigned_type_for instead of
  1622. c_common_unsigned_type.
  1623. 2007-05-11 Silvius Rus <rus@google.com>
  1624. * typeck.c (build_indirect_ref): Add call to
  1625. strict_aliasing_warning.
  1626. (build_reinterpret_cast_1): Condition call to
  1627. strict_aliasing_warning.
  1628. 2007-05-11 Jan Hubicka <jh@suse.cz>
  1629. * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
  1630. * decl2.c (start_objects): ctors and dtors are no longer public.
  1631. (cp_write_global_declarations): Do not call c_build_cdtor_fns.
  1632. 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1633. * typeck.c (build_unary_op): Remove code that used to
  1634. handle non lvalue increments/decrements.
  1635. 2007-05-07 Mike Stump <mrs@apple.com>
  1636. * parser.c (check_empty_body): Add.
  1637. (cp_parser_iteration_statement): Add call to check_empty_body.
  1638. 2007-05-05 Geoffrey Keating <geoffk@apple.com>
  1639. PR 31775
  1640. * mangle.c (write_mangled_name): Mangle static variable names.
  1641. (write_unqualified_name): Use local-source-name for
  1642. namespace-scope static variables.
  1643. 2007-05-04 Dirk Mueller <dmueller@suse.de>
  1644. * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
  1645. not in effect.
  1646. 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
  1647. PR c++/31663
  1648. * decl2.c (constrain_class_visibility):
  1649. Use strip_pointer_or_array_types instead of strip_array_types.
  1650. 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1651. PR C++/30221
  1652. * decl.c (reshape_init_r): Don't reshape the first element if it
  1653. is a pointer to member function.
  1654. 2007-04-27 Simon Baldwin <simonb@google.com>
  1655. * decl.c (grokparms): Changed message format from %qD to %qE.
  1656. 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
  1657. * error.c (maybe_warn_variadic_templates): Variadic templates are
  1658. now in C++0x, so only warn about them in C++98 mode.
  1659. 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1660. PR C++/30016
  1661. * typeck.c (build_reinterpret_cast_1): Only allow conversion to
  1662. integeral types from vectors types.
  1663. 2007-04-26 Jakub Jelinek <jakub@redhat.com>
  1664. PR c++/31598
  1665. * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
  1666. for type dependent OMP_CLAUSE_DECLs.
  1667. 2007-04-24 Mark Mitchell <mark@codesourcery.com>
  1668. PR c++/31338
  1669. * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
  1670. * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
  1671. COMPLEX_TYPE is now an ARITHMETIC_TYPE.
  1672. * init.c (build_zero_init): Adjust, as
  1673. COMPLEX_TYPE is now a SCALAR_TYPE.
  1674. * typeck2.c (digest_init): Allow brace-enclosed initializers for
  1675. COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
  1676. 2007-04-25 Paolo Carlini <pcarlini@suse.de>
  1677. * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
  1678. per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
  1679. (trait_expr_value): Adjust.
  1680. 2007-04-23 Simon Baldwin <simonb@google.com>
  1681. * decl.c (grokparms): Added new error for duplicate function
  1682. parameters names in function prototypes, to match gcc behavior.
  1683. 2007-04-23 Jan Hubicka <jh@suse.cz>
  1684. * decl2.c (finish_objects): Do not call target constructor/destructor
  1685. bits dirrectly.
  1686. 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1687. * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
  1688. instead of checking GIMPLE_STMT_P in chain_next.
  1689. 2007-04-17 Mark Mitchell <mark@codesourcery.com>
  1690. PR c++/31513
  1691. * call.c (convert_for_arg_passing): Convert bitfields to their
  1692. declared types.
  1693. 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
  1694. PR c++/31517
  1695. * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
  1696. 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
  1697. PR c++/29365
  1698. * decl2.c (constrain_class_visibility):
  1699. Do not warn about the use of anonymous namespace in the main input file.
  1700. 2007-04-15 Mark Mitchell <mark@codesourcery.com>
  1701. * cp-tree.h (current_template_parms): Fix typo in comment.
  1702. 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
  1703. * cp-tree.h, error.c: Fix comment typos.
  1704. 2007-04-13 Jason Merrill <jason@redhat.com>
  1705. PR c++/31074
  1706. * call.c (reference_binding): Add c_cast_p parm. If true,
  1707. add quals to TO as needed to make it reference-compatible.
  1708. 2007-04-11 Jan Hubicka <jh@suse.cz>
  1709. * class.c (convert_to_base_statically): Fold produced tree; verify
  1710. that we are not processing template_decl.
  1711. 2007-04-09 Mark Mitchell <mark@codesourcery.com>
  1712. PR c++/31449
  1713. * class.c (build_base_path): Ensure that the converted pointer has
  1714. the same cv-qualification as the input.
  1715. 2007-04-09 Paolo Carlini <pcarlini@suse.de>
  1716. * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
  1717. 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
  1718. * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
  1719. Do not set it.
  1720. (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
  1721. * tree.c (cp_add_pending_fn_decls): Remove.
  1722. * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
  1723. 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
  1724. Revert change removing staticp.
  1725. 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
  1726. * cp-objcp-common.c (cxx_staticp): Remove.
  1727. * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
  1728. * cp-tree.h (cxx_staticp):
  1729. 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
  1730. * class.c (check_for_override): Don't remove dllmport attribute
  1731. of virtual methods.
  1732. 2007-04-03 Jakub Jelinek <jakub@redhat.com>
  1733. PR c++/30847
  1734. * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
  1735. type issue error and return early.
  1736. 2007-03-30 Jason Merrill <jason@redhat.com>
  1737. PR c++/31187
  1738. * typeck.c (cp_type_readonly): New fn.
  1739. * cp-tree.h: Declare it.
  1740. * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
  1741. (cp_finish_decl): Not here.
  1742. 2007-03-31 Richard Guenther <rguenther@suse.de>
  1743. * optimize.c (maybe_clone_body): Replace splay-tree usage by
  1744. pointer-map.
  1745. 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
  1746. PR c++/31138
  1747. PR c++/31140
  1748. PR c++/31141
  1749. * parser.c (declarator_can_be_parameter_pack): New.
  1750. (cp_parser_template_parameter): Only parse the `...' if the
  1751. declarator can be a parameter pack.
  1752. (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
  1753. is NULL.
  1754. * pt.c (find_parameter_packs_r): Look into the bounds on integer
  1755. types (they could be used as array bounds).
  1756. (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
  1757. (tsubst_pack_expansion): Handle failure to expand parameter
  1758. packs.
  1759. 2007-03-30 Paolo Carlini <pcarlini@suse.de>
  1760. PR c++/26099
  1761. * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
  1762. TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
  1763. (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
  1764. (CLASS_TYPE_NON_UNION_P): Add.
  1765. (struct lang_type_class): Add has_complex_dflt.
  1766. (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
  1767. (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
  1768. * cp-tree.def: Add TRAIT_EXPR.
  1769. * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
  1770. * lex.c (struct resword): Add __has_nothrow_assign,
  1771. __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
  1772. __has_trivial_constructor, __has_trivial_copy,
  1773. __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
  1774. __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
  1775. __is_pod, __is_polymorphic, __is_union.
  1776. * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
  1777. (cp_parser_trait_expr): New.
  1778. * semantics.c (finish_trait_expr, trait_expr_value
  1779. classtype_has_nothrow_copy_or_assign_p): New.
  1780. * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
  1781. as static.
  1782. * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
  1783. * class.c (check_bases, check_field_decl, check_bases_and_members):
  1784. Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
  1785. * pt.c (uses_template_parms, tsubst_copy_and_build,
  1786. value_dependent_expression_p, type_dependent_expression_p): Deal with
  1787. TRAIT_EXPR.
  1788. * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
  1789. 2007-03-29 Richard Guenther <rguenther@suse.de>
  1790. * tree.c (cp_walk_subtrees): Do not set input_location.
  1791. 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
  1792. PR c++/29077
  1793. * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
  1794. destructor.
  1795. 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
  1796. * parser.c (struct cp_parser): Update comment for
  1797. greater_than_is_operator_p.
  1798. (cp_parser_primary_expression): In C++0x mode, a cast operator can
  1799. be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
  1800. (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
  1801. !GREATER_THAN_IS_OPERATOR_P.
  1802. (cp_parser_binary_expression): When -Wc++0x-compat, warn about
  1803. `>>' operators that will become two `>' tokens in C++0x.
  1804. (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
  1805. mode, allowing it to terminate default arguments.
  1806. (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
  1807. `>>' like two consecutive `>' tokens.
  1808. (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
  1809. (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
  1810. ends a template argument.
  1811. 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
  1812. * decl.c (redeclaration_error_message): Complain when redeclaring
  1813. a friend function with default template arguments (C++0x mode only).
  1814. * cp-tree.h (check_default_tmpl_args): Declare.
  1815. * pt.c (check_default_tmpl_args): In C++0x mode, permit default
  1816. template arguments in function templates. Add support for checking
  1817. the default template arguments of friend templates.
  1818. (push_template_decl_real): Fix call to check_default_tmpl_args.
  1819. (type_unification_real): If a template parameter has not been
  1820. deduced but provides a default template argument, substitute into
  1821. that default template argument.
  1822. * parser.c (cp_parser_init_declarator): When declaring (but not
  1823. defining!) a function template in C++0x mode, check for default
  1824. template arguments.
  1825. 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
  1826. PR c++/29993
  1827. * decl.c (grokdeclarator): Deal with cv-qualified function type
  1828. typedefs in the same way for member and non-member functions.
  1829. 2007-03-26 Dirk Mueller <dmueller@suse.de>
  1830. * parser.c (cp_parser_member_declaration): Pedwarn
  1831. about stray semicolons after member declarations.
  1832. 2007-03-26 Paolo Carlini <pcarlini@suse.de>
  1833. PR c++/30500
  1834. * pt.c (instantiate_decl): Set in_system_header.
  1835. 2007-03-22 Mark Mitchell <mark@codesourcery.com>
  1836. * cp-tree.h (current_tempalte_parms): Improve documentation.
  1837. * pt.c (current_template_args): Likewise.
  1838. PR c++/30863
  1839. * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
  1840. not consume tokens when failing.
  1841. 2007-03-22 Jim Wilson <wilson@specifix.com>
  1842. Mark Mitchell <mark@codesourcery.com>
  1843. PR c++/31273
  1844. * call.c (standard_conversion): Use type_decays_to. Keep FCODE
  1845. consistent with FROM.
  1846. 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1847. * error.c (dump_expr): Handle dependent names that designate types.
  1848. * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
  1849. 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
  1850. * cp-tree.def, parser.c, pt.c: Fix comment typos.
  1851. 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1852. * cvt.c (cp_convert_and_check) : Define.
  1853. * cp-tree.h (cp_convert_and_check): Declare.
  1854. * call.c (convert_conversion_warnings): Rename to
  1855. conversion_null_warnings. The warning for floating-point to
  1856. integer is handled by convert_and_check in convert_like_real.
  1857. (convert_like_real): convert_conversion_warnings was renamed as
  1858. conversion_null_warnings.
  1859. * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
  1860. overflow and changes of value during conversion.
  1861. 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1862. PR c++/30891
  1863. * parser.c (cp_parser_statement): If 'namespace' is found, this
  1864. only can be a namespace alias definition, so parse it now.
  1865. (cp_parser_namespace_alias_definition): if we find an open brace
  1866. instead of '=', then this is actually a misplaced namespace
  1867. definition.
  1868. 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1869. PR c++/24924
  1870. * decl.c (cxx_init_decl_processing): Move command-line options
  1871. processing to c-opts.c.
  1872. 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
  1873. * ptree.c (cxx_print_type): Use formatting markup for integers
  1874. when printing template parameter index/level/orig level.
  1875. (cxx_print_xnode): Ditto.
  1876. * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
  1877. (struct template_parm_index_s): Remove the PARAMETER_PACK member.
  1878. Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
  1879. HOST_WIDE_INTs.
  1880. (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
  1881. rather than a HOST_WIDE_INT.
  1882. Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
  1883. NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
  1884. better bit-packing.
  1885. (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
  1886. RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
  1887. IN_BASE_INITIALIZER bool bitfields.
  1888. (struct cp_declarator): Make KIND a 4-bit field. Make
  1889. PARAMETER_PACK_P a bool bitfield just after KIND.
  1890. * pt.c (uses_parameter_packs): Destroy the pointer set.
  1891. (make_pack_expansion): Ditto.
  1892. (check_for_bare_parameter_packs): Ditto.
  1893. * name-lookup.c (push_to_top_level): Make need_pop a bool value.
  1894. 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
  1895. PR c++/31165
  1896. * call.c (convert_default_arg): Instead of copying the node,
  1897. unshare it.
  1898. 2007-03-15 Dirk Mueller <dmueller@suse.de>
  1899. PR c++/30860
  1900. * call.c (convert_conversion_warnings): New..
  1901. (convert_like_real): .. factored out from here.
  1902. (convert_conversion_warnings): Add warning about
  1903. false being converted to NULL in argument passing.
  1904. 2007-03-14 Dirk Mueller <dmueller@suse.de>
  1905. * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
  1906. (finish_do_body): Warn about empty body in do/while statement.
  1907. 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1908. * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
  1909. 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1910. PR c/21438
  1911. * typeck.c (build_binary_op): Call warn_for_div_zero instead of
  1912. warning.
  1913. 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
  1914. * repo.c (init_repo): Initialize random_seed saved options.
  1915. (finish_repo): Adjust.
  1916. 2007-03-13 Mark Mitchell <mark@codesourcery.com>
  1917. PR bootstrap/30899
  1918. * Make-lang.in (doc/g++.1): Use $< to specify the location from
  1919. which to copy.
  1920. 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
  1921. * decl.c (compute_array_index_type): New warning flag warn_vla.
  1922. 2007-03-12 Mark Mitchell <mark@codesourcery.com>
  1923. PR c++/30108
  1924. * call.c (convert_default_arg): Copy non-constant arguments.
  1925. 2007-03-11 Mark Mitchell <mark@codesourcery.com>
  1926. PR c++/31038
  1927. * parser.c (cp_parser_postfix_expression): Disallow compound
  1928. literals in constant expressions.
  1929. PR c++/30328
  1930. * semantics.c (finish_typeof): Use unlowered_expr_type.
  1931. 2007-03-10 Mark Mitchell <mark@codesourcery.com>
  1932. PR c++/30274
  1933. * cp-tree.h (unlowered_expr_type): New function.
  1934. * typeck.c (is_bitfield_expr_with_lowered_type): Handle
  1935. COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
  1936. (unlowered_expr_type): New function.
  1937. (build_unary_op): Disallow predecrements of bool bitfields.
  1938. * call.c (build_conditional_expr): Use unlowered_expr_type.
  1939. * pt.c (type_unification_real): Likewise.
  1940. 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
  1941. PR c++/20599
  1942. * typeck.c (check_return_expr): Check for bare parameter packs.
  1943. (comptypes): Compare template parameter packs and
  1944. type pack expansions.
  1945. * decl.c (grokdeclarator): Deal with the declaration of function
  1946. parameter packs.
  1947. (grokparms): Verify that the (optional) function parameter pack is
  1948. at the end of the parameter list.
  1949. (xref_basetypes): Handle pack expansions in the base class.
  1950. (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
  1951. * cp-tree.def (TYPE_ARGUMENT_PACK): New.
  1952. (NONTYPE_ARGUMENT_PACK): New.
  1953. (TYPE_PACK_EXPANSION): New.
  1954. (EXPR_PACK_EXPANSION): New.
  1955. (ARGUMENT_PACK_SELECT): New.
  1956. * cp-objcp-common.c (cp_tree_size): Compute size of
  1957. (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
  1958. ARGUMENT_PACK_SELECT.
  1959. * error.c (dump_template_argument): Print template argument packs.
  1960. (dump_template_argument_list): Ditto.
  1961. (dump_template_parameter): Dump `...' for template type parameter
  1962. packs.
  1963. (dump_type): Dump TYPE_PACK_EXPANSION nodes.
  1964. (dump_parameters): Print function parameter packs.
  1965. (dump_template_parms): Print template argument packs.
  1966. (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
  1967. (maybe_warn_variadic_templates): New.
  1968. * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
  1969. * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
  1970. NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
  1971. CAST_EXPR.
  1972. * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
  1973. (write_template_arg): Write argument packs as separate arguments.
  1974. * cp-tree.h (struct template_parm_index_s): Add flag that
  1975. indicates that the template parameter is actually a parameter
  1976. pack.
  1977. (struct tree_argument_pack_select): New.
  1978. (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
  1979. (union lang_tree_node): Add argument_pack_select.
  1980. (FUNCTION_PARAMETER_PACK_P): New.
  1981. (PACK_EXPANSION_P): New.
  1982. (PACK_EXPANSION_PATTERN): New.
  1983. (SET_PACK_EXPANSION_PATTERN): New.
  1984. (PACK_EXPANSION_PARAMETER_PACKS): New.
  1985. (ARGUMENT_PACK_P): New.
  1986. (ARGUMENT_PACK_ARGS): New.
  1987. (SET_ARGUMENT_PACK_ARGS): New.
  1988. (ARGUMENT_PACK_INCOMPLETE_P): New.
  1989. (ARGUMENT_PACK_EXPLICIT_ARGS): New.
  1990. (TEMPLATE_PARM_PARAMETER_PACK): New.
  1991. (TEMPLATE_TYPE_PARAMETER_PACK): New.
  1992. (ARGUMENT_PACK_SELECT_FROM_PACK): New.
  1993. (ARGUMENT_PACK_SELECT_INDEX): New.
  1994. (ARGUMENT_PACK_SELECT_ARG): New.
  1995. (struct cp_declarator): Add parameter_pack_p flag.
  1996. (maybe_warn_variadic_templates): Declare.
  1997. (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
  1998. indicate a template parameter pack.
  1999. (uses_parameter_packs): Declare.
  2000. (template_parameter_pack_p): Declare.
  2001. (template_parms_variadic_p): Declare.
  2002. (make_pack_expansion): Declare.
  2003. (check_for_bare_parameter_packs): Declare.
  2004. * cxx-pretty-print.c (pp_cxx_unary_expression): Print
  2005. sizeof... expressions.
  2006. (pp_cxx_expression): Print pack expansions and non-type argument
  2007. packs.
  2008. (pp_cxx_exception_specification): Print pack expansions.
  2009. (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
  2010. (pp_cxx_ctor_initializer): Print pack expansions.
  2011. (pp_cxx_type_id): Print pack expansions.
  2012. (pp_cxx_template_argument_list): Print argument packs.
  2013. (pp_cxx_template_parameter): Print ellipsis for template parameter
  2014. packs.
  2015. * pt.c (comp_template_parms): Compare template parameter packs.
  2016. (template_parameter_pack_p): New.
  2017. (template_parms_variadic_p): New.
  2018. (template_args_variadic_p): New.
  2019. (make_ith_pack_parameter_name): New.
  2020. (struct find_parameter_pack_data): New.
  2021. (find_parameter_packs_r): New.
  2022. (uses_parameter_packs): New.
  2023. (make_pack_expansion): New.
  2024. (check_for_bare_parameter_packs): New.
  2025. (expand_template_argument_pack): New.
  2026. (reduce_template_parm_level): Propagate parameter pack flag.
  2027. (process_template_parm): Add is_parameter_pack parameter to state
  2028. when the parameter is actually a parameter pack. Create template
  2029. parameter packs when is_parameter_pack is true.
  2030. (current_template_args): The argument for a template parameter
  2031. pack is an argument pack containing a single pack expansion.
  2032. (process_partial_specialization): When checking that non-type
  2033. argument expressions do not involve template parameters, loop over
  2034. the arguments in argument packs separately.
  2035. (push_template_decl_real): Check that the type of the declaration
  2036. does not have any bare parameter packs. Check that primary
  2037. templates have no more than one parameter pack, and that it comes
  2038. at the end of the template parameter list.
  2039. (convert_template_argument): Handle coercions for pack expansion
  2040. expressions by coercing the pattern then rebuilding the expansion.
  2041. (coerce_template_parms): When coercing the arguments for a
  2042. variadic template, pack "extra" arguments into an argument pack.
  2043. (coerce_template_template_parms): Cannot coerce between parameter
  2044. packs and non-pack parameters.
  2045. (template_args_equal): Compare PACK_EXPANSION_P expressions.
  2046. (comp_template_args): Expand all template arguments packs before
  2047. comparing template argument lists.
  2048. (mangle_class_name_for_template): Make argument packs as separate
  2049. template arguments.
  2050. (for_each_template_parm_r): No need to handle BASELINK.
  2051. (instantiate_class_template): Handle pack expansions in the base
  2052. class list.
  2053. (tsubst_pack_expansion): New.
  2054. (tsubst_template_args): Handle substitutions of argument packs and
  2055. pack expansion into template argument lists.
  2056. (tsubst_decl): Expand function parameter packs into separate
  2057. function parameters.
  2058. (tsubst_arg_types): Expand a type pack expansion into separate
  2059. argument types.
  2060. (tsubst_exception_specification): Handle pack expansions in
  2061. exception specifiers.
  2062. (tsubst): See through ARGUMENT_PACK_SELECT arguments when
  2063. replacing a template parameter with its argument. If we encounter
  2064. a substitution for an argument pack, just return the parameter
  2065. itself.
  2066. (tsubst_copy): sizeof(X...) returns the number of elements in
  2067. parameter pack X. See through ARGUMENT_PACK_SELECT when the
  2068. PARM_DECL is a parameter pack.
  2069. (tsubst_expr): Expression pack expansions and argument packs
  2070. cannot show up here; they will all be handled through function
  2071. calls, sizeof, and template argument lists.
  2072. (tsubst_copy_and_build): sizeof(X...) returns the number of
  2073. elements in parameter pack X. Handle pack expansions in TREE_LIST
  2074. and CONSTRUCTOR nodes.
  2075. (fn_type_unification): Handle "incomplete" explicit template
  2076. argument lists that specify some of the arguments for a template
  2077. parameter pack.
  2078. (type_unification_real): Unify arguments against pack expansions.
  2079. (template_parm_level_and_index): New, helper function.
  2080. (unify_pack_expansion): New.
  2081. (unify): Unify argument packs on an argument-by-argument basis,
  2082. handling variadic argument packs as well.
  2083. (more_specialized_fn): Handle unification of function parameter
  2084. packs. All things being equal, prefer non-variadic function
  2085. templates to variadic function templates.
  2086. (more_specialized_class): Prefer the variadic class template
  2087. partial specialization that binds fewer arguments to a parameter
  2088. pack.
  2089. (regenerate_decl_from_template): Expand function parameter packs
  2090. into separate parameters.
  2091. (instantiate_decl): Ditto.
  2092. (tsubst_initializer_list): Handle pack expansions for base-class
  2093. initializers.
  2094. (dependent_type_p_r): Determine dependent types in argument packs
  2095. and pack expansions.
  2096. (value_dependent_expression_p): Determine value-dependence of
  2097. non-type argument packs.
  2098. (dependent_template_arg_p): Handle argument packs.
  2099. * semantics.c (finish_cond): Check for bare parameter packs.
  2100. (finish_expr_stmt): Ditto.
  2101. (finish_for_expr): Ditto.
  2102. (finish_switch_cond): Ditto.
  2103. (finish_mem_initializers): Ditto.
  2104. * name-lookup.c (arg_assoc_type): Handle pack expansions and
  2105. argument packs.
  2106. * decl2.c (cp_build_parm_decl): Mark function parameter packs.
  2107. * parser.c (make_declarator): Declarator is not an expansion.
  2108. (make_pointer_declarator): Transfer parameter pack flag to outer
  2109. declarator.
  2110. (make_reference_declarator): Ditto.
  2111. (make_ptrmem_declarator): Ditto.
  2112. (make_call_declarator): Ditto.
  2113. (make_array_declarator): Ditto.
  2114. (cp_parser_postfix_expression): Allow pack expansion expressions
  2115. in the argument list for a call expression.
  2116. (cp_parser_parenthesized_expression_list): Add new parameter
  2117. ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
  2118. into separate arguments."
  2119. (cp_parser_new_placement): Allow pack expansion expressions.
  2120. (cp_parser_new_initializer): Ditto.
  2121. (cp_parser_mem_initializer_list): Allow ellipsis to create a
  2122. base-class initializer expansion.
  2123. (cp_parser_mem_initializer): Ditto.
  2124. (cp_parser_template_parameter_list): Keep track of whether the
  2125. template parameter is a template parameter pack.
  2126. (cp_parser_template_parameter): Parse the ellipsis to indicate a
  2127. template parameter pack.
  2128. (cp_parser_type_parameter): Ditto.
  2129. (cp_parser_template_argument_list): Parse the ellipsis to indicate
  2130. a pack expansion.
  2131. (cp_parser_direct_declarator): Parse the ellipsis to indicate that
  2132. this declarator is a parameter pack.
  2133. (cp_parser_parameter_declaration): The ellipsis does not end the
  2134. parameter declaration, because it might be a parameter pack. Parse
  2135. the ellipsis to indicate a parameter pack.
  2136. (cp_parser_initializer): Allow pack expansions.
  2137. (cp_parser_initializer_list): Allow ellipsis to create an
  2138. initializer expansion.
  2139. (cp_parser_base_clause): Allow ellipsis to create a base specifier
  2140. expansion.
  2141. (cp_parser_type_id_list): Allow ellipsis to create an exception
  2142. specifier expansion.
  2143. (cp_parser_attribute_list): Don't allow pack expansions.
  2144. (cp_parser_functional_cast): Allow pack expansions.
  2145. (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
  2146. compute the length of a parameter pack.
  2147. (cp_parser_next_token_ends_template_argument_p): An ellipsis can
  2148. end a template argument.
  2149. * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
  2150. NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
  2151. CAST_EXPR.
  2152. 2007-03-09 Dirk Mueller <dmueller@suse.de>
  2153. * call.c (build_new_op): Call warn_logical_operator.
  2154. 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
  2155. PR c++/30852
  2156. * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
  2157. PR c++/30534
  2158. * pt.c (any_template_arguments_need_structural_equality_p):
  2159. Robustify.
  2160. 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
  2161. * decl.c (grokdeclarator): Disable warnings for anonymous
  2162. bitfields.
  2163. 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
  2164. * typeck2.c (readonly_error): Always emit a hard error.
  2165. Remove last argument.
  2166. * cp-tree.h (readonly_error): Adjust prototype.
  2167. * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
  2168. * typeck.c (build_unary_op): Likewise.
  2169. (build_modify_expr): Likewise.
  2170. 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
  2171. PR c++/30895
  2172. * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
  2173. 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2174. PR c++/15787
  2175. * parser.c (struct cp_parser): New IN_IF_STMT.
  2176. (cp_parser_statement_seq_opt): Handle an unexpected 'else',
  2177. returning if parsing the body of an 'if' statement or issuing an
  2178. error and continuing.
  2179. (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
  2180. body of 'if'.
  2181. (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
  2182. 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
  2183. PR c++/28253
  2184. * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
  2185. for thunks.
  2186. 2007-03-02 Geoffrey Keating <geoffk@apple.com>
  2187. * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
  2188. Objective-C++. Don't exit early if -shared-libgcc needs to be
  2189. added.
  2190. 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2191. * typeck.c (common_base_type): Delete unused function.
  2192. 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
  2193. * Make-lang.in: Add dummy lang.install-pdf target.
  2194. 2007-03-01 Simon Baldwin <simonb@google.com>
  2195. PR c++/23689
  2196. * decl.c (check_tag_decl): Added new warning for typedef ignored
  2197. when it precedes an otherwise valid non-typedef declaration.
  2198. 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
  2199. * typeck.c (build_function_call): Store converted arguments
  2200. in a stack-allocated array instead of building a list.
  2201. (convert_arguments): Store arguments in the array passed in as an
  2202. argument, and return the actual number of arguments.
  2203. * call.c (build_call): Delete, and replace with...
  2204. (build_call_n, build_call_a): New.
  2205. (build_op_delete_call): Rewrite to avoid constructing argument lists.
  2206. (build_over_call): Store converted arguments in a stack-allocated
  2207. array instead of building a list.
  2208. (build_cxx_call): Pass arguments in an array instead of as a list.
  2209. (build_java_interface_fn_ref): Rewrite to avoid constructing
  2210. argument lists.
  2211. * tree.h: Update declarations to reflect above changes.
  2212. * method.c (use_thunk): Use a stack-allocated array to hold
  2213. the arguments instead of a list.
  2214. * rtti.c (throw_bad_cast): Update call to cxx_call.
  2215. (throw_bad_typeid): Likewise.
  2216. (build_dynamic_cast_1): Likewise.
  2217. * init.c (build_builtin_delete_call): Use build_call_n.
  2218. * decl.c (expand_static_init): Likewise.
  2219. * except.c (cp_protect_cleanup_actions): Likewise.
  2220. * cp-gimplify.c (genericize_eh_spec_block): Likewise.
  2221. (gimplify_must_not_throw_expr): Likewise.
  2222. (cxx_omp_apply_fn): Use build_call_a.
  2223. 2007-02-26 Mark Mitchell <mark@codesourcery.com>
  2224. * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
  2225. * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
  2226. 2007-02-25 Mark Mitchell <mark@codesourcery.com>
  2227. * cp-tree.h (static_ctors): Remove.
  2228. * cp-tree.h (static_dtors): Likewise.
  2229. * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
  2230. refactoring of tree_map hierarchy.
  2231. (decl_shadowed_for_var_insert): Likewise.
  2232. * semantics.c (expand_body): Use c_expand_body.
  2233. (expand_or_defer_fn): Don't update static_ctors or static_dtors.
  2234. * decl2.c (static_ctors): Remove.
  2235. (static_dtors): Likewise.
  2236. (generate_ctor_or_dtor_function): Pass NULL_TREE to
  2237. objc_generate_static_init_call. Do not call static_[cd]tors.
  2238. (generate_ctor_and_dtor_functions_for_priority): Do not check for
  2239. static_[cd]tors.
  2240. (cp_write_global_declarations): Likewise.
  2241. 2007-02-23 Richard Guenther <rguenther@suse.de>
  2242. * class.c (note_name_declared_in_class): Make declaration
  2243. changes meaning a pedwarn.
  2244. 2007-02-22 Michael Matz <matz@suse.de>
  2245. PR c++/29433
  2246. * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
  2247. * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
  2248. dump_function_decl): Guard emitting outer scopes by new flag.
  2249. * cp-lang.c (cxx_dwarf_name): New function.
  2250. (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
  2251. * pt.c (classtype_mangled_name, mangle_class_name_for_template):
  2252. Remove functions.
  2253. (push_template_decl_real, lookup_template_class): Remove calls
  2254. to above functions.
  2255. 2007-02-19 Mark Mitchell <mark@codesourcery.com>
  2256. * call.c (build_new_method_call): Ensure that explicit calls of
  2257. destructors have type "void".
  2258. 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2259. * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
  2260. and -Walways-true with -Waddress.
  2261. * cvt.c (convert_to_void): Replace unconditional warning with
  2262. -Waddress.
  2263. 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
  2264. * decl.c, tree.c: Fix comment typos.
  2265. 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
  2266. PR C++/30158
  2267. * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
  2268. statement expression if we had an error mark node.
  2269. 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
  2270. Brooks Moses <brooks.moses@codesourcery.com>
  2271. Lee Millward <lee.millward@codesourcery.com>
  2272. * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
  2273. Change class to tcc_vl_exp.
  2274. * call.c (build_call): Use build_call_list instead
  2275. of build3.
  2276. (build_over_call): Likewise.
  2277. (build_new_method_call): Use build_min_non_dep_call_list
  2278. instead of build_min_non_dep.
  2279. * error.c (dump_call_expr_args): New function.
  2280. (dump_aggr_init_expr_args): New function.
  2281. (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
  2282. Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
  2283. * cvt.c (convert_to_void): Use build_call_array instead
  2284. of build3; use new AGGR_INIT_EXPR accessor macros.
  2285. * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
  2286. instead of TREE_CODE_LENGTH.
  2287. * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
  2288. AGGR_INIT_EXPR accessor macros.
  2289. * cp-gimplify.c (cp_gimplify_init_expr): Use
  2290. AGGR_INIT_EXPR_SLOT to set the slot operand.
  2291. * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
  2292. (AGGR_INIT_EXPR_SLOT): New macro.
  2293. (AGGR_INIT_EXPR_ARG): New macro.
  2294. (aggr_init_expr_nargs): New macro.
  2295. (AGGR_INIT_EXPR_ARGP): New macro.
  2296. (aggr_init_expr_arg_iterator): New.
  2297. (init_aggr_init_expr_arg_iterator): New.
  2298. (next_aggr_init_expr_arg): New.
  2299. (first_aggr_init_expr_arg): New.
  2300. (more_aggr_init_expr_args_p): New.
  2301. (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
  2302. (stabilize_aggr_init): New declaration.
  2303. (build_min_non_dep_call_list): Likewise.
  2304. * tree.c (process_aggr_init_operands): New function.
  2305. (build_aggr_init_array) New function.
  2306. (build_cplus_new): Update to use new CALL_EXPR and
  2307. AGGR_INIT_EXPR accessor macros. Replace use of build3 with
  2308. build_aggr_init_array.
  2309. (build_min_non_dep_call_list) New function.
  2310. (build_min_nt): Assert input code parameter is not a variable
  2311. length expression class.
  2312. (build_min, build_min_non_dep): Likewise.
  2313. (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
  2314. to check for equality instead of recursing. Handle tcc_vl_exp
  2315. tree code classes.
  2316. (stabilize_call): Update to only handle CALL_EXPRs, not
  2317. AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
  2318. (stabilize_aggr_init): New function.
  2319. (stabilize_init): Use it.
  2320. * cxx-pretty-print.c (pp_cxx_postfix_expression)
  2321. <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
  2322. AGGR_INIT_EXPR accessor macros and argument iterators.
  2323. * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
  2324. build_vl_exp. Iterate through the operands, recursively
  2325. processing each one.
  2326. (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
  2327. CALL_EXPR accessor macros.
  2328. (value_dependent_expression_p) <default>: Handle tcc_vl_exp
  2329. tree code classes. Use TREE_OPERAND_LENGTH instead of
  2330. TREE_CODE_LENGTH.
  2331. * semantics.c (finish_call_expr): Use build_nt_call_list
  2332. instead of build_nt.
  2333. (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
  2334. accessor macros. Use build_call_array to construct the
  2335. CALL_EXPR node instead of build3
  2336. * decl2.c (build_offset_ref_call_from_tree): Use
  2337. build_nt_call_list and build_min_non_dep_call_list instead
  2338. of build_min_nt and build_min_non_dep.
  2339. * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
  2340. Use build_nt_call_list instead of build_min_nt.
  2341. 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2342. PR c++/28943
  2343. * call.c (build_conditional_expr): Improve error message.
  2344. 2007-02-13 Dirk Mueller <dmueller@suse.de>
  2345. * friend.c (do_friend): Annotate warning about friend
  2346. declarations in templates with OPT_Wnon_template_friend.
  2347. Convert informal message from warning() to inform().
  2348. 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
  2349. Mark Mitchell <mark@codesourcery.com>
  2350. PR c++/14622
  2351. * pt.c (do_decl_instantiation): Detect type mismatches in explicit
  2352. instantiations for variables.
  2353. 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2354. PR middle-end/7651
  2355. * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
  2356. Check warn_unused_value just once.
  2357. 2007-02-11 Mark Mitchell <mark@codesourcery.com>
  2358. PR c++/26988
  2359. * pt.c (determine_specialization): Use skip_artificial_parms_for.
  2360. (fn_type_unificiation): Likewise.
  2361. (get_bindings): Likewise.
  2362. o2007-02-06 Mark Mitchell <mark@codesourcery.com>
  2363. PR target/29487
  2364. * decl.c (finish_function): Use DECL_REPLACEABLE.
  2365. * tree.c (cp_cannot_inline_tree_fn): Likewise.
  2366. 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2367. * parser.c (cp_parser_primary_expression): Reformat overly long lines.
  2368. 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
  2369. * decl.c (grokvardecl): Don't error if !have_tls.
  2370. (grokdeclarator): Likewise.
  2371. * parser.c (cp_parser_omp_threadprivate): Likewise.
  2372. 2007-02-07 Jakub Jelinek <jakub@redhat.com>
  2373. PR c++/30703
  2374. * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
  2375. parameters and result decls in omp clauses.
  2376. (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
  2377. by reference.
  2378. 2007-02-05 Dirk Mueller <dmueller@suse.de>
  2379. PR bootstrap/30510
  2380. * parser.c (cp_parser_class_specifier): Always initialize bases.
  2381. 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
  2382. * cp-tree.h (OMP_ATOMIC_CODE): Delete.
  2383. (OMP_ATOMIC_DEPENDENT_P): Rewrite.
  2384. * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
  2385. expressions.
  2386. * semantics.c (finish_omp_atomic): Store a whole expression node
  2387. in operand 1, and integer_zero_node in operand 0, for dependent
  2388. OMP_ATOMIC. Rewrite to make flow easier to understand.
  2389. 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2390. * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
  2391. 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
  2392. * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
  2393. parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
  2394. 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
  2395. * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
  2396. keyword warning to -Wc++0x-compat.
  2397. 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2398. * decl.c (grokdeclarator): Update documentation.
  2399. 2007-02-02 Jakub Jelinek <jakub@redhat.com>
  2400. PR c++/30536
  2401. * decl.c (grokdeclarator): If __thread is used together with
  2402. a storage class other than extern and static, clear thread_p
  2403. after issuing diagnostics and fall through to checking the
  2404. storage class.
  2405. 2007-01-30 Roger Sayle <roger@eyesopen.com>
  2406. * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
  2407. calculating the size of an array (to avoid recursive errors).
  2408. 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2409. PR c++/24745
  2410. * typeck.c (build_binary_op): Fix logic for warning. Move warning
  2411. to -Wpointer-arith.
  2412. * call.c (convert_like_real): Don't warn when converting to
  2413. boolean type.
  2414. 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2415. * decl.c (pop_label): Replace warning with call to
  2416. warn_for_unused_label.
  2417. 2007-01-28 Andrew Pinski <pinskia@gmail.com>
  2418. PR C++/28988
  2419. * semantics.c (finish_pseudo_destructor_expr): Check the
  2420. destrutor name by calling check_dtor_name.
  2421. 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
  2422. * lex.c (D_CPP0X): Rename.
  2423. (D_CXX0X): To this.
  2424. (reswords): D_CPP0X -> D_CXX0X.
  2425. (init_reswords): Ditto.
  2426. * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
  2427. of C++0x keywords as identifiers.
  2428. 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
  2429. PR c++/27492
  2430. * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
  2431. function decls.
  2432. 2007-01-23 Ian Lance Taylor <iant@google.com>
  2433. * typeck.c (convert_for_assignment): Only warn about a = b = c
  2434. when converting to bool.
  2435. 2007-01-23 Roger Sayle <roger@eyesopen.com>
  2436. * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
  2437. TREE_OVERFLOW.
  2438. * typeck.c (ignore_overflows): Remove the remaining uses of
  2439. TREE_CONSTANT_OVERFLOW.
  2440. 2007-01-20 Jan Hubicka <jh@suse.cz>
  2441. * decl2.c (start_objects, start_static_storage_duration_function):
  2442. Do not make the functions uninlinable.
  2443. 2007-01-17 Ian Lance Taylor <iant@google.com>
  2444. * class.c (add_method): Call VEC_reserve_exact rather than passing
  2445. a negative size to VEC_reserve.
  2446. 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
  2447. PR c++/29573
  2448. * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
  2449. 2007-01-10 Mark Mitchell <mark@codesourcery.com>
  2450. PR c++/28999
  2451. * decl.c (make_typename_type): If the qualified name is not a
  2452. type, issue an error.
  2453. * parser.c (cp_parser_elaborated_type_specifier): Fix comment
  2454. formatting.
  2455. 2007-01-08 Geoffrey Keating <geoffk@apple.com>
  2456. * rtti.c: Include target.h.
  2457. (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
  2458. don't emit typeinfo for fundamental types as weak.
  2459. * Make-lang.in (cp/rtti.o): Update and correct dependencies.
  2460. 2007-01-08 Richard Guenther <rguenther@suse.de>
  2461. * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
  2462. 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
  2463. * call.c (standard_conversion): Pass flag to
  2464. vector_types_convertible_p to disallow emission of note.
  2465. * typeck.c (convert_for_assignment): Pass flag to
  2466. vector_types_convertible_p to allow emission of note.
  2467. (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
  2468. to disallow emission of note.
  2469. 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2470. PR c++/28986
  2471. * typeck.c (build_binary_op): Call overflow_warning if
  2472. TREE_OVERFLOW_P is true for the result and not for any of the
  2473. operands.
  2474. 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
  2475. PR c++/19439
  2476. * class.c (add_method): Don't wait until template
  2477. instantiation time to complain about duplicate methods.
  2478. 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  2479. PR c/19978
  2480. * semantics.c (finish_unary_op_expr): Warn only if result
  2481. overflowed and operands did not.
  2482. 2007-01-05 Ian Lance Taylor <iant@google.com>
  2483. * typeck.c (build_binary_op): Warn about comparing a non-weak
  2484. address to NULL.
  2485. 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
  2486. * pt.c (tsubst): Propagate the need for structural equality checks
  2487. when reducing the level of template parameters.
  2488. 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
  2489. * pt.c: Fix a comment typo.
  2490. 2007-01-02 Ian Lance Taylor <iant@google.com>
  2491. * semantics.c (maybe_convert_cond): Optionally warn when using an
  2492. assignment as a condition.
  2493. * typeck.c (convert_for_assignment): Optionally warn about
  2494. assigning the result of an assignment to a bool.
  2495. 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
  2496. * pt.c (canonical_template_parms): Correct typo in comment.
  2497. 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
  2498. * typeck.c (structural_comptypes): Renamed from "comptypes".
  2499. (comptypes): Use canonical type information to perform fast type
  2500. comparison. When VERIFY_CANONICAL_TYPES, verify that the
  2501. canonical type comparison returns the same results as we would see
  2502. from the current, structural check. Support COMPARE_STRUCTURAL
  2503. when we need structural checks.
  2504. * decl.c (typename_compare): Fix comment.
  2505. (build_typename_type): TYPENAME_TYPE nodes require structural
  2506. equality checks, because they resolve different based on the
  2507. current class type.
  2508. (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
  2509. require structural equality checks (for now).
  2510. (build_ptrmemfunc_type): Build the canonical pointer to member
  2511. function type.
  2512. (compute_array_index_type): Whenever we build a new index type
  2513. to represent the size of an array in a template, we need to mark
  2514. this index type as requiring structural equality. This goes for
  2515. arrays with value-dependent sizes with the current ABI, or all
  2516. arrays with ABI-1.
  2517. * tree.c (cplus_array_hash): New.
  2518. (struct cplus_array_info): New.
  2519. (cplus_array_compare): New.
  2520. (cplus_array_htab): New.
  2521. (build_cplus_array_type_1): Use a hash table to cache the array
  2522. types we build. Build the canonical array type for each array
  2523. type.
  2524. (cp_build_qualified_type_real): When building a cv-qualified array
  2525. type, use the hash table of array types and build canonical array
  2526. types as necessary.
  2527. (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
  2528. use structural equality (for now).
  2529. * cp-tree.h (COMPARE_STRUCTURAL): New.
  2530. * pt.c (canonical_template_parms): New.
  2531. (canonical_type_parameter): New.
  2532. (process_template_parm): Find the canonical type parameter.
  2533. (lookup_template_class): When we have named the primary template
  2534. type, set the canonical type for our template class to the primary
  2535. template type. If any of the template arguments need structural
  2536. equality checks, the template class needs structural equality
  2537. checks.
  2538. (tsubst): When reducing the level of a template template
  2539. parameter, we require structural equality tests for the resulting
  2540. parameter because its template parameters have not had their types
  2541. canonicalized. When reducing a template type parameter, find the
  2542. canonical reduced type parameter.
  2543. (any_template_arguments_need_structural_equality_p): New.
  2544. Copyright (C) 2007 Free Software Foundation, Inc.
  2545. Copying and distribution of this file, with or without modification,
  2546. are permitted in any medium without royalty provided the copyright
  2547. notice and this notice are preserved.