ChangeLog-2014 131 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042
  1. 2014-12-31 Iain Sandoe <iain@codesourcery.com>
  2. * parser.c (cp_parser_primary_expression): If parsing an
  3. objective-c++ message expression fails, see if a lambda is present.
  4. (cp_parser_objc_message_receiver): Don't assume that, if a message
  5. receiver expression fails, it is a hard error.
  6. 2014-12-25 Jason Merrill <jason@redhat.com>
  7. * pt.c (check_default_tmpl_args): Uses the parameter source
  8. location in the diagnostic.
  9. (convert_template_argument): Just return if parm is error_mark_node.
  10. PR c++/63522
  11. * parser.c (cp_parser_type_parameter): Call
  12. check_for_bare_parameter_packs on default argument.
  13. 2014-12-24 Paolo Carlini <paolo.carlini@oracle.com>
  14. PR c++/63985
  15. * parser.c (cp_parser_init_declarator): Add location_t* parameter.
  16. (cp_parser_simple_declaration): Provide proper diagnostic for
  17. multiple declarations and initializers in range-based for loops.
  18. (cp_parser_single_declaration): Adjust call.
  19. 2014-12-20 Jason Merrill <jason@redhat.com>
  20. PR c++/64359
  21. * pt.c (iterative_hash_template_arg): Hash alias specializations
  22. differently from their TYPE_CANONICAL.
  23. (alias_template_specialization_p): Optimize.
  24. (template_args_equal): Optimize alias handling.
  25. (dependent_alias_template_spec_p): Only check innermost args.
  26. 2014-12-19 Kai Tietz <ktietz@redhat.com>
  27. PR c++/61198
  28. * pt.c (most_general_template): Don't break for template-alias.
  29. 2014-12-18 Jason Merrill <jason@redhat.com>
  30. PR c++/64105
  31. * parser.c (cp_parser_simple_type_specifier): Make auto parameter
  32. before -std=c++14 an error.
  33. PR c++/64352
  34. * pt.c (tsubst_copy_and_build): Pass complain to mark_used.
  35. PR c++/64251
  36. * decl2.c (mark_used): Don't mark if in_template_function.
  37. 2014-12-18 Paolo Carlini <paolo.carlini@oracle.com>
  38. PR c++/60955
  39. * pt.c (struct warning_sentinel): Move it...
  40. * cp-tree.h: ... here.
  41. * semantics.c (force_paren_expr): Use it.
  42. 2014-12-17 Jason Merrill <jason@redhat.com>
  43. PR c++/64333
  44. * constexpr.c (cxx_bind_parameters_in_call): non_constant_args parm.
  45. (cxx_eval_call_expression): Don't cache calls with non-constant args.
  46. (cxx_eval_constant_expression) [COMPOUND_EXPR]: Pass true for lval.
  47. (cxx_eval_unary_expression, cxx_eval_binary_expression)
  48. (cxx_eval_conditional_expression): Pass false for lval.
  49. * constexpr.c: Change "addr" parm names to "lval".
  50. * constexpr.c: Tweak comments and formatting.
  51. 2014-12-16 Paolo Carlini <paolo.carlini@oracle.com>
  52. PR c++/58650
  53. * parser.c (cp_parser_member_declaration): Fix error recovery for
  54. initialized non-static data member declared friend.
  55. 2014-12-15 Jan Hubicka <hubicka@ucw.cz>
  56. * decl2.c (decl_needed_p): When not optimizing, do not consider external
  57. decls as needed.
  58. 2014-12-15 Jason Merrill <jason@redhat.com>
  59. PR c++/64297
  60. * typeck.c (apply_memfn_quals): Correct wrong TYPE_CANONICAL.
  61. N3778: Sized Deallocation
  62. * call.c (non_placement_deallocation_fn_p): A global sized
  63. operator delete is not a usual deallocation function until C++14.
  64. (build_op_delete_call): Choose the global sized op delete if we
  65. know the size.
  66. * cp-tree.h: Declare non_placement_deallocation_fn_p.
  67. (enum cp_tree_index): Remove CPTI_GLOBAL_DELETE_FNDECL.
  68. (global_delete_fndecl): Remove.
  69. * decl.c (cxx_init_decl_processing): Also declare sized op deletes.
  70. (grok_op_properties): Warn about sized dealloc without the flag.
  71. * init.c (build_builtin_delete_call): Remove.
  72. (build_vec_delete_1, build_delete): Don't call it.
  73. * decl2.c (maybe_warn_sized_delete): New.
  74. (cp_write_global_declarations): Call it.
  75. 2014-12-15 Paolo Carlini <paolo.carlini@oracle.com>
  76. PR c++/58882
  77. * decl.c (check_array_designated_initializer): Diagnose gracefully
  78. C99 designators which aren't integral constant-expressions; allow
  79. constexpr user-defined type conversion operators.
  80. 2014-12-12 Paolo Carlini <paolo.carlini@oracle.com>
  81. PR c++/59628
  82. * semantics.c (finish_omp_reduction_clause): Early return true
  83. if DECL_SAVED_TREE (id) is NULL_TREE.
  84. 2014-12-12 Jason Merrill <jason@redhat.com>
  85. N3922
  86. * pt.c (do_auto_deduction): In direct-init context, { x } deduces
  87. from x.
  88. * cp-tree.h (NAMESPACE_ABI_TAG): New.
  89. * name-lookup.c (handle_namespace_attrs): Set it.
  90. * class.c (check_tag): Split out from find_abi_tags_r.
  91. (find_abi_tags_r): Also check namespace tags.
  92. (mark_type_abi_tags): Also mark namespace tags.
  93. 2014-12-12 Kai Tietz <ktietz@redhat.com>
  94. PR c++/63996
  95. * constexpr.c (cxx_eval_loop_expr): Don't loop
  96. endless on none-constant expression.
  97. 2014-12-12 Jason Merrill <jason@redhat.com>
  98. PR c++/61402
  99. * lambda.c (add_capture): Don't pass a dependent type to
  100. variably_modified_type_p.
  101. 2014-12-11 Jason Merrill <jason@redhat.com>
  102. Remove N3639 "array of runtime length" from -std=c++14.
  103. * decl.c (compute_array_index_type): VLAs are not part of C++14.
  104. (create_array_type_for_decl, grokdeclarator): Likewise.
  105. * lambda.c (add_capture): Likewise.
  106. * pt.c (tsubst): Likewise.
  107. * rtti.c (get_tinfo_decl): Likewise.
  108. * semantics.c (finish_decltype_type): Likewise.
  109. * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
  110. (cp_build_addr_expr_1): Likewise.
  111. * init.c (build_vec_init): Don't throw bad_array_length.
  112. PR c++/64248
  113. Revert:
  114. * parser.c (cp_parser_unqualified_id): Handle __func__ here.
  115. (cp_parser_primary_expression): Not here.
  116. PR c++/57510
  117. * typeck2.c (split_nonconstant_init_1): Handle arrays here.
  118. (store_init_value): Not here.
  119. (split_nonconstant_init): Look through TARGET_EXPR. No longer static.
  120. * cp-tree.h: Declare split_nonconstant_init.
  121. * call.c (set_up_extended_ref_temp): Use split_nonconstant_init.
  122. 2014-12-11 Paolo Carlini <paolo.carlini@oracle.com>
  123. * typeck.c (maybe_warn_about_useless_cast): Remove unnecessary
  124. conditional.
  125. 2014-12-10 Kai Tietz <ktietz@redhat.com>
  126. PR c++/64127
  127. * parser.c (cp_parser_diagnose_invalid_type_name): Check id
  128. for being an identifier before accessing it.
  129. PR c++/64100
  130. * typeck.c (lookup_destructor): Handle incomplete type.
  131. 2014-12-09 Jason Merrill <jason@redhat.com>
  132. PR c++/64129
  133. * decl.c (grokdeclarator): Recover from variable template
  134. specialization declared as function.
  135. PR c++/64222
  136. * parser.c (cp_parser_unqualified_id): Don't declare fname while
  137. parsing function parms.
  138. 2014-12-03 Jason Merrill <jason@redhat.com>
  139. PR c++/64029
  140. * decl.c (grok_reference_init): Complete array type.
  141. PR c++/64080
  142. * constexpr.c (cxx_eval_store_expression): Handle non-decl store
  143. targets.
  144. 2014-12-03 Paolo Carlini <paolo.carlini@oracle.com>
  145. PR c++/63558
  146. * decl.c (identify_goto): Return a bool if diagnostic is emitted.
  147. (check_previous_goto_1): Consistently emit permerror + inform.
  148. (check_goto): Likewise.
  149. 2014-12-03 Richard Biener <rguenther@suse.de>
  150. * constexpr.c (cxx_eval_builtin_function_call): Use
  151. fold_build_call_array_loc.
  152. 2014-12-02 Marek Polacek <polacek@redhat.com>
  153. * constexpr.c (cxx_eval_check_shift_p): New function.
  154. (cxx_eval_binary_expression): Call it. Set NON_CONSTANT_P if it
  155. returns true.
  156. 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
  157. PR c++/60859
  158. * decl.c (reshape_init_r): Do not reject value-initialization of
  159. scalar array element.
  160. 2014-12-01 Marek Polacek <polacek@redhat.com>
  161. PR sanitizer/63956
  162. * constexpr.c: Include ubsan.h.
  163. (cxx_eval_call_expression): Bail out for IFN_UBSAN_{NULL,BOUNDS}
  164. internal functions and for ubsan builtins.
  165. * error.c: Include internal-fn.h.
  166. (dump_expr): Add printing of internal functions.
  167. 2014-12-01 Marek Polacek <polacek@redhat.com>
  168. * constexpr.c (literal_type_p): Return true for void type in C++14.
  169. 2014-12-01 Paolo Carlini <paolo.carlini@oracle.com>
  170. PR c++/60845
  171. * typeck.c (finish_class_member_access_expr): Use %q#T instead of
  172. %qD in error message.
  173. 2014-11-29 Jakub Jelinek <jakub@redhat.com>
  174. * cp-gimplify.c (cxx_omp_clause_apply_fn): Remove NULL last argument
  175. from create_tmp_var calls.
  176. 2014-11-28 Marek Polacek <polacek@redhat.com>
  177. PR c/63862
  178. * typeck.c (cp_build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
  179. convert the right operand to integer type.
  180. 2014-11-27 Kai Tietz <ktietz@redhat.com>
  181. PR c++/63904
  182. * constexpr.c (cxx_eval_vec_init_1): Avoid
  183. type-overflow issue.
  184. 2014-11-26 Jason Merrill <jason@redhat.com>
  185. Allow partial specialization of variable templates.
  186. * cp-tree.h (TINFO_USED_TEMPLATE_ID): New.
  187. * decl.c (duplicate_decls): Copy it.
  188. * error.c (dump_decl) [TEMPLATE_ID_EXPR]: Handle variables.
  189. * parser.c (cp_parser_decltype_expr): Do call finish_id_expression
  190. on template-ids.
  191. * pt.c (register_specialization): Remember variable template insts.
  192. (instantiate_template_1): Find the matching partial specialization.
  193. (check_explicit_specialization): Allow variable partial specialization.
  194. (process_partial_specialization): Likewise.
  195. (push_template_decl_real): Likewise.
  196. (more_specialized_partial_spec): Rename from more_specialized_class.
  197. (most_specialized_partial_spec): Rename from most_specialized_class.
  198. (get_partial_spec_bindings): Rename from get_class_bindings.
  199. 2014-11-26 Paolo Carlini <paolo.carlini@oracle.com>
  200. PR c++/63757
  201. * call.c (standard_conversion): Do not require expr to be non-null
  202. when NULLPTR_TYPE_P (from) is true.
  203. 2014-11-26 Jason Merrill <jason@redhat.com>
  204. * constexpr.c (cxx_eval_constant_expression) [SAVE_EXPR]: Avoid
  205. multiple evaluation.
  206. * constexpr.c (cxx_eval_call_expression): Don't talk about
  207. flowing off the end if we're already non-constant.
  208. 2014-11-26 Ville Voutilainen <ville.voutilainen@gmail.com>
  209. Diagnose string constant conversion to char* in c++11 and above
  210. as forbidden, not deprecated.
  211. * typeck.c (string_conv_p): Do a pedwarn in c++11 and above,
  212. change the diagnostic for the Wwrite-strings case for c++11 and above.
  213. 2014-11-24 Jason Merrill <jason@redhat.com>
  214. * pt.c (lookup_template_variable): Always unknown_type_node.
  215. 2014-11-25 Paolo Carlini <paolo.carlini@oracle.com>
  216. PR c++/63786
  217. * parser.c (cp_parser_label_for_labeled_statement): Check the case
  218. with check_for_bare_parameter_packs.
  219. 2014-11-24 Jonathan Wakely <jwakely@redhat.com>
  220. Paolo Carlini <paolo.carlini@oracle.com>
  221. PR c++/63203
  222. * decl.c (initialize_local_var): Add -Winit-self warning for
  223. references initialized with themselves.
  224. 2014-11-24 Jason Merrill <jason@redhat.com>
  225. PR c++/63942
  226. * mangle.c (mangle_decl): If we aren't going to create a symbol
  227. alias, don't build the alias DECL either.
  228. 2014-11-24 Paolo Carlini <paolo.carlini@oracle.com>
  229. PR c++/63905
  230. * cp-tree.h (lang_decl_fn): Remove constructor_attr, destructor_attr.
  231. 2014-11-21 Jason Merrill <jason@redhat.com>
  232. PR c++/63657
  233. PR c++/38958
  234. * call.c (set_up_extended_ref_temp): Set TREE_USED on the reference
  235. if the temporary has a non-trivial destructor.
  236. * decl.c (poplevel): Don't look through references.
  237. PR c++/63942
  238. * name-lookup.c (supplement_binding_1): Override a mangling alias.
  239. * mangle.c (maybe_remove_implicit_alias): New.
  240. (mangle_decl): Always avoid creating conflicting alias.
  241. * cp-tree.h: Adjust.
  242. PR c++/63849
  243. * mangle.c (decl_mangling_context): Use template_type_parameter_p.
  244. PR c++/63588
  245. * pt.c (uses_template_parms): Handle null argument.
  246. 2014-11-21 Jakub Jelinek <jakub@redhat.com>
  247. PR target/63764
  248. * typeck.c (cp_build_array_ref): Adjust
  249. convert_vector_to_pointer_for_subscript caller. If it returns true,
  250. call non_lvalue_loc on the result.
  251. 2014-11-20 Jason Merrill <jason@redhat.com>
  252. PR c++/63658
  253. * pt.c (convert_nontype_argument): Call convert_from_reference.
  254. (check_instantiated_arg): Don't be confused by reference refs.
  255. (unify): Look through reference refs on the arg, too.
  256. * mangle.c (write_template_arg): Look through reference refs.
  257. * error.c (dump_expr): Avoid printing (*&i) for references.
  258. 2014-11-20 Ville Voutilainen <ville.voutilainen@gmail.com>
  259. PR c++/63959
  260. * tree.c (trivially_copyable_p): Check for CP_TYPE_VOLATILE_P.
  261. 2014-11-20 Trevor Saunders <tsaunders@mozilla.com>
  262. * cp-objcp-common.c: Use hash_table instead of htab.
  263. 2014-11-19 Jason Merrill <jason@redhat.com>
  264. PR c++/56041
  265. * cp-tree.h (struct processing_template_decl_sentinel): New.
  266. * pt.c (instantiate_non_dependent_expr_internal): Split out from...
  267. (instantiate_non_dependent_expr_sfinae): Here.
  268. (convert_nontype_argument): Use them.
  269. * constexpr.c (fold_non_dependent_expr): Use them.
  270. PR c++/63885
  271. * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't
  272. complain yet about a reference.
  273. [TARGET_EXPR]: Handle TARGET_EXPR with addr == true.
  274. [ADDR_EXPR]: Make sure we don't take the address of a CONSTRUCTOR.
  275. (cxx_bind_parameters_in_call): In the new scheme addr is always false.
  276. * typeck.c (build_address): Don't take the address of a CONSTRUCTOR.
  277. PR c++/57979
  278. * init.c (decl_really_constant_value): Rename from
  279. integral_constant_value.
  280. (scalar_constant_value): Similar but limited to scalar results.
  281. (decl_constant_value_safe): Remove.
  282. (constant_value_1): Respect return_aggregate_cst_ok_p.
  283. * typeck.c (decay_conversion): Use scalar_constant_value.
  284. * call.c (convert_like_real): Likewise.
  285. * cvt.c (ocp_convert): No need to check CLASS_TYPE_P.
  286. * typeck.c (decay_conversion): Or ARRAY_TYPE.
  287. * constexpr.c (struct constexpr_ctx): Add strict field.
  288. (cxx_eval_constant_expression) [VAR_DECL]: Use it to select between
  289. decl_constant_value and decl_really_constant_value.
  290. (cxx_eval_outermost_constant_expr): Add strict parm.
  291. (maybe_constant_init): Not strict.
  292. (potential_constant_expression_1): Add strict parm.
  293. Shorten most internal calls with RECUR macro.
  294. * cp-tree.h, pt.c, semantics.c: Adjust.
  295. 2014-11-19 Jason Merrill <jason@redhat.com>
  296. PR c++/63928
  297. * constexpr.c (cxx_eval_store_expression): Return init, not *valp.
  298. 2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
  299. PR c++/55425
  300. * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
  301. and __PRETTY_FUNCTION__.
  302. 2014-11-18 Jason Merrill <jason@redhat.com>
  303. PR c++/63924
  304. * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: A load
  305. from a variable of empty class type is constant.
  306. * constexpr.c (cxx_eval_statement_list): Handle statement-expressions.
  307. (potential_constant_expression_1): Handle STMT_EXPR.
  308. * constexpr.c (cxx_eval_constant_expression): Give jump_target a
  309. default argument.
  310. (lots): Omit NULL jump_target arguments.
  311. * constexpr.c (struct constexpr_ctx): Add quiet field.
  312. (cxx_eval_outermost_constant_expr, is_sub_constant_expr): Set it.
  313. (lots): Replace allow_non_constant parameter with ctx->quiet.
  314. PR c++/63940
  315. * constexpr.c (cxx_eval_binary_expression): Don't assume the
  316. expression was already folded.
  317. (cxx_eval_unary_expression): Likewise.
  318. 2014-11-18 Marc Glisse <marc.glisse@inria.fr>
  319. PR libstdc++/43622
  320. * rtti.c (emit_support_tinfos): Handle __float128.
  321. 2014-11-18 Jason Merrill <jason@redhat.com>
  322. PR c++/63925
  323. * constexpr.c (cxx_eval_increment_expression): Use POINTER_PLUS_EXPR.
  324. PR c++/63934
  325. * constexpr.c (cxx_eval_call_expression): Check DECL_CONSTRUCTOR_P
  326. rather than VOID_TYPE_P.
  327. * pt.c (instantiate_template_1): Use tsubst_aggr_type for context.
  328. PR c++/58102
  329. * typeck2.c (store_init_value): Set it.
  330. * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New.
  331. * constexpr.c (cxx_eval_outermost_constant_expr): Check it.
  332. 2014-11-17 Jason Merrill <jason@redhat.com>
  333. PR c++/33911
  334. * call.c (build_call_a): Don't warn_deprecated_use here.
  335. (build_over_call): Or here.
  336. * decl2.c (mark_used): Do it here.
  337. (is_late_template_attribute): Attribute deprecated is not deferred.
  338. (cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
  339. * parser.c (cp_parser_template_name): Warn about deprecated template.
  340. (cp_parser_template_argument): Likewise.
  341. PR c++/50473
  342. * decl.c (cp_finish_decl): Don't try to process a non-dependent
  343. constant initializer for a reference.
  344. * pt.c (value_dependent_expression_p): A reference is always
  345. dependent.
  346. * call.c (extend_ref_init_temps_1): Also clear TREE_SIDE_EFFECTS
  347. on any NOP_EXPRs.
  348. Handle C++14 constexpr flow control.
  349. * constexpr.c (cxx_eval_loop_expr, cxx_eval_switch_expr): New.
  350. (cxx_eval_statement_list): New.
  351. (cxx_eval_constant_expression): Handle LABEL_EXPR,
  352. CASE_LABEL_EXPR, GOTO_EXPR, LOOP_EXPR, SWITCH_EXPR. Handle jump
  353. semantics of RETURN_EXPR.
  354. (many functions): Add jump_target parameter.
  355. (returns, breaks, continues, switches, label_matches): New.
  356. * cp-tree.h (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): New.
  357. * cp-gimplify.c (begin_bc_block): Set them.
  358. * cp-gimplify.c (genericize_cp_loop): Use LOOP_EXPR.
  359. (genericize_for_stmt): Handle null statement-list.
  360. * constexpr.c (use_new_call): Always use new call handling.
  361. C++14 constexpr support (minus loops and multiple returns)
  362. * constexpr.c (use_new_call): New macro.
  363. (build_data_member_initialization): Ignore non-mem-inits.
  364. (check_constexpr_bind_expr_vars): Remove C++14 checks.
  365. (constexpr_fn_retval): Likewise.
  366. (check_constexpr_ctor_body): Do nothing in C++14.
  367. (massage_constexpr_body): In C++14 only collect mem-inits.
  368. (get_function_named_in_call): Handle null CALL_EXPR_FN.
  369. (cxx_bind_parameters_in_call): Build bindings in same order as
  370. parameters. Don't treat iniviref parms specially in new call mode.
  371. (cxx_eval_call_expression): If use_new_call, do constexpr expansion
  372. based on DECL_SAVED_TREE rather than the massaged constexpr body.
  373. Set up ctx->object from AGGR_INIT_EXPR_SLOT if we don't have one.
  374. (is_sub_constant_expr): Don't mess with ctx.ctor here.
  375. (cxx_eval_component_reference): A null element means we're mid-
  376. initialization.
  377. (cxx_eval_store_expression, cxx_eval_increment_expression): New.
  378. (cxx_eval_constant_expression): Handle RESULT_DECL, DECL_EXPR,
  379. MODIFY_EXPR, STATEMENT_LIST, BIND_EXPR, USING_STMT,
  380. PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
  381. POSTDECREMENT_EXPR. Don't look into DECL_INITIAL of variables in
  382. constexpr functions. In new-call mode find parms in the values table.
  383. (potential_constant_expression_1): Handle null CALL_EXPR_FN.
  384. Handle STATEMENT_LIST, MODIFY_EXPR, MODOP_EXPR, IF_STMT,
  385. PREINCREMENT_EXPR, POSTINCREMENT_EXPR, PREDECREMENT_EXPR,
  386. POSTDECREMENT_EXPR, BIND_EXPR, WITH_CLEANUP_EXPR,
  387. CLEANUP_POINT_EXPR, MUST_NOT_THROW_EXPR, TRY_CATCH_EXPR,
  388. EH_SPEC_BLOCK, EXPR_STMT, DECL_EXPR, CASE_LABEL_EXPR, BREAK_STMT,
  389. CONTINUE_STMT, USING_STMT, IF_STMT, DO_STMT, FOR_STMT, WHILE_STMT,
  390. SWITCH_STMT, ASM_EXPR.
  391. (cxx_eval_vec_init_1): Call build_aggr_init_expr.
  392. (cxx_eval_indirect_ref): Don't return a CONSTRUCTOR when the
  393. caller wants an lvalue.
  394. (cxx_eval_outermost_constant_expr): Pull object out of AGGR_INIT_EXPR.
  395. (maybe_constant_init): Look through INIT_EXPR.
  396. (ensure_literal_type_for_constexpr_object): Set
  397. cp_function_chain->invalid_constexpr.
  398. * cp-tree.h (struct language_function): Add invalid_constexpr bitfield.
  399. * decl.c (start_decl): Set cp_function_chain->invalid_constexpr.
  400. (check_for_uninitialized_const_var): Likewise.
  401. (maybe_save_function_definition): Check it.
  402. * parser.c (cp_parser_jump_statement): Set
  403. cp_function_chain->invalid_constexpr.
  404. (cp_parser_asm_definition): Likewise.
  405. PR c++/52282
  406. * decl.c (build_ptrmemfunc_type): Don't build a different
  407. RECORD_TYPE for a qualified PMF.
  408. * cp-tree.h (TYPE_PTRMEMFUNC_FN_TYPE): Merge cv-quals.
  409. (TYPE_PTRMEMFUNC_FN_TYPE_RAW): New.
  410. * decl2.c (cplus_decl_attributes): Use TYPE_PTRMEMFUNC_FN_TYPE_RAW.
  411. * tree.c (cp_walk_subtrees): Likewise.
  412. (cp_build_qualified_type_real): Remove special PMF handling.
  413. 2014-11-15 Jason Merrill <jason@redhat.com>
  414. * parser.c (cp_parser_omp_declare_reduction_exprs): A block is not
  415. an expression.
  416. * constexpr.c (cxx_eval_builtin_function_call): Use
  417. fold_builtin_call_array.
  418. * constexpr.c (cx_check_missing_mem_inits): Clarify error message.
  419. 2014-11-14 Paolo Carlini <paolo.carlini@oracle.com>
  420. * semantics.c (end_maybe_infinite_loop): Use fold_non_dependent_expr.
  421. * parser.c (cp_parser_omp_clause_collapse): Likewise.
  422. (cp_parser_enumerator_definition): Don't call
  423. instantiate_non_dependent_expr...
  424. * decl.c (build_enumerator): ... call fold_non_dependent_expr here.
  425. * typeck2.c (massage_init_elt): Use fold_non_dependent_expr.
  426. * constexpr.c (maybe_constant_value): Allow VIEW_CONVERT_EXPR in
  427. the final gcc_assert.
  428. * constexpr.c (fold_non_dependent_expr): Add.
  429. * cp-tree.h (fold_non_dependent_expr): Declare it.
  430. * call.c (null_ptr_cst_p): Use it.
  431. * pt.c (tsubst_copy_and_build, build_non_dependent_expr): Likewise.
  432. * semantics.c (begin_maybe_infinite_loop): Likewise.
  433. * typeck.c (cp_build_binary_op): Likewise.
  434. * typeck2.c (check_narrowing): Likewise.
  435. * pt.c (fold_non_dependent_expr): Rename to
  436. instantiate_non_dependent_expr.
  437. (fold_non_dependent_expr_sfinae): Rename to
  438. instantiate_non_dependent_expr_sfinae.
  439. (convert_nontype_argument, build_non_dependent_expr): Adjust.
  440. * decl.c (compute_array_index_type): Likewise.
  441. * parser.c (cp_parser_parenthesized_expression_list,
  442. cp_parser_enumerator_definition, cp_parser_omp_clause_collapse):
  443. Likewise.
  444. * semantics.c (end_maybe_infinite_loop, finish_static_assert):
  445. Likewise.
  446. * typeck.c (cxx_alignas_expr): Likewise.
  447. * typeck2.c (store_init_value, massage_init_elt): Likewise.
  448. * call.c: Adjust comments.
  449. * class.c: Likewise.
  450. * constexpr.c: Likewise.
  451. * decl2.c: Likewise.
  452. * tree.c: Likewise.
  453. 2014-11-14 Jonathan Wakely <jwakely@redhat.com>
  454. * mangle.c (find_substitution): Look for abi_tag on class templates.
  455. 2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
  456. Thomas Schwinge <thomas@codesourcery.com>
  457. Ilya Verbin <ilya.verbin@intel.com>
  458. Andrey Turetskiy <andrey.turetskiy@intel.com>
  459. * Make-lang.in (c++.install-common): Do not install for the offload
  460. compiler.
  461. 2014-11-13 Kai Tietz <ktietz@redhat.com>
  462. * cp-tree.h (cp_build_function_call): Remove prototype.
  463. (cp_build_addr_expr_strict): Likewise.
  464. (build_typed_address): Likewise.
  465. * typeck.c (build_typed_address): Removed.
  466. (cp_build_addr_expr_strict): Make static.
  467. (cp_build_function_call): Likewise.
  468. 2014-11-12 Paolo Carlini <paolo.carlini@oracle.com>
  469. DR 1510
  470. PR c++/60420
  471. * cp-tree.h (struct cp_decl_specifier_seq): Add decltype_p bool field.
  472. * decl.c (grokdeclarator): Use it.
  473. * parser.c (cp_parser_simple_type_specifier): Likewise.
  474. * pt.c (tsubst, case DECLTYPE_TYPE): Use tf_ignore_bad_quals.
  475. 2014-11-11 Paolo Carlini <paolo.carlini@oracle.com>
  476. PR c++/63265
  477. * pt.c (tsubst_copy_and_build, case COND_EXPR): Maybe fold to
  478. constant the condition.
  479. 2014-11-10 Andi Kleen <ak@linux.intel.com>
  480. * semantics.c (finish_goto_stmt): Call check_no_cilk.
  481. (finish_while_stmt_cond): Dito.
  482. (finish_do_stmt): Dito.
  483. (finish_for_cond): Dito.
  484. (finish_switch_cond): Dito.
  485. 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
  486. * typeck.c (cp_build_binary_op): Use OPT_Wshift_count_negative and
  487. OPT_Wshift_count_overflow in the warnings.
  488. 2014-11-09 Jason Merrill <jason@redhat.com>
  489. DR 799
  490. * typeck.c (build_reinterpret_cast_1): reinterpret_cast to the
  491. same scalar type is an rvalue.
  492. DR 2007
  493. * call.c (build_new_op_1): Don't do non-class lookup for =, -> or [].
  494. 2014-11-07 Jason Merrill <jason@redhat.com>
  495. DR 1558
  496. * pt.c (dependent_alias_template_spec_p): New.
  497. (dependent_type_p_r): Handle dependent alias template specialization.
  498. (template_args_equal): A dependent alias template specializations
  499. is not equal to its underlying type as a template argument.
  500. * tree.c (strip_typedefs): Don't strip a dependent alias
  501. template-id.
  502. * parser.c (cp_parser_unqualified_id): Handle __func__ here.
  503. (cp_parser_primary_expression): Not here.
  504. 2014-11-07 Thomas Preud'homme <thomas.preudhomme@arm.com>
  505. PR c++/63366
  506. * decl.c (grokdeclarator): Fix __complex meaning __complex double.
  507. 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
  508. * constexpr.c: Remove redundant enum from machine_mode.
  509. 2014-10-28 Jason Merrill <jason@redhat.com>
  510. * constexpr.c (cxx_eval_outermost_constant_expr): Tweak.
  511. 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
  512. * call.c: Adjust include files.
  513. * class.c: Ditto.
  514. * decl2.c: Ditto.
  515. * decl.c: Ditto.
  516. * lambda.c: Ditto.
  517. * mangle.c: Ditto.
  518. * method.c: Ditto.
  519. * optimize.c: Ditto.
  520. * parser.c: Ditto.
  521. * semantics.c: Ditto.
  522. * tree.c: Ditto.
  523. * vtable-class-hierarchy.c: Ditto.
  524. 2014-10-24 Jason Merrill <jason@redhat.com>
  525. Implement N3653 (Member initializers and aggregates) and fix
  526. references to 'this' in constexpr constructors.
  527. * class.c (check_field_decls): In C++14 an NSDMI does not make the
  528. class non-aggregate.
  529. * constexpr.c (struct constexpr_ctx): New.
  530. (cxx_bind_parameters_in_call): Handle 'this'.
  531. (cxx_eval_call_expression): Create new constexpr_ctx.
  532. (cxx_eval_component_reference): Check CONSTRUCTOR_NO_IMPLICIT_ZERO.
  533. (initialized_type, init_subob_ctx, verify_ctor_sanity): New.
  534. (cxx_eval_bare_aggregate): Use them. Build CONSTRUCTOR early.
  535. (cxx_eval_vec_init_1): Likewise.
  536. (cxx_eval_constant_expression) [PARM_DECL]: Allow 'this'.
  537. [TARGET_EXPR]: Build new constexpr_ctx.
  538. [PLACEHOLDER_EXPR]: New.
  539. (cxx_eval_outermost_constant_expr): Build new constexpr_ctx. Add
  540. object parameter.
  541. (is_sub_constant_expr): Build new constexpr_ctx.
  542. (potential_constant_expression_1): Handle PLACEHOLDER_EXPR.
  543. Allow 'this'.
  544. * cp-gimplify.c (cp_gimplify_init_expr): Call replace_placeholders.
  545. * cp-tree.h (CONSTRUCTOR_NO_IMPLICIT_ZERO): New.
  546. * error.c (dump_expr): Handle PLACEHOLDER_EXPR.
  547. * init.c (get_nsdmi): Generate PLACEHOLDER_EXPR.
  548. * tree.c (lvalue_kind): Handle PLACEHOLDER_EXPR.
  549. (build_ctor_subob_ref, replace_placeholders): New.
  550. * typeck2.c (store_init_value): Use replace_placeholders.
  551. (process_init_constructor_record): Make zero-init before NSDMI
  552. explicit.
  553. 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
  554. * cp-gimplify.c: Adjust include files.
  555. 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
  556. PR c++/53061
  557. * cp-objcp-common.c: Do not include new.
  558. (cxx_initialize_diagnostics): Move from here to ...
  559. * error.c (cxx_initialize_diagnostics): : ... here. Move
  560. diagnostics initialization here from init_error.
  561. (cxx_pp): Use a real pointer not a macro.
  562. (init_error): Just initialize cxx_pp.
  563. * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
  564. not set maximum line length.
  565. 2014-10-23 Jonathan Wakely <jwakely@redhat.com>
  566. PR c++/63619
  567. * decl2.c (delete_sanity): Use OPT_Wdelete_incomplete in warning.
  568. 2014-10-21 Paolo Carlini <paolo.carlini@oracle.com>
  569. * parser.c (cp_parser_unary_expression): Add default arguments.
  570. (cp_parser_cast_expression, cp_parser_sizeof_operand,
  571. cp_parser_omp_atomic): Adjust.
  572. 2014-10-20 Jason Merrill <jason@redhat.com>
  573. PR c++/63601
  574. * lambda.c (current_nonlambda_function): New.
  575. * semantics.c (finish_this_expr): Use it.
  576. * cp-tree.h: Declare it.
  577. 2014-10-17 Alan Modra <amodra@gmail.com>
  578. PR middle-end/61848
  579. * decl.c (merge_decls): Don't merge section name, comdat group or
  580. tls model to newdecl symtab node, instead merge to olddecl.
  581. Override existing olddecl section name. Set tls_model for all
  582. thread-local vars, not just OMP thread-private ones. Remove
  583. incorrect comment.
  584. 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
  585. * cp-tree.h: Adjust include files.
  586. 2014-10-15 Jason Merrill <jason@redhat.com>
  587. PR c++/63528
  588. * pt.c (lookup_template_variable): Call coerce_template_parms.
  589. 2014-10-15 Paolo Carlini <paolo.carlini@oracle.com>
  590. * semantics.c (is_instantiation_of_constexpr, literal_type_p,
  591. ensure_literal_type_for_constexpr_object,
  592. constexpr_fundef_hasher::equal, constexpr_fundef_hasher::hash,
  593. retrieve_constexpr_fundef, is_valid_constexpr_fn,
  594. build_anon_member_initialization, build_data_member_initialization,
  595. check_constexpr_bind_expr_vars, check_constexpr_ctor_body_1,
  596. check_constexpr_ctor_body, sort_constexpr_mem_initializers,
  597. build_constexpr_constructor_member_initializers, constexpr_fn_retval,
  598. massage_constexpr_body, cx_check_missing_mem_inits,
  599. register_constexpr_fundef, explain_invalid_constexpr_fn,
  600. constexpr_call_hasher::hash, constexpr_call_hasher::equal,
  601. maybe_initialize_constexpr_call_table, get_function_named_in_call,
  602. get_nth_callarg, lookup_parameter_binding,
  603. cxx_eval_builtin_function_call, adjust_temp_type,
  604. cxx_bind_parameters_in_call, push_cx_call_context,
  605. pop_cx_call_context, cx_error_context, cxx_eval_call_expression,
  606. reduced_constant_expression_p, verify_constant,
  607. cxx_eval_unary_expression, cxx_eval_binary_expression,
  608. cxx_eval_conditional_expression, cxx_eval_array_reference,
  609. cxx_eval_component_reference, cxx_eval_bit_field_ref,
  610. cxx_eval_logical_expression, base_field_constructor_elt,
  611. cxx_eval_bare_aggregate, cxx_eval_vec_init_1, cxx_eval_vec_init,
  612. cxx_fold_indirect_ref, cxx_eval_indirect_ref, non_const_var_error,
  613. cxx_eval_trinary_expression, var_in_constexpr_fn,
  614. cxx_eval_constant_expression, cxx_eval_outermost_constant_expr,
  615. is_sub_constant_expr, cxx_constant_value, maybe_constant_value,
  616. maybe_constant_init, potential_constant_expression_1,
  617. potential_constant_expression, potential_rvalue_constant_expression,
  618. require_potential_constant_expression,
  619. require_potential_rvalue_constant_expression): Moved definitions...
  620. * constexpr.c: ... here, new file.
  621. * Make-lang.in: Update.
  622. * config-lang.in: Likewise.
  623. 2014-10-14 Jason Merrill <jason@redhat.com>
  624. PR c++/63455
  625. * parser.c (struct saved_token_sentinel): New.
  626. (cp_parser_statement): Use it.
  627. (cp_parser_start_tentative_firewall): New.
  628. (cp_parser_end_tentative_firewall): New.
  629. (cp_parser_lambda_expression): Use them.
  630. (cp_parser_statement_expr): New.
  631. (cp_parser_primary_expression): Use it.
  632. 2014-10-14 DJ Delorie <dj@redhat.com>
  633. * typeck.c (cp_common_type): Check for all __intN types, not just
  634. __int128.
  635. * decl.c (grokdeclarator): Likewise.
  636. * rtti.c (emit_support_tinfos): Check for all __intN types, not just
  637. __int128.
  638. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Check
  639. for all __intN types, not just __int128.
  640. (cp_parser_simple_type_specifier): Likewise.
  641. * mangle.c (integer_type_codes): Remove int128-specific codes.
  642. * cp-tree.h (cp_decl_specifier_seq): Add int_n_idx to store which
  643. __intN was specified.
  644. * lex.c (init_reswords): Reserve all __intN keywords.
  645. 2014-10-14 Marc Glisse <marc.glisse@inria.fr>
  646. * typeck.c (cp_build_unary_op) [TRUTH_NOT_EXPR]: Accept float vectors.
  647. 2014-10-13 H.J. Lu <hongjiu.lu@intel.com>
  648. * mangle.c (mangle_conv_op_name_for_type): Cast elements to
  649. unsigned long.
  650. (print_template_statistics): Cast size and elements to long.
  651. 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
  652. * cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
  653. pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
  654. hashtab.
  655. 2014-10-10 Jason Merrill <jason@redhat.com>
  656. PR c++/62115
  657. * class.c (build_base_path): Preserve rvalueness.
  658. * call.c (convert_like_real) [ck_base]: Let convert_to_base handle &/*.
  659. * rtti.c (build_dynamic_cast_1): Call convert_to_reference later.
  660. PR c++/63194
  661. * method.c (defaulted_late_check): Call maybe_instantiate_noexcept.
  662. * method.c (implicitly_declare_fn): Handle deleted lambda default
  663. ctor and copy assop here.
  664. * class.c (check_bases_and_members): Not here.
  665. (add_implicitly_declared_members): And don't set
  666. CLASSTYPE_LAZY_MOVE_ASSIGN.
  667. * semantics.c (finish_id_expression): Check for error_mark_node.
  668. 2014-10-09 Jason Merrill <jason@redhat.com>
  669. PR c++/63207
  670. * semantics.c (outer_var_p): Non-static.
  671. (process_outer_var_ref): Split out from finish_id_expression.
  672. * pt.c (tsubst_copy_and_build): Call them.
  673. * cp-tree.h: Declare them.
  674. 2014-10-09 Paolo Carlini <paolo.carlini@oracle.com>
  675. * semantics.c (check_constexpr_ctor_body_1): New.
  676. (check_constexpr_ctor_body): Use it; add bool parameter.
  677. (build_data_member_initialization): Handle BIND_EXPR and
  678. USING_STMT in the main conditional.
  679. (build_constexpr_constructor_member_initializers): Do not
  680. handle BIND_EXPR here.
  681. (constexpr_fn_retval): Handle BIND_EXPR in the switch.
  682. (massage_constexpr_body): Don't do it here.
  683. * parser.c (cp_parser_ctor_initializer_opt_and_function_body):
  684. Adjust check_constexpr_ctor_body call.
  685. (cp_parser_compound_statement): Do not pedwarn for compound-statement
  686. in constexpr function in C++14 mode.
  687. * cp-tree.h (check_constexpr_ctor_body): Update declaration.
  688. 2014-10-09 Jason Merrill <jason@redhat.com>
  689. PR c++/63309
  690. * parser.c (cp_parser_class_head): push_template_decl for members
  691. of templates, too.
  692. PR c++/63415
  693. * pt.c (value_dependent_expression_p) [CONSTRUCTOR]: Check the type.
  694. (iterative_hash_template_arg): Likewise.
  695. PR c++/63437
  696. * cp-tree.h (REF_PARENTHESIZED_P): Also allow INDIRECT_REF.
  697. * semantics.c (force_paren_expr): And set it.
  698. * typeck.c (check_return_expr): And handle it.
  699. 2014-10-09 Marc Glisse <marc.glisse@inria.fr>
  700. * decl.c (grokdeclarator): constexpr only implies const in C++11.
  701. 2014-10-08 Jason Merrill <jason@redhat.com>
  702. PR c++/63405
  703. * pt.c (tsubst_pack_expansion): Limit simple expansion to type packs.
  704. PR c++/63485
  705. * tree.c (build_cplus_array_type): Look for a type with no
  706. typedef-name or attributes.
  707. * call.c (call_copy_ctor): New.
  708. (build_over_call): Use it to avoid infinite recursion on invalid code.
  709. 2014-10-07 Jason Merrill <jason@redhat.com>
  710. * tree.c (cp_tree_equal) [TRAIT_EXPR]: Use cp_tree_equal for type2.
  711. 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
  712. * cp/parser.c: Allow [[deprecated]] for C++11. Issue a pedwarn.
  713. 2014-10-06 Paolo Carlini <paolo.carlini@oracle.com>
  714. PR c++/55250
  715. * semantics.c (check_constexpr_bind_expr_vars): New.
  716. (check_constexpr_ctor_body, massage_constexpr_body): Use it.
  717. (build_constexpr_constructor_member_initializers): Handle
  718. BIND_EXPR in the main conditional.
  719. 2014-10-02 Mark Wielaard <mjw@redhat.com>
  720. PR debug/63239
  721. * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_DELETED_P): Define.
  722. (cp_function_decl_deleted_p): New prototype.
  723. * cp-objcp-common.c (cp_function_deleted_p): New function.
  724. 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
  725. PR c++/54427
  726. PR c++/57198
  727. PR c++/58845
  728. * typeck.c (cp_build_binary_op): save_expr after convert to save
  729. redundant operations.
  730. [TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR]: Handle vectors.
  731. (cp_build_unary_op) [TRUTH_NOT_EXPR]: Likewise.
  732. 2014-10-03 Jason Merrill <jason@redhat.com>
  733. * decl.c (start_decl): Complain about static/thread_local vars
  734. in constexpr function.
  735. (check_for_uninitialized_const_var): Also uninitialized vars.
  736. * parser.c (cp_parser_jump_statement): And gotos.
  737. (cp_parser_asm_operand_list): And asm.
  738. (cp_parser_try_block): And try.
  739. * semantics.c (ensure_literal_type_for_constexpr_object): And
  740. non-literal.
  741. * semantics.c (constexpr_fn_retval): Ignore declarations in C++14.
  742. (var_in_constexpr_fn): New.
  743. (cxx_eval_constant_expression): Look into DECL_INITIAL.
  744. (potential_constant_expression_1): Allow constexpr-local vars.
  745. PR c++/63362
  746. * tree.c (strip_typedefs): Handle TREE_LIST.
  747. 2014-10-03 Paolo Carlini <paolo.carlini@oracle.com>
  748. * parser.c (cp_parser_assignment_expression,
  749. cp_parser_constant_expression): Add default arguments.
  750. (cp_parser_primary_expression,
  751. cp_parser_postfix_open_square_expression,
  752. cp_parser_parenthesized_expression_list,
  753. cp_parser_question_colon_clause,
  754. cp_parser_expression, cp_parser_constant_expression,
  755. cp_parser_label_for_labeled_statement, cp_parser_static_assert,
  756. cp_parser_template_argument, cp_parser_enumerator_definition,
  757. cp_parser_member_declaration, cp_parser_constant_initializer,
  758. cp_parser_noexcept_specification_opt, cp_parser_throw_expression,
  759. cp_parser_std_attribute_spec, cp_parser_objc_message_args,
  760. cp_parser_objc_class_ivars, cp_parser_omp_clause_collapse,
  761. cp_parser_omp_clause_aligned, cp_parser_omp_clause_safelen,
  762. cp_parser_omp_clause_simdlen, cp_parser_omp_clause_dist_schedule,
  763. cp_parser_omp_for_incr, cp_parser_omp_for_loop_init,
  764. cp_parser_cilk_simd_vectorlength, cp_parser_cilk_simd_linear): Adjust.
  765. 2014-10-02 Paolo Carlini <paolo.carlini@oracle.com>
  766. PR c++/53025
  767. * cp-tree.h (struct saved_scope): Add noexcept_operand.
  768. (cp_noexcept_operand): Define.
  769. * call.c (build_over_call): Use it.
  770. * parser.c (cp_parser_unary_expression, [RID_NOEXCEPT]): Likewise.
  771. * pt.c (tsubst_copy_and_build, [NOEXCEPT_EXPR]): Likewise.
  772. 2014-10-01 Jason Merrill <jason@redhat.com>
  773. PR c++/63362
  774. * method.c (constructible_expr): Handle value-init of non-class.
  775. * parser.c (cp_parser_trait_expr): Allow pack expansion.
  776. * pt.c (tsubst_copy_and_build): Handle pack expansion.
  777. PR c++/63362
  778. * class.c (type_has_non_user_provided_default_constructor): Rename
  779. from type_has_user_provided_default_constructor, reverse sense.
  780. (default_init_uninitialized_part, explain_non_literal_class): Adjust.
  781. (check_bases_and_members): Set TYPE_HAS_COMPLEX_DFLT.
  782. * call.c (build_new_method_call_1): Adjust.
  783. * cp-tree.h: Adjust.
  784. * decl.c (grok_special_member_properties): Don't set
  785. TYPE_HAS_COMPLEX_DFLT.
  786. * init.c (build_value_init_noctor): Don't use
  787. type_has_user_provided_default_constructor.
  788. 2014-09-30 Jason Merrill <jason@redhat.com>
  789. * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_ASSIGNABLE and
  790. CPTK_IS_TRIVIALLY_CONSTRUCTIBLE.
  791. * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
  792. * parser.c (cp_parser_primary_expression): Likewise.
  793. (cp_parser_trait_expr): Likewise. Handle variadic trait.
  794. * semantics.c (trait_expr_value): Likewise.
  795. (finish_trait_expr): Likewise.
  796. (check_trait_type): Handle variadic trait. Return bool.
  797. * method.c (build_stub_object): Add rvalue reference here.
  798. (locate_fn_flags): Not here.
  799. (check_nontriv, assignable_expr, constructible_expr): New.
  800. (is_trivially_xible): New.
  801. * cp-tree.h (cp_trait_kind): Add CPTK_IS_TRIVIALLY_COPYABLE.
  802. * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
  803. * parser.c (cp_parser_primary_expression): Likewise.
  804. (cp_parser_trait_expr): Likewise.
  805. * semantics.c (trait_expr_value): Likewise.
  806. (finish_trait_expr): Likewise.
  807. * method.c (build_stub_object): Use CONVERT_EXPR.
  808. * tree.c (build_dummy_object): Likewise.
  809. (is_dummy_object): Adjust.
  810. * cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
  811. * cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
  812. * semantics.c (trait_expr_value): Likewise.
  813. (finish_trait_expr): Likewise.
  814. * parser.c (cp_parser_primary_expression): Likewise.
  815. (cp_parser_trait_expr): Likewise. Remove redundant grokdeclarator.
  816. 2014-09-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
  817. PR c++/16564
  818. * error.c (print_instantiation_context): Delete.
  819. * typeck2.c (build_x_arrow): Record location when pushing
  820. template instantiation.
  821. * pt.c (push_tinst_level): Make it a wrapper around ...
  822. (push_tinst_level_loc): ... this. New function. Make excessive
  823. template instantiation depth a fatal error. Record location. Use
  824. bool as return type.
  825. (instantiate_pending_templates): Make excessive
  826. template instantiation depth a fatal error.
  827. (problematic_instantiation_changed): Use bool as return type.
  828. * cp-tree.h (print_instantiation_context): Delete.
  829. (push_tinst_level): Update declaration.
  830. (problematic_instantiation_changed): Likewise.
  831. (push_tinst_level_loc): New.
  832. 2014-09-29 Richard Biener <rguenther@suse.de>
  833. * typeck.c (enum_cast_to_int): Use CONVERT_EXPR_P to check
  834. for conversions.
  835. 2014-09-26 Jason Merrill <jason@redhat.com>
  836. * mangle.c (find_substitution): Use write_abi_tags.
  837. 2014-09-25 Marek Polacek <polacek@redhat.com>
  838. PR c++/61945
  839. * class.c (warn_hidden): Check for FUNCTION_DECL.
  840. 2014-09-25 Jakub Jelinek <jakub@redhat.com>
  841. PR c++/63249
  842. * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use
  843. on low_bound and length.
  844. 2014-09-24 Aldy Hernandez <aldyh@redhat.com>
  845. * class.c, decl.c, optimize.c: Rename all instances of
  846. DECL_ABSTRACT to DECL_ABSTRACT_P.
  847. 2014-09-24 Marek Polacek <polacek@redhat.com>
  848. PR c/61405
  849. PR c/53874
  850. * semantics.c (finish_switch_cond): Call unlowered_expr_type.
  851. * tree.c (bot_manip): Add default case.
  852. * parser.c (cp_parser_primary_expression): Cast the controlling
  853. expression of a switch to an int.
  854. (cp_parser_unqualified_id): Likewise.
  855. 2014-09-23 Paolo Carlini <paolo.carlini@oracle.com>
  856. PR c++/61857
  857. * parser.c (cp_parser_skip_to_closing_square_bracket,
  858. cp_parser_array_designator_p): New.
  859. (cp_parser_initializer_list): Use the latter.
  860. 2014-09-22 Jason Merrill <jason@redhat.com>
  861. * semantics.c (finish_non_static_data_member): In diagnostic, give
  862. error at point of use and note at point of declaration.
  863. PR c++/63320
  864. PR c++/60463
  865. PR c++/60755
  866. * lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
  867. not finding 'this'.
  868. 2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
  869. PR c++/62219
  870. * pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.
  871. 2014-09-22 Jason Merrill <jason@redhat.com>
  872. * decl.c (poplevel): Don't warn about unused vars in template scope.
  873. * error.c (dump_decl): Handle variable templates.
  874. 2014-09-20 Jason Merrill <jason@redhat.com>
  875. PR c++/62017
  876. * decl.c (begin_destructor_body): Only clobber the as-base part of
  877. *this.
  878. 2014-09-19 Jason Merrill <jason@redhat.com>
  879. PR c++/61392
  880. * mangle.c (write_expression): Use unresolved-name mangling for
  881. DR850 case.
  882. PR c++/61465
  883. * call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
  884. after pulling out an element from a CONSTRUCTOR.
  885. 2014-09-18 Jakub Jelinek <jakub@redhat.com>
  886. PR c++/63248
  887. * semantics.c (finish_omp_clauses): Don't call cp_omp_mappable_type
  888. on type of type dependent expressions, and don't call it if
  889. handle_omp_array_sections has kept TREE_LIST because something
  890. was type dependent.
  891. * pt.c (tsubst_expr) <case OMP_TARGET, case OMP_TARGET_DATA>:
  892. Use keep_next_level, begin_omp_structured_block and
  893. finish_omp_structured_block instead of push_stmt_list and
  894. pop_stmt_list.
  895. 2014-09-18 Paolo Carlini <paolo.carlini@oracle.com>
  896. PR c++/62232
  897. * class.c (finish_struct_1): Do not -Wnon-virtual-dtor warn
  898. for final class types.
  899. 2014-09-15 Jason Merrill <jason@redhat.com>
  900. * pt.c (lookup_template_class_1): Splice out abi_tag attribute if
  901. necessary. Call inherit_targ_abi_tags here.
  902. * class.c (check_bases_and_members): Not here.
  903. (inherit_targ_abi_tags): Check CLASS_TYPE_P.
  904. * cp-tree.h: Declare inherit_targ_abi_tags.
  905. 2014-09-15 Ville Voutilainen <ville.voutilainen@gmail.com>
  906. Do not diagnose lambda default arguments in c++14 modes.
  907. * parser.c (cp_parser_lambda_declarator_opt): Make the pedwarn
  908. conditional.
  909. 2014-09-15 Jakub Jelinek <jakub@redhat.com>
  910. * Make-lang.in (check_g++_parallelize): Change to just an upper bound
  911. number.
  912. 2014-09-13 Marek Polacek <polacek@redhat.com>
  913. PR c++/60862
  914. * parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
  915. location of a call expression.
  916. 2014-09-11 Jason Merrill <jason@redhat.com>
  917. PR c++/63201
  918. * decl.c (start_decl): Handle specialization of member variable
  919. template.
  920. * pt.c (check_explicit_specialization): Adjust error.
  921. 2014-09-11 Paolo Carlini <paolo.carlini@oracle.com>
  922. PR c++/61489
  923. * typeck2.c (process_init_constructor_record): Do not warn about
  924. missing field initializer if EMPTY_CONSTRUCTOR_P (init).
  925. 2014-09-11 Jason Merrill <jason@redhat.com>
  926. PR c++/63139
  927. * pt.c (tsubst_pack_expansion): Simplify substitution into T....
  928. (tsubst): Don't throw away PACK_EXPANSION_EXTRA_ARGS.
  929. 2014-09-10 Jason Merrill <jason@redhat.com>
  930. PR c++/61659
  931. * decl.c (grokfndecl): Don't set DECL_COMDAT on static inlines.
  932. (duplicate_decls, start_decl): Likewise.
  933. * pt.c (check_explicit_specialization): Likewise.
  934. (push_template_decl_real): Or static templates.
  935. 2014-09-08 Jason Merrill <jason@redhat.com>
  936. * typeck.c (build_class_member_access_expr): Move
  937. -Winvalid-offsetof code...
  938. * semantics.c (finish_offsetof): ...here.
  939. * parser.c (cp_parser_builtin_offsetof): Remember the location of
  940. the type argument.
  941. * pt.c (tsubst_copy_and_build) [OFFSETOF_EXPR]: Preserve it.
  942. PR c++/62255
  943. * pt.c (instantiate_decl): Handle recursive instantiation of
  944. static data member.
  945. 2014-09-05 Jason Merrill <jason@redhat.com>
  946. PR c++/62659
  947. * semantics.c (potential_constant_expression_1): Handle un-folded
  948. pointer to member constants.
  949. 2014-09-04 Markus Trippelsdorf <markus@trippelsdorf.de>
  950. PR ipa/61659
  951. * decl.c (duplicate_decls): Check DECL_DECLARED_INLINE_P on
  952. newdecl, not olddecl.
  953. 2014-09-02 Paolo Carlini <paolo.carlini@oracle.com>
  954. DR 1453
  955. * class.c (check_field_decls): A class of literal type cannot have
  956. volatile non-static data members and base classes.
  957. (explain_non_literal_class): Update.
  958. 2014-09-02 Jakub Jelinek <jakub@redhat.com>
  959. Balaji V. Iyer <balaji.v.iyer@intel.com>
  960. Igor Zamyatin <igor.zamyatin@intel.com>
  961. * cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Loc definition
  962. simplified.
  963. * parser.c (cp_parser_cilk_for): New function.
  964. (cp_parser_cilk_grainsize): Likewise.
  965. (cp_parser_statement): Added RID_CILK_FOR case.
  966. (cp_parser_omp_for_cond): Added CILK_FOR check.
  967. (cp_parser_omp_for_loop_init): Change function argument to accept
  968. tree_code instead just a bool flag; change the check to use that
  969. tree_code; check for initialization declaration in case of Cilk_for.
  970. (cp_parser_omp_for_loop): Added checks for CILK_FOR and RID_CILK_FOR;
  971. changed call to cp_parser_omp_for_loop_init according new arguments'
  972. list.
  973. (cp_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
  974. * pt.c (tsubst_expr): Added CILK_FOR case.
  975. * semantics.c: Include convert.h.
  976. (finish_omp_clauses): Properly handle OMP_CLAUSE_SCHEDULE_CILKFOR
  977. case; added OMP_CLAUSE__CILK_FOR_COUNT_.
  978. (handle_omp_for_class_iterator): New argument lastp and its usage;
  979. added NE_EXPR case.
  980. (finish_omp_for): Changed call to handle_omp_for_class_iterator
  981. according new arguments' list; in case of Cilk_for save very first
  982. decl and create empty stmt_list block; use block to build correct
  983. statement tree.
  984. 2014-08-31 Jason Merrill <jason@redhat.com>
  985. PR c++/62302
  986. * optimize.c (cdtor_comdat_group): Just look at the
  987. DECL_ASSEMBLER_NAME of the 'tors.
  988. 2014-08-27 Paolo Carlini <paolo.carlini@oracle.com>
  989. PR c++/52892
  990. * semantics.c (cxx_eval_call_expression): Use STRIP_NOPS on the
  991. result of cxx_eval_constant_expression.
  992. 2014-08-26 Jason Merrill <jason@redhat.com>
  993. PR c++/58624
  994. * pt.c (tsubst_decl) [VAR_DECL]: Copy TLS model.
  995. (tsubst_copy_and_build) [VAR_DECL]: Use TLS wrapper.
  996. * semantics.c (finish_id_expression): Don't call TLS wrapper in a
  997. template.
  998. 2014-08-25 Jason Merrill <jason@redhat.com>
  999. * pt.c (check_explicit_specialization): Don't complain about
  1000. non-template variable.
  1001. (template_for_substitution): Allow variable templates.
  1002. (check_template_variable): Fix logic for member var template.
  1003. * decl.c (start_decl): Don't complain about extra template header
  1004. here.
  1005. * decl.c (start_decl): Look through member variable template.
  1006. * pt.c (tsubst_decl) [VAR_DECL]: Handle member variable templates.
  1007. * decl2.c (grokfield): Set DECL_CONTEXT earlier on
  1008. variables.
  1009. 2014-08-25 Paolo Carlini <paolo.carlini@oracle.com>
  1010. PR c++/34938
  1011. * cp-tree.h (TFF_POINTER): Add.
  1012. * cxx-pretty-print.h (pp_cxx_cv_qualifiers): Forward the third
  1013. argument too.
  1014. * error.c (dump_type_suffix): Actually print the const and noreturn
  1015. attribute when appropriate.
  1016. 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
  1017. * decl.c (compute_array_index_type, grokdeclarator,
  1018. undeduced_auto_decl): Change from cxx1y to cxx14.
  1019. *lambda.c(add_capture()): Change error message from C++1y to C++14.
  1020. * parser.c (cp_parser_unqualified_id, cp_parser_pseudo_destructor_name,
  1021. cp_parser_lambda_introducer, cp_parser_lambda_declarator_opt,
  1022. cp_parser_decltype, cp_parser_conversion_type_id,
  1023. cp_parser_simple_type_specifier, cp_parser_type_id_1,
  1024. cp_parser_template_type_arg, cp_parser_std_attribute,
  1025. cp_parser_template_declaration_after_export): Ditto.
  1026. * pt.c (tsubst): Ditto.
  1027. * semantics.c (force_paren_expr, finish_decltype_type): Ditto.
  1028. * tree.c: Change comment.
  1029. * typeck.c (comp_template_parms_position, cxx_sizeof_or_alignof_type,
  1030. cp_build_addr_expr_1, maybe_warn_about_useless_cast): Ditto.
  1031. 2014-08-23 Jason Merrill <jason@redhat.com>
  1032. Allow non-constexpr variable templates.
  1033. * decl2.c (note_variable_template_instantiation): New.
  1034. * cp-tree.h: Declare it.
  1035. * pt.c (instantiate_decl): Call it.
  1036. (push_template_decl_real): Allow non-constexpr variable templates.
  1037. * semantics.c (finish_id_expression): Mark the variable template
  1038. instantiation as used.
  1039. * mangle.c (write_mangled_name): Variable template instantiations
  1040. are mangled.
  1041. * parser.c (cp_parser_init_declarator): Complain about
  1042. non-function implicit templates.
  1043. 2014-08-22 Marek Polacek <polacek@redhat.com>
  1044. PR c++/62199
  1045. * parser.c (cp_parser_binary_expression): Check each LHS if it's
  1046. preceded with logical not. Adjust call to
  1047. warn_logical_not_parentheses.
  1048. 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
  1049. PR c++/57709
  1050. * name-lookup.c (pushdecl_maybe_friend_1): Do not warn if a
  1051. declaration shadows a function declaration, unless the former
  1052. declares a function, pointer to function or pointer to member
  1053. function, because this is a common and valid case in real-world
  1054. code.
  1055. * cp-tree.h (TYPE_PTRFN_P,TYPE_REFFN_P,TYPE_PTRMEMFUNC_P):
  1056. Improve description.
  1057. 2014-08-22 Jason Merrill <jason@redhat.com>
  1058. PR c++/62129
  1059. * class.c (outermost_open_class): Fix logic.
  1060. * decl.c (complete_vars): Fix logic.
  1061. 2014-08-22 Jason Merrill <jason@redhat.com>
  1062. PR c++/62129
  1063. * class.c (outermost_open_class): New.
  1064. * cp-tree.h: Declare it.
  1065. * decl.c (maybe_register_incomplete_var): Use it.
  1066. (complete_vars): Handle any constant variable.
  1067. * expr.c (cplus_expand_constant): Handle CONSTRUCTOR.
  1068. 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
  1069. PR other/62008
  1070. * cp-array-notation.c (build_array_notation_ref): Added correct
  1071. handling of case with incorrect array.
  1072. 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
  1073. PR fortran/44054
  1074. * error.c (cp_diagnostic_finalizer): Delete.
  1075. (init_error): Do not set diagnostic_finalizer here.
  1076. 2014-08-19 Marek Polacek <polacek@redhat.com>
  1077. PR c++/62153
  1078. * call.c (build_new_op_1): Remember the type of arguments for
  1079. a comparison. If either operand of a comparison is a boolean
  1080. expression, call maybe_warn_bool_compare.
  1081. 2014-08-19 Jason Merrill <jason@redhat.com>
  1082. PR tree-optimization/62091
  1083. * decl2.c (decl_needed_p): Return true for virtual functions when
  1084. devirtualizing.
  1085. PR lto/53808
  1086. PR c++/61659
  1087. * decl.c (maybe_commonize_var): Don't use DECL_COMDAT to trigger
  1088. comdat_linkage.
  1089. 2014-08-19 Gerald Pfeifer <gerald@pfeifer.com>
  1090. * class.c (contains_empty_class_p): Remove.
  1091. 2014-08-18 Paolo Carlini <paolo.carlini@oracle.com>
  1092. * parser.c (cp_parser_expression): Add default arguments.
  1093. (cp_parser_primary_expression, cp_parser_postfix_expression,
  1094. cp_parser_array_notation, cp_parser_postfix_open_square_expression,
  1095. cp_parser_unary_expression, cp_parser_direct_new_declarator,
  1096. cp_parser_question_colon_clause, cp_parser_assignment_operator_opt,
  1097. cp_parser_lambda_body, cp_parser_expression_statement,
  1098. cp_parser_condition, cp_parser_c_for, cp_parser_range_for,
  1099. cp_parser_iteration_statement, cp_parser_jump_statement,
  1100. cp_parser_decltype_expr, cp_parser_noexcept_specification_opt,
  1101. cp_parser_asm_operand_list, cp_parser_objc_message_receiver,
  1102. cp_parser_objc_synchronized_statement, cp_parser_objc_throw_statement,
  1103. cp_parser_omp_var_list_no_open, cp_parser_omp_clause_num_threads,
  1104. cp_parser_omp_clause_num_teams, cp_parser_omp_clause_thread_limit,
  1105. cp_parser_omp_clause_linear, cp_parser_omp_clause_device,
  1106. cp_parser_omp_atomic, cp_parser_omp_for_loop_init,
  1107. cp_parser_omp_for_loop, cp_parser_omp_declare_reduction_exprs,
  1108. cp_parser_transaction_expression): Adjust.
  1109. 2014-08-15 Jason Merrill <jason@redhat.com>
  1110. PR c++/61566
  1111. * pt.c (lookup_template_class_1): Revert recent change.
  1112. * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.
  1113. PR c++/61566
  1114. * pt.c (instantiate_class_template_1): Ignore lambda on
  1115. CLASSTYPE_DECL_LIST.
  1116. (push_template_decl_real): A lambda is not primary.
  1117. (lookup_template_class_1): Don't look for a lambda partial
  1118. instantiation.
  1119. * lambda.c (maybe_add_lambda_conv_op): Distinguish between being
  1120. currently in a function and the lambda living in a function.
  1121. * mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.
  1122. 2014-08-15 Richard Biener <rguenther@suse.de>
  1123. Jason Merrill <jason@redhat.com>
  1124. PR bootstrap/62077
  1125. * tree.c (build_min_array_type, set_array_type_canon): Split out...
  1126. (build_cplus_array_type): ...from here. Only call build_array_type
  1127. for main variants.
  1128. 2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
  1129. PR c++/62072
  1130. Revert:
  1131. 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
  1132. DR 1584
  1133. PR c++/57466
  1134. * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
  1135. cv-qualifiers of function types.
  1136. 2014-08-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
  1137. * call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
  1138. 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
  1139. * typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
  1140. cp_build_array_ref, cp_build_function_call_vec): When a
  1141. pedwarn is suppressed under SFINAE, return error_mark_node.
  1142. * typeck.c (cxx_sizeof_or_alignof_type): Fix complain &
  1143. tf_warning_or_error, where complain is a bool, glitch.
  1144. 2014-08-14 Ville Voutilainen <ville.voutilainen@gmail.com>
  1145. PR c++/62101
  1146. * decl.c (grokdeclarator): Move the check for friend initializers..
  1147. * decl2.c (grokfield) ..here. Postpone early return for friends
  1148. until after the initializer check.
  1149. 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
  1150. PR c++/54377
  1151. * pt.c (coerce_template_parms): Improve error message vs default
  1152. arguments.
  1153. 2014-08-14 Paolo Carlini <paolo.carlini@oracle.com>
  1154. * parser.c (cp_parser_init_declarator): Remove redundant check of
  1155. decl_specifiers->type.
  1156. 2014-08-13 Jason Merrill <jason@redhat.com>
  1157. * call.c (build_x_va_arg): Support passing non-POD through ....
  1158. (convert_arg_to_ellipsis): Likewise.
  1159. 2014-08-13 Andrew Sutton <andrew.n.sutton@gmail.com>
  1160. * pt.c (lookup_template_variable): Make dependent variable templates
  1161. have unknown type.
  1162. 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
  1163. * parser.c (cp_parser_elaborated_type_specifier): Handle
  1164. specially cp_parser_template_id returning a BASELINK.
  1165. 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
  1166. * parser.c (cp_parser_diagnose_invalid_type_name,
  1167. cp_parser_make_typename_type): Remove scope parameter.
  1168. (cp_parser_parse_and_diagnose_invalid_type_name,
  1169. cp_parser_elaborated_type_specifier): Adjust calls.
  1170. 2014-08-12 Ville Voutilainen <ville.voutilainen@gmail.com>
  1171. Reject virt-specifiers on friends and member templates
  1172. * friend.c (do_friend): Diagnose virt-specifiers.
  1173. * pt.c (push_template_decl_real): Diagnose virt-specifiers.
  1174. 2014-08-09 Paolo Carlini <paolo.carlini@oracle.com>
  1175. * typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
  1176. return type to bool; in C++11 for constants give errors, not pedwarns.
  1177. * cp-tree.h (check_narrowing): Adjust declaration.
  1178. * call.c (convert_like_real): Update calls.
  1179. * semantics.c (finish_compound_literal): Likewise.
  1180. 2014-08-08 Jason Merrill <jason@redhat.com>
  1181. * pt.c (lookup_template_class_1): Copy abi_tag.
  1182. 2014-08-08 Kai Tietz <ktietz@redhat.com>
  1183. * semantics.c (expand_or_defer_fn_1): Check for keep-inline-dllexport
  1184. that we operate on a true inline.
  1185. 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
  1186. * class.c, cp-gimplify.c, decl.c, decl2.c, error.c, method.c,
  1187. optimize.c, pt.c, semantics.c: Remove includes of pointer-set.h.
  1188. 2014-08-07 Paolo Carlini <paolo.carlini@oracle.com>
  1189. PR c++/51312
  1190. * decl.c (build_enumerator): Handle class types with conversion
  1191. operators via perform_implicit_conversion_flags and
  1192. build_expr_type_conversion.
  1193. * cvt.c (build_expr_type_conversion): Replace pair of errors
  1194. with error + inform.
  1195. 2014-08-07 Jason Merrill <jason@redhat.com>
  1196. PR c++/62043
  1197. * parser.c (c_parse_file): Change sorry to fatal_error.
  1198. PR c++/61959
  1199. * semantics.c (cxx_eval_bare_aggregate): Handle POINTER_PLUS_EXPR.
  1200. 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
  1201. * cp-tree.h, pt.c: Use hash_map instead of pointer_map.
  1202. 2014-08-06 Jason Merrill <jason@redhat.com>
  1203. * init.c (build_vec_init): Fix constant initialization of
  1204. trailing elements.
  1205. (build_value_init_noctor): Call maybe_constant_init.
  1206. * semantics.c (maybe_constant_init): See through EXPR_STMT and
  1207. conversion to void.
  1208. PR c++/60417
  1209. * init.c (build_vec_init): Reorganize earlier change a bit.
  1210. PR c++/61994
  1211. * init.c (build_vec_init): Leave atype an ARRAY_TYPE
  1212. if we're just returning an INIT_EXPR.
  1213. 2014-08-06 Jason Merrill <jason@redhat.com>
  1214. Braden Obrzut <admin@maniacsvault.net>
  1215. * pt.c (check_explicit_specialization): Don't test
  1216. DECL_DECLARED_INLINE_P for a variable template.
  1217. 2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
  1218. PR c++/43906
  1219. * typeck.c (cp_build_binary_op): Extend to more cases the
  1220. -Waddress warning.
  1221. 2014-08-01 Braden Obrzut <admin@maniacsvault.net>
  1222. Implement constexpr variable templates
  1223. * decl.c (grokvardecl): Handle specializations of variable templates.
  1224. (grokdeclarator): Handle variable template id expressions and NULL_TREE
  1225. return from grokvardecl.
  1226. * decl2.c (check_member_template): Allow declaration of template member
  1227. variables.
  1228. * parser.c (cp_parser_template_id): Build a TEMPLATE_ID_EXPR for
  1229. variable templates.
  1230. * pt.c (check_template_variable): Accept variable temploids at
  1231. non-class scope.
  1232. (push_template_decl_real): The current instantiation of a template
  1233. can be a VAR_DECL.
  1234. (determine_specialization): Accept variable templates.
  1235. (check_explicit_specialization): Handle and check for malformed
  1236. variable template specializations.
  1237. (lookup_template_variable): New.
  1238. (tsubst_decl): Handle variable template specializations.
  1239. (do_decl_instantiation): Handle template variables.
  1240. (instantiate_decl): Handle template variables.
  1241. * semantics.c (finish_template_variable): New.
  1242. (finish_id_expression): Instantiate variable templates.
  1243. * cp-tree.h (variable_template_p): New.
  1244. 2014-08-02 Paolo Carlini <paolo.carlini@oracle.com>
  1245. PR c++/15339
  1246. * decl.c (check_redeclaration_no_default_args): New.
  1247. (duplicate_decls): Use it, handle default arguments
  1248. in redeclarations of function templates.
  1249. 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
  1250. * optimize.c, semantics.c: Use hash_map instead of pointer_map.
  1251. 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
  1252. * class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
  1253. method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
  1254. instead of pointer_set.
  1255. 2014-08-01 Jason Merrill <jason@redhat.com>
  1256. PR c++/60417
  1257. * init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
  1258. init-list for trailing elements.
  1259. * typeck2.c (process_init_constructor_array): Likewise.
  1260. 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
  1261. DR 217 again
  1262. * decl.c (duplicate_decls): Handle static member functions too.
  1263. 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
  1264. * cp-array-notation.c (expand_an_in_modify_expr): Fix the misprint
  1265. in error output.
  1266. 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
  1267. PR other/61963
  1268. * parser.c (cp_parser_array_notation): Added check for array_type.
  1269. 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
  1270. PR middle-end/61455
  1271. * cp-array-notation.c (expand_array_notation_exprs): Handling of
  1272. DECL_EXPR improved. Changed handling for INIT_EXPR.
  1273. 2014-08-01 Paolo Carlini <paolo.carlini@oracle.com>
  1274. * pt.c (lookup_template_class_1): Use DECL_TYPE_TEMPLATE_P.
  1275. 2014-08-01 Jakub Jelinek <jakub@redhat.com>
  1276. * cp-gimplify.c (cp_genericize_r): For -fsanitize=null and/or
  1277. -fsanitize=alignment call ubsan_maybe_instrument_reference
  1278. for casts to REFERENCE_TYPE and ubsan_maybe_instrument_member_call
  1279. for calls to member functions.
  1280. 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
  1281. PR c++/60517
  1282. * typeck.c (maybe_warn_about_returning_address_of_local): Return
  1283. whether it is returning the address of a local variable.
  1284. (check_return_expr): Return 0 instead of the address of a local
  1285. variable.
  1286. 2014-07-30 Jason Merrill <jason@redhat.com>
  1287. PR lto/53808
  1288. PR c++/61659
  1289. * pt.c (push_template_decl_real): Don't set DECL_COMDAT on friends.
  1290. 2014-07-30 Paolo Carlini <paolo.carlini@oracle.com>
  1291. PR c++/57397
  1292. * pt.c (unify_arity): Add boolean parameter.
  1293. (unify_too_few_arguments): Likewise.
  1294. (type_unification_real): Diagnose correctly insufficient
  1295. arguments in the presence of trailing variadic parameters;
  1296. deducing multiple trailing packs as empty is fine.
  1297. 2014-07-30 Jason Merrill <jason@redhat.com>
  1298. PR c++/61659
  1299. PR c++/61687
  1300. Revert:
  1301. * decl2.c (mark_all_virtuals): New variable.
  1302. (maybe_emit_vtables): Check it instead of flag_devirtualize.
  1303. (cp_write_global_declarations): Set it and give helpful diagnostic
  1304. if it introduces errors.
  1305. * class.c (finish_struct_1): Check it.
  1306. PR lto/53808
  1307. PR c++/61659
  1308. * pt.c (push_template_decl_real): Set DECL_COMDAT on templates.
  1309. (check_explicit_specialization): Clear it on specializations.
  1310. * decl.c (duplicate_decls, start_decl): Likewise.
  1311. (grokmethod, grokfndecl): Set DECL_COMDAT on inlines.
  1312. * method.c (implicitly_declare_fn): Set DECL_COMDAT. Determine
  1313. linkage after setting the appropriate flags.
  1314. * tree.c (decl_linkage): Don't check DECL_COMDAT.
  1315. * decl2.c (mark_needed): Mark clones.
  1316. (import_export_decl): Not here.
  1317. 2014-07-25 Edward Smith-Rowland <3dw4rd@verizon.net>
  1318. Implement N4051 - Allow typename in a template template parameter
  1319. * parser.c (cp_parser_type_parameter_key): New funtion;
  1320. (cp_parser_token_is_type_parameter_key): Ditto;
  1321. (cp_parser_type_parameter): Look for type-parameter-key for all versions
  1322. but pedwarn for less than cxx1z.
  1323. 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
  1324. PR c++/50961
  1325. * call.c (standard_conversion): Use resolve_nondeduced_context
  1326. for type_unknown_p (EXPR) && TREE_CODE (TO) == BOOLEAN_TYPE.
  1327. 2014-07-17 Paolo Carlini <paolo.carlini@oracle.com>
  1328. PR c++/61804
  1329. * parser.c (cp_parser_tokens_start_cast_expression): Return -1
  1330. for '++' and '--'.
  1331. 2014-07-15 Jason Merrill <jason@redhat.com>
  1332. PR c++/61811
  1333. * decl2.c (maybe_emit_vtables): Return true for -fuse-all-virtuals.
  1334. PR c++/60848
  1335. PR c++/61723
  1336. * call.c (is_std_init_list): Don't check CLASSTYPE_TEMPLATE_INFO.
  1337. * class.c (finish_struct): Reject invalid definition of
  1338. std::initializer_list.
  1339. 2014-07-15 Paolo Carlini <paolo.carlini@oracle.com>
  1340. * call.c (convert_like_real): Call print_z_candidate and inform only
  1341. if permerror returns true.
  1342. 2014-07-14 Jan Hubicka <hubicka@ucw.cz>
  1343. * class.c (build_clone): Do not clear assembler names of
  1344. templates.
  1345. * decl.c (cp_tree_node_structure): Add TEMPLATE_DECL.
  1346. * cp-objcp-common.c (cp_tree_size): Add TEMPLATE_DECL
  1347. as a special case return sizeof (struct tree_decl_non_common)
  1348. for other decls.
  1349. (cp_common_init_ts): Do not initialize NAMESPACE_DECL;
  1350. initialize TEMPLATE_DECL as MARK_TS_DECL_COMMON.
  1351. * cp/cp-tree.h (tree_template_decl): New structure.
  1352. (cp_tree_node_structure_enum): Add TS_CP_TEMPLATE_DECL.
  1353. (union cp_lang_tree_node): Add template_decl.
  1354. (DECL_TEMPLATE_PARMS, DECL_TEMPLATE_RESULT): Update.
  1355. 2014-07-14 Jason Merrill <jason@redhat.com>
  1356. PR c++/61445
  1357. PR c++/56947
  1358. * pt.c (instantiate_decl): Don't check defer_ok for local class
  1359. members.
  1360. 2014-07-14 Jakub Jelinek <jakub@redhat.com>
  1361. PR middle-end/61294
  1362. * cp-tree.h (LITERAL_ZERO_P): Define.
  1363. * parser.c (cp_parser_parenthesized_expression_list): Add
  1364. want_literal_zero_p argument, if true, for literal zeros
  1365. insert INTEGER_CSTs with LITERAL_ZERO_P flag set.
  1366. (cp_parser_postfix_expression): Adjust
  1367. cp_parser_parenthesized_expression_list caller, handle
  1368. -Wmemset-transposed-args.
  1369. (literal_zeros): New variable.
  1370. 2014-07-13 Jason Merrill <jason@redhat.com>
  1371. PR c++/58511
  1372. * semantics.c (is_instantiation_of_constexpr): Return true for
  1373. defaulted functions, too.
  1374. (explain_invalid_constexpr_fn): Only use
  1375. explain_implicit_non_constexpr if !DECL_DECLARED_CONSTEXPR_P.
  1376. * method.c (explain_implicit_non_constexpr): Pass
  1377. DECL_INHERITED_CTOR_BASE to explain_implicit_non_constexpr.
  1378. PR c++/58611
  1379. * decl.c (check_initializer): Don't finish_compound_literal
  1380. on erroneous constexpr init.
  1381. PR c++/58612
  1382. * tree.c (bot_replace): Only replace a dummy 'this' parm.
  1383. PR c++/60628
  1384. * decl.c (create_array_type_for_decl): Only check for auto once.
  1385. PR c++/58636
  1386. * call.c (build_list_conv): Don't try to build a list of references.
  1387. 2014-07-13 Edward Smith-Rowland <3dw4rd@verizon.net>
  1388. PR C++/60209 - Declaration of user-defined literal operator cause error
  1389. * parser.c (cp_parser_operator): Fold treatment of strings
  1390. and user-defined string literals. Use the full string parser.
  1391. (cp_parser_string_literal): Add flag to not look for literal operator.
  1392. 2014-07-11 Jason Merrill <jason@redhat.com>
  1393. PR c++/22434
  1394. PR c++/61288
  1395. * call.c (build_conditional_expr_1): Avoid reading freed memory.
  1396. 2014-07-11 Paolo Carlini <paolo.carlini@oracle.com>
  1397. PR c++/53159
  1398. * call.c (build_user_type_conversion_1): Copy LOOKUP_NO_NARROWING
  1399. into convflags.
  1400. * decl.c (check_initializer): Don't call check_narrowing here,
  1401. set LOOKUP_NO_NARROWING.
  1402. * typeck2.c (digest_init_r): Likewise.
  1403. 2014-07-10 Jason Merrill <jason@redhat.com>
  1404. PR c++/61661
  1405. * semantics.c (reduced_constant_expression_p): Handle CONSTRUCTOR.
  1406. PR c++/61659
  1407. PR c++/61687
  1408. * decl2.c (mark_all_virtuals): New variable.
  1409. (maybe_emit_vtables): Check it instead of flag_devirtualize.
  1410. (cp_write_global_declarations): Set it and give helpful diagnostic
  1411. if it introduces errors.
  1412. * class.c (finish_struct_1): Check it.
  1413. * decl.c (grokdeclarator): Clear virtualp after 'virtual auto' error.
  1414. 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
  1415. PR c++/60686
  1416. * decl.c (grokdeclarator): Adjust error messages about 'explicit'
  1417. outside class declaration, in friend declaration, and neither on
  1418. constructor nor conversion operator.
  1419. 2014-07-09 Paolo Carlini <paolo.carlini@oracle.com>
  1420. DR 1584
  1421. PR c++/57466
  1422. * pt.c (check_cv_quals_for_unify): Implement resolution, disregard
  1423. cv-qualifiers of function types.
  1424. 2014-07-09 Andrew Sutton <andrew.n.sutton@gmail.com>
  1425. Paolo Carlini <paolo.carlini@oracle.com>
  1426. PR c++/59361
  1427. * parser.c (cp_parser_tokens_start_cast_expression): Return 0 for
  1428. CPP_ELLIPSIS too.
  1429. 2014-07-07 Paolo Carlini <paolo.carlini@oracle.com>
  1430. * class.c (check_for_override): Wrap the 'final' and 'override'
  1431. keywords in %< and %>.
  1432. 2014-07-06 Marek Polacek <polacek@redhat.com>
  1433. PR c/6940
  1434. * cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
  1435. * decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
  1436. * typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
  1437. function parameter.
  1438. 2014-07-02 Paolo Carlini <paolo.carlini@oracle.com>
  1439. * pt.c (convert_template_argument): Use inform instead of error in
  1440. three places.
  1441. 2014-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
  1442. PR c++/58781
  1443. PR c++/60249
  1444. PR c++/59867
  1445. * parser.c (cp_parser_userdef_string_literal): Take a tree
  1446. not a cp_token*.
  1447. (cp_parser_string_literal): Don't hack the token stream.
  1448. 2014-06-30 Jason Merrill <jason@redhat.com>
  1449. PR c++/61659
  1450. PR lto/53808
  1451. * decl2.c (maybe_emit_vtables): Mark all vtable entries if
  1452. devirtualizing.
  1453. * init.c (build_vtbl_address): Don't mark destructor.
  1454. * class.c (finish_struct_1): Add all classes to keyed_classes
  1455. if devirtualizing.
  1456. PR c++/61647
  1457. * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
  1458. PR c++/61566
  1459. * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
  1460. * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE
  1461. TYPE_BINFO or TYPE_LANG_SPECIFIC.
  1462. * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2.
  1463. (TYPE_PTRMEMFUNC_P): Don't expect TYPE_LANG_SPECIFIC.
  1464. * typeck.c (build_ptrmemfunc_access_expr): Don't use lookup_member.
  1465. * pt.c (unify): Also check whether the argument is a PMF.
  1466. 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
  1467. PR c++/54891
  1468. * parser.c (cp_parser_tokens_start_cast_expression): In C++11
  1469. a '[' can also start a primary-expression.
  1470. (cp_parser_cast_expression): Parse a cast-expression only tentatively
  1471. when cp_parser_tokens_start_cast_expression returns -1.
  1472. 2014-06-30 Jason Merrill <jason@redhat.com>
  1473. PR c++/61539
  1474. * pt.c (unify_one_argument): Type/expression mismatch just causes
  1475. deduction failure.
  1476. * semantics.c (simplify_aggr_init_expr): Remove remnants of
  1477. 2014-04-11 change.
  1478. 2014-06-30 Marek Polacek <polacek@redhat.com>
  1479. * cp-gimplify.c (cp_genericize): Don't instrument returns if the
  1480. function has no_sanitize_undefined attribute.
  1481. * decl.c (compute_array_index_type): Don't instrument VLAs if the
  1482. function has no_sanitize_undefined attribute.
  1483. 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
  1484. PR middle-end/57541
  1485. * cp-array-notation.c (expand_sec_reduce_builtin):
  1486. Check that bultin argument is correct.
  1487. * call.c (build_cxx_call): Check for 0 arguments in builtin call.
  1488. 2014-06-28 Jonathan Wakely <jwakely@redhat.com>
  1489. DR 1579
  1490. PR c++/58051
  1491. * typeck.c (check_return_expr): Lookup as an rvalue even when the
  1492. types aren't the same.
  1493. 2014-06-27 Jason Merrill <jason@redhat.com>
  1494. PR c++/61433
  1495. * error.c (dump_template_bindings): Don't tsubst in a clone.
  1496. 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
  1497. PR c++/61614
  1498. * semantics.c (finish_compound_literal): Revert r204228.
  1499. 2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
  1500. * parser.c (cp_parser_compound_literal_p): New.
  1501. (cp_parser_postfix_expression, cp_parser_sizeof_operand): Use it.
  1502. 2014-06-26 Jason Merrill <jason@redhat.com>
  1503. * parser.c (cp_parser_for_init_statement): Change range-for error
  1504. to pedwarn.
  1505. N3994 Ranged-based for-loops: The Next Generation
  1506. * parser.c (cp_lexer_nth_token_is): New.
  1507. (cp_parser_for_init_statement): Allow "for (id : init)".
  1508. 2014-06-26 Teresa Johnson <tejohnson@google.com>
  1509. * class.c (dump_class_hierarchy): Use saved dump files.
  1510. (dump_vtable): Ditto.
  1511. (dump_vtt): Ditto.
  1512. 2014-06-26 Adam Butcher <adam@jessamine.co.uk>
  1513. PR c++/61537
  1514. * parser.c (cp_parser_elaborated_type_specifier): Only consider template
  1515. parameter lists outside of function parameter scope.
  1516. 2014-06-25 Paolo Carlini <paolo.carlini@oracle.com>
  1517. DR 178
  1518. PR c++/49132
  1519. * typeck2.c (process_init_constructor_record): Do not complain about
  1520. uninitialized const members, because within aggregate-initialization,
  1521. members without explicit initializers are value-initialized.
  1522. 2014-06-25 Jakub Jelinek <jakub@redhat.com>
  1523. * semantics.c (finish_omp_clauses): Make sure
  1524. OMP_CLAUSE_LINEAR_STEP has correct type.
  1525. 2014-06-24 Jan Hubicka <hubicka@ucw.cz>
  1526. * class.c (check_methods, create_vtable_ptr, determine_key_method,
  1527. add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by
  1528. FUNCTION_DECL check.
  1529. * cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
  1530. (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
  1531. (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
  1532. (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
  1533. 2014-06-24 Paolo Carlini <paolo.carlini@oracle.com>
  1534. PR c++/33972
  1535. * decl.c (grokdeclarator): Do not early check for operator-function-id
  1536. as non-function.
  1537. 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
  1538. * class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
  1539. Adjust.
  1540. 2014-06-24 Jakub Jelinek <jakub@redhat.com>
  1541. * parser.c (cp_parser_omp_for_loop): For
  1542. #pragma omp parallel for simd move lastprivate clause from parallel
  1543. to for rather than simd.
  1544. 2014-06-23 Paolo Carlini <paolo.carlini@oracle.com>
  1545. DR 577
  1546. PR c++/33101
  1547. * decl.c (grokparms): Accept a single parameter of type 'void'.
  1548. 2014-06-20 Jason Merrill <jason@redhat.com>
  1549. PR c++/59296
  1550. * call.c (add_function_candidate): Avoid special 'this' handling
  1551. if we have a ref-qualifier.
  1552. PR c++/61556
  1553. * call.c (build_over_call): Call build_this in template path.
  1554. 2014-06-19 Jason Merrill <jason@redhat.com>
  1555. PR c++/59296
  1556. * call.c (add_function_candidate): Also set LOOKUP_NO_TEMP_BIND.
  1557. 2014-06-18 Jason Merrill <jason@redhat.com>
  1558. PR c++/59296
  1559. * call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
  1560. ref-qualifier handling.
  1561. PR c++/61507
  1562. * pt.c (resolve_overloaded_unification): Preserve
  1563. ARGUMENT_PACK_EXPLICIT_ARGS.
  1564. 2014-06-18 Jakub Jelinek <jakub@redhat.com>
  1565. * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
  1566. argument.
  1567. * cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
  1568. 2014-06-17 Jason Merrill <jason@redhat.com>
  1569. PR c++/60605
  1570. * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
  1571. 2014-06-15 Jason Merrill <jason@redhat.com>
  1572. PR c++/61488
  1573. * pt.c (check_valid_ptrmem_cst_expr): Fix for template context.
  1574. PR c++/61500
  1575. * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
  1576. 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
  1577. * decl.c (grokvardecl): Fix pasto in previous patch.
  1578. 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
  1579. * decl.c (duplicate_decls): Use set_decl_tls_model.
  1580. (grokdeclarator): Likewise.
  1581. * semantics.c (finish_id_expression): Check TLS only for
  1582. static variables.
  1583. (finish_omp_threadprivate): Use decl_default_tls_model.
  1584. * decl2.c (get_guard): Likewise.
  1585. * call.c (make_temporary_var_for_ref_to_temp): Likewise.
  1586. 2014-06-14 Paolo Carlini <paolo.carlini@oracle.com>
  1587. PR c++/33101
  1588. * decl.c (grokparms): Improve error message about void parameters.
  1589. * error.c (type_to_string): Fix aka cut off code.
  1590. 2014-06-12 Jason Merrill <jason@redhat.com>
  1591. * call.c (convert_arg_to_ellipsis): Use abi_version_crosses.
  1592. * cvt.c (type_promotes_to): Likewise.
  1593. * mangle.c (write_type, write_expression): Likewise.
  1594. (write_name, write_template_arg): Likewise.
  1595. (mangle_decl): Make alias based on flag_abi_compat_version.
  1596. Emit -Wabi warning here.
  1597. (finish_mangling_internal): Not here. Drop warn parm.
  1598. (finish_mangling_get_identifier, finish_mangling): Adjust.
  1599. (mangle_type_string, mangle_special_for_type): Adjust.
  1600. (mangle_ctor_vtbl_for_type, mangle_thunk): Adjust.
  1601. (mangle_guard_variable, mangle_tls_init_fn): Adjust.
  1602. (mangle_tls_wrapper_fn, mangle_ref_init_variable): Adjust.
  1603. * call.c (build_operator_new_call): Remove -fabi-version=1 support.
  1604. * class.c (walk_subobject_offsets, include_empty_classes): Likewise.
  1605. (layout_nonempty_base_or_field, end_of_class): Likewise.
  1606. (layout_empty_base, build_base_field, layout_class_type): Likewise.
  1607. (is_empty_class, add_vcall_offset_vtbl_entries_1): Likewise.
  1608. (layout_virtual_bases): Likewise.
  1609. * decl.c (compute_array_index_type): Likewise.
  1610. * mangle.c (write_mangled_name, write_prefix): Likewise.
  1611. (write_template_prefix, write_integer_cst, write_expression): Likewise.
  1612. (write_template_arg, write_array_type): Likewise.
  1613. * method.c (lazily_declare_fn): Likewise.
  1614. * rtti.c (get_pseudo_ti_index): Likewise.
  1615. * typeck.c (comp_array_types): Likewise.
  1616. 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
  1617. * vtable-class-hierarchy.c: Update handling for section names
  1618. that are no longer trees.
  1619. * decl.c (duplicate_decls): Likewise.
  1620. 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
  1621. PR c++/19200
  1622. * parser.c (cp_parser_init_declarator): Actually pass friend_p
  1623. to cp_parser_declarator.
  1624. 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
  1625. PR c++/60265
  1626. * parser.c (cp_parser_using_declaration): Handle unscoped enums.
  1627. * name-lookup.c (validate_nonmember_using_decl): Adjust error
  1628. message.
  1629. 2014-06-11 Paolo Carlini <paolo.carlini@oracle.com>
  1630. PR c++/19200
  1631. * parser.c (cp_parser_declarator): Add bool parameter.
  1632. (cp_parser_direct_declarator): Likewise, use it.
  1633. (cp_parser_member_declaration): Pass friend_p to cp_parser_declarator.
  1634. (cp_parser_condition, cp_parser_explicit_instantiation,
  1635. cp_parser_init_declarator, cp_parser_type_id_1,
  1636. cp_parser_parameter_declaration, cp_parser_exception_declaration,
  1637. cp_parser_cache_defarg, cp_parser_objc_class_ivars,
  1638. cp_parser_objc_struct_declaration, cp_parser_omp_for_loop_init):
  1639. Adjust.
  1640. * decl.c (grokdeclarator): Fix handling of friend declared in
  1641. namespace scope (g++.dg/parse/friend10.C).
  1642. 2014-06-10 Jan Hubicka <hubicka@ucw.cz>
  1643. * vtable-class-hierarchy.c: Use symtab_get_node (var_decl)
  1644. ->implicit_section.
  1645. * optimize.c (cdtor_comdat_group): Fix handling of aliases.
  1646. (maybe_clone_body): Move symbol across comdat groups.
  1647. * method.c (use_thunk): Copy implicit section flag.
  1648. 2014-06-09 Paolo Carlini <paolo.carlini@oracle.com>
  1649. PR c++/22556
  1650. * name-lookup.c (pushdecl_maybe_friend_1): Use comptypes.
  1651. 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
  1652. * method.c (use_thunk): Use set_decl_section_name.
  1653. * optimize.c (maybe_clone_body): Use set_decl_section_name.
  1654. * decl.c (duplicate_decls): Likewise.
  1655. * vtable-class-hierarchy.c: Likewise.
  1656. 2014-06-06 Paolo Carlini <paolo.carlini@oracle.com>
  1657. PR c++/60184
  1658. * class.c (check_field_decls): In C++11 mode do not reject
  1659. static data members and reference-type members in unions.
  1660. 2014-06-05 Jason Merrill <jason@redhat.com>
  1661. PR c++/43453
  1662. * decl.c (check_initializer): Collapse a TREE_LIST here.
  1663. * typeck2.c (store_init_value): Not here.
  1664. 2014-06-05 Richard Biener <rguenther@suse.de>
  1665. Paolo Carlini <paolo.carlini@oracle.com>
  1666. PR c++/56961
  1667. * cp-gimplify.c (cp_gimplify_expr, [MODIFY_EXPR]): Rework
  1668. handling of empty classes.
  1669. 2014-06-04 Jason Merrill <jason@redhat.com>
  1670. * parser.c (cp_parser_diagnose_invalid_type_name): Give helpful note
  1671. for noexcept and thread_local, too.
  1672. PR c++/61343
  1673. * decl.c (check_initializer): Maybe clear
  1674. DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
  1675. 2014-06-05 Richard Biener <rguenther@suse.de>
  1676. PR c++/61004
  1677. * typeck.c (cp_build_indirect_ref): Do not emit strict-aliasing
  1678. warnings for accessing empty classes.
  1679. 2014-06-05 Marek Polacek <polacek@redhat.com>
  1680. PR c/49706
  1681. * parser.c (cp_parser_binary_expression): Warn when logical not is
  1682. used on the left hand side operand of a comparison.
  1683. 2014-06-04 Paolo Carlini <paolo.carlini@oracle.com>
  1684. PR c++/43453
  1685. * typeck.c (cp_build_modify_expr): Handle array of characters
  1686. initialized by a string literal.
  1687. * decl.c (check_initializer): Handle parenthesized string literal
  1688. as initializer.
  1689. * typeck2.c (store_init_value): Remove redundant check.
  1690. 2014-06-04 Jason Merrill <jason@redhat.com>
  1691. PR c++/51253
  1692. PR c++/61382
  1693. * cp-gimplify.c (cp_gimplify_expr): Handle CALL_EXPR_LIST_INIT_P here.
  1694. * semantics.c (simplify_aggr_init_expr): Not here, just copy it.
  1695. 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
  1696. PR c/58942
  1697. * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
  1698. with a pointer.
  1699. 2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
  1700. DR 1423
  1701. PR c++/52174
  1702. * call.c (standard_conversion): Convert nullptr to bool only
  1703. in case of direct-initialization.
  1704. (convert_like_real): Provide informative error message.
  1705. 2014-06-03 Marek Polacek <polacek@redhat.com>
  1706. PR c/60439
  1707. * semantics.c (finish_switch_cond): Warn if switch condition has
  1708. boolean value.
  1709. 2014-06-03 Jason Merrill <jason@redhat.com>
  1710. PR c++/60992
  1711. * pt.c (tsubst_copy) [VAR_DECL]: Try lookup first. Add a new
  1712. variable to local_specializations.
  1713. PR c++/60848
  1714. * call.c (is_std_init_list): Check CLASSTYPE_TEMPLATE_INFO.
  1715. 2014-06-02 Jason Merrill <jason@redhat.com>
  1716. PR c++/61046
  1717. * decl.c (reshape_init_class): Handle un-folded
  1718. constant-expressions.
  1719. PR c++/61134
  1720. * pt.c (pack_deducible_p): Handle canonicalization.
  1721. 2014-06-02 Paolo Carlini <paolo.carlini@oracle.com>
  1722. * pt.c (tsubst_function_type): Initialize arg_types.
  1723. 2014-06-02 Siva Chandra Reddy <sivachandra@google.com>
  1724. PR debug/57519
  1725. * class.c (handle_using_decl): Pass the correct scope to
  1726. cp_emit_debug_info_for_using.
  1727. 2014-06-02 Ville Voutilainen <ville.voutilainen@gmail.com>
  1728. PR c++/59483
  1729. PR c++/61148
  1730. * search.c (accessible_p): Use current_nonlambda_class_type.
  1731. * semantics.c (check_accessibility_of_qualified_id): Likewise.
  1732. 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
  1733. * decl.c: Include builtins.h.
  1734. * semantics.c: Likewise.
  1735. 2014-05-31 Paolo Carlini <paolo.carlini@oracle.com>
  1736. DR 1227
  1737. PR c++/57543
  1738. * cp-tree.h (TYPE_HAS_LATE_RETURN_TYPE): Add.
  1739. * pt.c (tsubst_function_type): Inject the this parameter; do the
  1740. substitutions in the order mandated by the DR.
  1741. (copy_default_args_to_explicit_spec): Copy TYPE_HAS_LATE_RETURN_TYPE.
  1742. * decl.c (grokdeclarator): Maybe set TYPE_HAS_LATE_RETURN_TYPE.
  1743. (static_fn_type): Copy it.
  1744. * decl2.c (build_memfn_type, change_return_type,
  1745. cp_reconstruct_complex_type): Likewise.
  1746. * parser.c (cp_parser_lambda_declarator_opt): Likewise.
  1747. * tree.c (strip_typedefs): Likewise.
  1748. * typeck.c (merge_types): Likewise.
  1749. 2014-05-30 Jason Merrill <jason@redhat.com>
  1750. PR c++/56947
  1751. * pt.c (instantiate_decl): Check that defer_ok is not set for
  1752. local class members.
  1753. PR c++/60992
  1754. * pt.c (tsubst_init): Split out from...
  1755. (tsubst_expr) [DECL_EXPR]: Here.
  1756. (tsubst_copy) [VAR_DECL]: Use it.
  1757. * semantics.c (finish_id_expression): Return the decl for static/const.
  1758. 2014-05-28 Jason Merrill <jason@redhat.com>
  1759. PR c++/47202
  1760. * decl.c (cxx_comdat_group): Return a decl.
  1761. * optimize.c (cdtor_comdat_group): Get its DECL_ASSEMBLER_NAME.
  1762. * pt.c (tsubst) [ARRAY_TYPE]: Check for array of array of unknown
  1763. bound.
  1764. PR c++/61242
  1765. * call.c (build_aggr_conv): Ignore passed in flags.
  1766. (build_array_conv, build_complex_conv): Likewise.
  1767. 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
  1768. * optimize.c (maybe_thunk_body): Use set_comdat_group.
  1769. (maybe_clone_body): Likewise.
  1770. * decl.c (duplicate_decls): Update code duplicating comdat group;
  1771. do not copy symtab pointer; before freeing newdecl remove it
  1772. from symtab.
  1773. * decl2.c (constrain_visibility): Use set_comdat_group.
  1774. 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
  1775. * rtti.c: Include tm_p.h
  1776. (emit_tinfo_decl): Force RTTI data to be aligned to required
  1777. ABI alignment only.
  1778. 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
  1779. * class.c (build_vtable): Align vtables to TARGET_VTABLE_ENTRY_ALIGN
  1780. ignoring other target adjustments.
  1781. 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
  1782. * semantics.c (finish_omp_clauses): Remove duplicated variable
  1783. initialization.
  1784. * parser.c (cp_parser_omp_target): Return bool values.
  1785. 2014-05-22 Paolo Carlini <paolo.carlini@oracle.com>
  1786. PR c++/61088
  1787. * lambda.c (add_capture): Enforce that capture by value requires
  1788. complete type.
  1789. * typeck2.c (cxx_incomplete_type_inform): Early return if
  1790. TYPE_MAIN_DECL is null.
  1791. 2014-05-21 Jonathan Wakely <jwakely@redhat.com>
  1792. PR c/61271
  1793. * cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
  1794. 2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
  1795. PR c++/61133
  1796. * lambda.c (build_capture_proxy, add_capture): Treat normal
  1797. captures and init-captures identically.
  1798. 2014-05-21 Mark Wielaard <mjw@redhat.com>
  1799. PR debug/16063
  1800. * cp-lang.c (cxx_enum_underlying_base_type): New function.
  1801. (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define.
  1802. 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
  1803. * cvt.c (convert_to_void): Use void_node instead of void_zero_node.
  1804. * cp-array-notation.c (replace_invariant_exprs): Likewise.
  1805. (expand_array_notation): Handle VOID_CST.
  1806. * error.c (dump_expr): Likewise.
  1807. * cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
  1808. (cxx_pretty_printer::expression): Likewise.
  1809. (pp_cxx_new_expression): Use void_node instead of void_zero_node.
  1810. * decl.c (register_dtor_fn): Likewise.
  1811. * init.c (build_raw_new_expr, build_new_1, build_vec_init)
  1812. (build_delete, push_base_cleanups): Likewise.
  1813. * mangle.c (write_expression): Likewise.
  1814. * semantics.c (finish_break_stmt, empty_expr_stmt_p): Likewise.
  1815. * pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
  1816. (tsubst, tsubst_copy, build_non_dependent_expr): Handle VOID_CST.
  1817. * tree.c (cp_tree_equal): Likewise.
  1818. (build_dummy_object, is_dummy_object, stabilize_expr): Use void_node
  1819. instead of void_zero_node.
  1820. * typeck.c (check_return_expr): Likewise.
  1821. * typeck2.c (build_functional_cast): Likewise.
  1822. 2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
  1823. PR c/60189
  1824. * parser.c (cp_parser_postfix_expression): Move handling of cilk_sync
  1825. from here to...
  1826. (cp_parser_statement): ...here. Make sure only semicolon can go after
  1827. Cilk_sync.
  1828. 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
  1829. PR c++/58753
  1830. PR c++/58930
  1831. PR c++/58704
  1832. * typeck2.c (digest_nsdmi_init): New.
  1833. * parser.c (cp_parser_late_parse_one_default_arg): Use it.
  1834. * init.c (get_nsdmi): Likewise.
  1835. * cp-tree.h (digest_nsdmi_init): Declare.
  1836. 2014-05-20 Jason Merrill <jason@redhat.com>
  1837. * typeck.c (get_member_function_from_ptrfunc): Don't try to look
  1838. up a virtual function in a dummy object.
  1839. 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
  1840. PR c++/60373
  1841. * decl.c (duplicate_decls): Replace pair of warning_at with
  1842. warning_at + inform.
  1843. (maybe_commonize_var): Likewise.
  1844. 2014-05-20 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
  1845. PR bootstrap/61210
  1846. * pt.c (tsubst_copy, tsubst_omp_for_iterator, tsubst_expr)
  1847. (tsubst_copy_and_build): Perform recursive substitutions in a
  1848. deterministic order.
  1849. 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
  1850. PR c++/58664
  1851. * typeck2.c (cxx_incomplete_type_inform): New.
  1852. (cxx_incomplete_type_diagnostic): Use it.
  1853. * decl.c (grokdeclarator): Check the element type of an
  1854. incomplete array type; call the above.
  1855. * cp-tree.h (cxx_incomplete_type_inform): Declare.
  1856. 2014-05-19 Jason Merrill <jason@redhat.com>
  1857. PR c++/58761
  1858. * pt.c (tsubst_copy): Don't check at_function_scope_p.
  1859. (instantiate_class_template_1): Don't push_to_top_level in an nsdmi.
  1860. 2014-05-19 Paolo Carlini <paolo.carlini@oracle.com>
  1861. * typeck2.c (cxx_incomplete_type_diagnostic): Use inform.
  1862. * parser.c (cp_parser_enum_specifier): Likewise.
  1863. 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
  1864. * class.c (sorted_fields_type_new): Adjust.
  1865. * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
  1866. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
  1867. * cp-tree.h: Remove usage of variable_size gty attribute.
  1868. * decl.c (make_label_decl): Adjust.
  1869. (check_goto): Likewise.
  1870. (start_preparsed_function): Likewise.
  1871. (save_function_data): Likewise.
  1872. * lex.c (init_reswords): Likewise.
  1873. (retrofit_lang_decl): Likewise.
  1874. (cxx_dup_lang_specific_decl): Likewise.
  1875. (copy_lang_type): Likewise.
  1876. (cxx_make_type): Likewise.
  1877. * name-lookup.c (binding_entry_make): Likewise.
  1878. (binding_table_construct): Likewise.
  1879. (binding_table_new): Likewise.
  1880. (cxx_binding_make): Likewise.
  1881. (pushdecl_maybe_friend_1): Likewise.
  1882. (begin_scope): Likewise.
  1883. (push_to_top_level): Likewise.
  1884. * parser.c (cp_lexer_alloc): Likewise.
  1885. (cp_lexer_new_from_tokens): Likewise.
  1886. (cp_token_cache_new): Likewise.
  1887. (cp_parser_context_new): Likewise.
  1888. (cp_parser_new): Likewise.
  1889. (cp_parser_nested_name_specifier_opt): Likewise.
  1890. (cp_parser_template_id): Likewise.
  1891. * pt.c (maybe_process_partial_specialization): Likewise.
  1892. (register_specialization): Likewise.
  1893. (add_pending_template): Likewise.
  1894. (lookup_template_class_1): Likewise.
  1895. (push_tinst_level): Likewise.
  1896. * semantics.c (register_constexpr_fundef): Likewise.
  1897. (cxx_eval_call_expression): Likewise.
  1898. * typeck2.c (abstract_virtuals_error_sfinae): Likewise.
  1899. 2014-05-16 Paolo Carlini <paolo.carlini@oracle.com>
  1900. PR c++/51640
  1901. * parser.c (cp_parser_diagnose_invalid_type_name): Early return
  1902. when cp_parser_lookup_name sets ambiguous_decls.
  1903. 2014-05-15 Jason Merrill <jason@redhat.com>
  1904. * call.c (print_conversion_rejection): Use loc consistently.
  1905. 2014-05-14 Paolo Carlini <paolo.carlini@oracle.com>
  1906. * cp-tree.h (DIRECT_LIST_INIT_P): Add.
  1907. * call.c (convert_like_real, build_new_method_call_1): Use it.
  1908. * decl2.c (grokfield): Likewise.
  1909. * init.c (perform_member_init, build_aggr_init, expand_default_init,
  1910. build_new_1): Likewise.
  1911. * mangle.c (write_expression): Likewise.
  1912. * parser.c (cp_parser_late_parse_one_default_arg): Likewise.
  1913. 2014-05-14 Jason Merrill <jason@redhat.com>
  1914. PR c++/20332
  1915. PR c++/21631
  1916. * call.c (reference_binding): Treat lvalue/rvalue mismatch and
  1917. dropped cv-quals as a bad conversion.
  1918. (convert_like_real) [ck_ref_bind]: Explain them.
  1919. (compare_ics): Check badness before stripping reference
  1920. bindings. Handle comparing bad reference bindings.
  1921. * typeck.c (comp_cv_qualification): Add overload that just takes
  1922. integers.
  1923. * cp-tree.h: Declare it.
  1924. * call.c (struct conversion_info): Rename 'from_type' to 'from'.
  1925. (arg_conversion_rejection, bad_arg_conversion_rejection)
  1926. (explicit_conversion_rejection, template_conversion_rejection): Adjust.
  1927. (add_function_candidate): Pass actual argument, rather than type, to
  1928. bad_arg_conversion_rejection.
  1929. (print_conversion_rejection): Explain what's wrong with the conversion.
  1930. (print_z_candidates): Say "candidate:" before each candidate.
  1931. (splice_viable): Be strict if we see a viable or template candidate.
  1932. (build_user_type_conversion_1): Pass false to strict parameter.
  1933. (perform_overload_resolution, build_conditional_expr_1): Likewise.
  1934. (build_new_op_1, build_new_method_call_1): Likewise.
  1935. (build_op_call_1): Pass true to strict parameter.
  1936. 2014-05-13 Jason Merrill <jason@redhat.com>
  1937. * call.c (print_error_for_call_failure): Say "no match" rather
  1938. than "ambiguous" if there were no strict matches.
  1939. (build_new_method_call_1): Likewise.
  1940. PR c++/61151
  1941. * semantics.c (is_this_parameter): Allow capture proxies too.
  1942. 2014-05-12 Jason Merrill <jason@redhat.com>
  1943. * call.c (maybe_print_user_conv_context): New.
  1944. (convert_like_real): Use it. Print call context for bad
  1945. user-defined conversion.
  1946. (build_over_call): Print call context for bad 'this' conversion.
  1947. * call.c (convert_like_real): Use inform for identifying the
  1948. declaration point.
  1949. 2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
  1950. * cvt.c (cp_convert_to_pointer): Don't call error_at if
  1951. complain & tf_error is false.
  1952. * decl.c (make_unbound_class_template): Prefer inform for
  1953. "declared here"-type message.
  1954. 2014-05-09 Momchil Velikov <momchil.velikov@gmail.com>
  1955. PR c++/60463
  1956. PR c++/60755
  1957. * lambda.c (lambda_expr_this_capture): Add new parameter
  1958. add_capture_p controlling whether the functions will try to
  1959. capture 'this' via the default capture.
  1960. (maybe_resolve_dummy): Likewise.
  1961. * cp-tree.h: Adjust prototypes.
  1962. * call.c, semantics.c: Change callers of these functions.
  1963. * call.c (build_new_method_call_1): Use the actual 'this' that
  1964. would be potentially captured for the overload resolution, instead
  1965. of the dummy object.
  1966. 2014-05-09 Paolo Carlini <paolo.carlini@oracle.com>
  1967. * pt.c (convert_nontype_argument_function): Add tsubst_flags_t
  1968. parameter.
  1969. (convert_nontype_argument): Adjust calls.
  1970. (coerce_template_parameter_pack): Add missing complain & tf_error
  1971. check.
  1972. 2014-05-09 Jason Merrill <jason@redhat.com>
  1973. DR 587
  1974. PR c++/51317
  1975. * call.c (build_conditional_expr_1, conditional_conversion): Handle
  1976. non-class lvalues and xvalues that differ only in cv-qualifiers.
  1977. DR 5
  1978. PR c++/60019
  1979. * call.c (build_user_type_conversion_1): The copy-init temporary
  1980. is cv-unqualified.
  1981. PR c++/58714
  1982. * tree.c (stabilize_expr): A stabilized prvalue is an xvalue.
  1983. PR c++/54348
  1984. * call.c (build_conditional_expr_1): If overload resolution finds
  1985. no match, just say "different types".
  1986. PR c++/32019
  1987. * call.c (build_conditional_expr_1): Improve ambiguity diagnostic.
  1988. PR c++/22434
  1989. * call.c (build_conditional_expr_1): Don't try to pool cv-quals
  1990. if we didn't find a conversion.
  1991. Don't accept a bad conversion too early.
  1992. 2014-05-08 Paolo Carlini <paolo.carlini@oracle.com>
  1993. PR c++/13981
  1994. * typeck.c (convert_for_assignment): Provide an inform for pointers
  1995. to incomplete class types.
  1996. 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
  1997. PR c++/61083
  1998. * pt.c (convert_nontype_argument): Protect all the error calls
  1999. with complain & tf_error.
  2000. 2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
  2001. PR c++/61080
  2002. * pt.c (instantiate_decl): Avoid generating the body of a
  2003. deleted function.
  2004. 2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
  2005. PR c++/60999
  2006. * pt.c (maybe_begin_member_template_processing): Use
  2007. uses_template_parms.
  2008. 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
  2009. Mike Stump <mikestump@comcast.net>
  2010. Richard Sandiford <rdsandiford@googlemail.com>
  2011. * call.c: Include wide-int.h.
  2012. (type_passed_as): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
  2013. (convert_for_arg_passing): Likewise.
  2014. * class.c: Include wide-int.h.
  2015. (walk_subobject_offsets): Use tree_int_cst_lt instead of INT_CST_LT.
  2016. (end_of_class): Use tree_int_cst_lt instead of INT_CST_LT_UNSIGNED.
  2017. (include_empty_classes): Likewise
  2018. (layout_class_type): Use tree_int_cst_lt instead of INT_CST_LT.
  2019. * cvt.c: Include wide-int.h.
  2020. (ignore_overflows): Use wide_int_to_tree.
  2021. * decl.c: Include wide-int.h.
  2022. (check_array_designated_initializer): Use wide-int interfaces.
  2023. (compute_array_index_type): Use tree_int_cst_lt instead of INT_CST_LT.
  2024. (finish_enum_value_list): Use signop.
  2025. (build_enumerator): Use wide-int interfaces.
  2026. * init.c: Include wide-int.h.
  2027. (build_new_1): Use wide-int interfaces.
  2028. * mangle.c: Include wide-int.h.
  2029. (write_integer_cst): Use wide-int interfaces.
  2030. (write_array_type): Likewise.
  2031. * tree.c: Include wide-int.h.
  2032. (cp_tree_equal): Use tree_int_cst_equal.
  2033. * typeck2.c: Include wide-int.h.
  2034. (process_init_constructor_array): Use wide-int interfaces.
  2035. 2014-05-03 Paolo Carlini <paolo.carlini@oracle.com>
  2036. PR c++/58582
  2037. * decl.c (grokfndecl): Check duplicate_decls return value for
  2038. error_mark_node.
  2039. * pt.c (instantiate_decl): A deleted function is defined.
  2040. 2014-05-02 Jason Merrill <jason@redhat.com>
  2041. * decl2.c (vague_linkage_p): Local statics have vague linkage.
  2042. PR c++/60992
  2043. * lambda.c (lambda_capture_field_type): Wrap anything dependent
  2044. other than 'this'.
  2045. (add_capture): Check for VLA before calling it.
  2046. * semantics.c (is_this_parameter): Accept any 'this' parameter, not
  2047. just the current one. Make non-static.
  2048. * cp-tree.h: Declare it.
  2049. * pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
  2050. the operand was static or constant.
  2051. 2014-05-02 Marek Polacek <polacek@redhat.com>
  2052. * typeck.c (maybe_warn_about_returning_address_of_local): Separate
  2053. warning_at calls.
  2054. 2014-05-01 Marek Polacek <polacek@redhat.com>
  2055. PR c/43395
  2056. * typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
  2057. between label and variable when warning about returning local address.
  2058. 2014-04-30 Jason Merrill <jason@redhat.com>
  2059. PR c++/60980
  2060. * init.c (build_value_init): Don't try to call an array constructor.
  2061. PR c++/60951
  2062. * typeck2.c (massage_init_elt): Use maybe_constant_init.
  2063. 2014-04-30 Marek Polacek <polacek@redhat.com>
  2064. * typeck.c (cp_build_binary_op): Call ubsan_instrument_division
  2065. even when SANITIZE_FLOAT_DIVIDE is on. Set doing_div_or_mod even
  2066. for non-integer types.
  2067. 2014-04-29 Jason Merrill <jason@redhat.com>
  2068. DR 1351
  2069. Represent the unevaluated exception specification of an implicitly
  2070. declared or deleted function with a simple placeholder, not a list
  2071. of functions.
  2072. * cp-tree.h (UNEVALUATED_NOEXCEPT_SPEC_P): New.
  2073. * except.c (unevaluated_noexcept_spec): New.
  2074. * class.c (deduce_noexcept_on_destructor): Use it.
  2075. * decl.c (check_redeclaration_exception_specification): Call
  2076. maybe_instantiate_noexcept.
  2077. (duplicate_decls): Call it before merge_types.
  2078. (start_preparsed_function): Call maybe_instantiate_noexcept.
  2079. * decl2.c (mark_used): Call maybe_instantiate_noexcept earlier.
  2080. * init.c (get_nsdmi): Factor out of perform_member_init.
  2081. * method.c (process_subob_fn): Call maybe_instantiate_noexcept.
  2082. (walk_field_subobs): Consider NSDMI for EH spec.
  2083. (get_defaulted_eh_spec): New.
  2084. (implicitly_declare_fn): Use unevaluated_noexcept_spec.
  2085. (defaulted_late_check): Defer EH checking in non-template classes.
  2086. (after_nsdmi_defaulted_late_checks): New.
  2087. * parser.c (cp_parser_class_specifier_1): Use it.
  2088. (unparsed_classes): New macro.
  2089. * parser.h (cp_unparsed_functions_entry_d): Add classes field.
  2090. * pt.c (maybe_instantiate_noexcept): Use get_defaulted_eh_spec.
  2091. Remove list-of-functions handling.
  2092. * typeck2.c (merge_exception_specifiers): Remove list-of-functions
  2093. handling and FN parameter.
  2094. * typeck.c (merge_types): Adjust.
  2095. 2014-04-28 Paolo Carlini <paolo.carlini@oracle.com>
  2096. PR c++/59120
  2097. * parser.c (cp_parser_alias_declaration): Check return value of
  2098. cp_parser_require.
  2099. 2014-04-24 Jakub Jelinek <jakub@redhat.com>
  2100. * parser.c (cp_parser_omp_atomic): Allow seq_cst before
  2101. atomic-clause, allow comma in between atomic-clause and
  2102. seq_cst.
  2103. 2014-04-24 Marc Glisse <marc.glisse@inria.fr>
  2104. PR libstdc++/43622
  2105. * rtti.c (emit_support_tinfos): Do not iterate on
  2106. registered_builtin_types (partial revert).
  2107. 2014-04-23 Dinar Temirbulatov <dtemirbulatov@gmail.com>
  2108. PR c++/57958
  2109. * semantics.c (apply_deduced_return_type): Complete non-void type
  2110. before estimating whether the type is aggregate.
  2111. 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
  2112. PR libstdc++/43622
  2113. * rtti.c (emit_support_tinfo_1): New function, extracted from
  2114. emit_support_tinfos.
  2115. (emit_support_tinfos): Call it and iterate on registered_builtin_types.
  2116. 2014-04-22 Jakub Jelinek <jakub@redhat.com>
  2117. PR c/59073
  2118. * parser.c (cp_parser_omp_parallel): If cp_parser_omp_for
  2119. fails, don't set OM_PARALLEL_COMBINED and return NULL.
  2120. 2014-04-18 Jason Merrill <jason@redhat.com>
  2121. DR 1571
  2122. * call.c (reference_binding): Recurse on user-defined conversion.
  2123. PR c++/60872
  2124. * call.c (standard_conversion): Don't try to apply restrict to void.
  2125. 2014-04-16 Marc Glisse <marc.glisse@inria.fr>
  2126. * decl.c (reshape_init_r): Handle a single element of vector type.
  2127. 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
  2128. PR c++/60765
  2129. * decl2.c (cplus_decl_attributes): Handle
  2130. pointer-to-member-function declarations.
  2131. 2014-04-16 Patrick Palka <patrick@parcs.ath.cx>
  2132. PR c++/60764
  2133. * call.c (build_user_type_coversion): Use build_dummy_object
  2134. to create the placeholder object for a constructor method call.
  2135. (build_special_member_call): Likewise.
  2136. (build_over_call): Check for the placeholder object with
  2137. is_dummy_object.
  2138. (build_new_method_call_1): Likewise. Don't attempt to resolve
  2139. a dummy object for a constructor method call.
  2140. 2014-04-16 Paul Pluzhnikov <ppluzhnikov@google.com>
  2141. PR c++/59295
  2142. * friend.c (add_friend, make_friend_class): Move repeated friend
  2143. warning under Wredundant_decls.
  2144. 2014-04-15 Paolo Carlini <paolo.carlini@oracle.com>
  2145. * decl.c (duplicate_decls): Remove redundant TYPE_NAME use.
  2146. * name-lookup.c (pushdecl_maybe_friend_1): Likewise.
  2147. (do_class_using_decl): Likewise.
  2148. * mangle.c (dump_substitution_candidates): Use TYPE_NAME_STRING.
  2149. 2014-04-15 Jakub Jelinek <jakub@redhat.com>
  2150. PR plugins/59335
  2151. * Make-lang.h (CP_PLUGIN_HEADERS): Add type-utils.h.
  2152. 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
  2153. * cp-tree.h (TYPE_IDENTIFIER): Remove declaration.
  2154. 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
  2155. * pt.c (mark_template_parm): Use template_parm_level_and_index.
  2156. 2014-04-11 Jason Merrill <jason@redhat.com>
  2157. * parser.h (struct cp_token): Rename ambiguous_p to error_reported.
  2158. * parser.c: Adjust.
  2159. (cp_lexer_get_preprocessor_token): Always clear it.
  2160. (cp_parser_lambda_expression): Use it to avoid duplicate diagnostics.
  2161. DR 1467
  2162. PR c++/51747
  2163. * decl.c (reshape_init_r): Handle a single element of class type.
  2164. DR 1338
  2165. * decl.c (cxx_init_decl_processing): Set DECL_IS_MALLOC on
  2166. built-in operator new.
  2167. 2014-04-11 Paolo Carlini <paolo.carlini@oracle.com>
  2168. PR c++/58600
  2169. * name-lookup.c (parse_using_directive): Return early if the
  2170. attribs argument is error_mark_node; use get_attribute_name.
  2171. 2014-04-11 Jason Merrill <jason@redhat.com>
  2172. DR 1030
  2173. PR c++/51253
  2174. * cp-tree.h (CALL_EXPR_LIST_INIT_P): New.
  2175. * call.c (struct z_candidate): Add flags field.
  2176. (add_candidate): Add flags parm.
  2177. (add_function_candidate, add_conv_candidate, build_builtin_candidate)
  2178. (add_template_candidate_real): Pass it.
  2179. (build_over_call): Set CALL_EXPR_LIST_INIT_P.
  2180. * tree.c (build_aggr_init_expr): Copy it.
  2181. * semantics.c (simplify_aggr_init_expr): Preevaluate args if it's set.
  2182. 2014-04-10 Richard Biener <rguenther@suse.de>
  2183. Jakub Jelinek <jakub@redhat.com>
  2184. PR ipa/60761
  2185. * error.c (dump_decl) <case FUNCTION_DECL>: If
  2186. DECL_LANG_SPECIFIC is NULL, but DECL_ABSTRACT_ORIGIN is not,
  2187. recurse on DECL_ABSTRACT_ORIGIN instead of printing
  2188. <built-in>.
  2189. 2014-04-09 Fabien Chêne <fabien@gcc.gnu.org>
  2190. * pt.c (check_template_variable): Check for the return of pedwarn
  2191. before emitting a note.
  2192. * parser.c (cp_parser_lambda_introducer): Likewise.
  2193. 2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
  2194. PR c++/59115
  2195. * pt.c (process_template_parm): For an invalid non-type parameter
  2196. only set TREE_TYPE to error_mark_node.
  2197. (push_inline_template_parms_recursive, comp_template_parms,
  2198. redeclare_class_template, coerce_template_template_parm,
  2199. coerce_template_template_parms, unify): Use error_operand_p.
  2200. 2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
  2201. * class.c (check_bases_and_members): Warn about non-virtual dtors
  2202. in public bases only. Check warn_ecpp before complaining about
  2203. non-polymorphic bases.
  2204. 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
  2205. * decl.c (duplicate_decls): Check for the return of warning_at
  2206. before emitting a note.
  2207. (warn_misplaced_attr_for_class_type): Likewise.
  2208. (check_tag_decl): Likewise.
  2209. 2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
  2210. PR c++/58207
  2211. * semantics.c (sort_constexpr_mem_initializers): Robustify loop.
  2212. 2014-04-04 Patrick Palka <patrick@parcs.ath.cx>
  2213. PR c++/44613
  2214. * semantics.c (add_stmt): Set STATEMENT_LIST_HAS_LABEL.
  2215. * decl.c (cp_finish_decl): Create a new BIND_EXPR before
  2216. instantiating a variable-sized type.
  2217. PR c++/21113
  2218. * decl.c (decl_jump_unsafe): Consider variably-modified decls.
  2219. 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
  2220. * class.c (find_abi_tags_r): Check for the return of warning
  2221. before emitting a note.
  2222. (one_inherited_ctor): Likewise.
  2223. 2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
  2224. * decl.c (duplicate_decls): Check for the return of permerror
  2225. before emitting a note.
  2226. 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
  2227. * class.c (accessible_nvdtor_p): New.
  2228. (check_bases): Don't check base destructor here ...
  2229. (check_bases_and_members): ... check them here. Trigger on
  2230. Wnon-virtual-dtor flag.
  2231. (finish_struct_1): Use accessible_nvdtor_p.
  2232. 2014-04-01 Jason Merrill <jason@redhat.com>
  2233. * pt.c (process_partial_specialization): Say "not deducible"
  2234. rather than "not used". Use inform.
  2235. PR c++/60374
  2236. * pt.c (coerce_template_parms): Check that the pack expansion
  2237. pattern works with the first matching parameter.
  2238. 2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
  2239. * init.c (perform_member_init): Homogenize uninitialized
  2240. diagnostics.
  2241. 2014-04-01 Jason Merrill <jason@redhat.com>
  2242. PR c++/60708
  2243. * call.c (build_array_conv): Call complete_type.
  2244. PR c++/60713
  2245. * typeck2.c (PICFLAG_SIDE_EFFECTS): New.
  2246. (picflag_from_initializer): Return it.
  2247. (process_init_constructor): Handle it.
  2248. PR c++/60642
  2249. * decl2.c (is_late_template_attribute): Don't defer abi_tag.
  2250. * mangle.c (write_unqualified_name): Fix abi_tag on templates.
  2251. * pt.c (get_template_info): Handle NAMESPACE_DECL.
  2252. (most_general_template): Handle more kinds of template.
  2253. * tree.c (handle_abi_tag_attribute): Ignore abi_tag on template
  2254. instantiations and specializations.
  2255. 2014-03-31 Patrick Palka <patrick@parcs.ath.cx>
  2256. PR c++/44859
  2257. * typeck.c (maybe_warn_about_returning_address_of_local): Unwrap
  2258. COMPONENT_REFs and ARRAY_REFs sooner.
  2259. 2014-03-29 Adam Butcher <adam@jessamine.co.uk>
  2260. PR c++/60626
  2261. * parser.c (cp_parser_init_declarator): Handle erroneous generic type
  2262. usage in non-functions with pushed scope.
  2263. 2014-03-28 Adam Butcher <adam@jessamine.co.uk>
  2264. PR c++/60573
  2265. * name-lookup.h (cp_binding_level): New transient field defining_class_p
  2266. to indicate whether a scope is in the process of defining a class.
  2267. * semantics.c (begin_class_definition): Set defining_class_p.
  2268. * name-lookup.c (leave_scope): Reset defining_class_p.
  2269. * parser.c (synthesize_implicit_template_parm): Use cp_binding_level::
  2270. defining_class_p rather than TYPE_BEING_DEFINED as the predicate for
  2271. unwinding to class-defining scope to handle the erroneous definition of
  2272. a generic function of an arbitrarily nested class within an enclosing
  2273. class.
  2274. 2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
  2275. PR c++/52369
  2276. * method.c (walk_field_subobs): Improve the diagnostic
  2277. locations for both REFERENCE_TYPEs and non-static const members.
  2278. * init.c (diagnose_uninitialized_cst_or_ref_member): Use %q#D
  2279. instead of %qD to be consistent with the c++11 diagnostic.
  2280. 2014-03-25 Jason Merrill <jason@redhat.com>
  2281. PR c++/60566
  2282. PR c++/58678
  2283. * class.c (build_vtbl_initializer): Handle abstract dtors here.
  2284. * search.c (get_pure_virtuals): Not here.
  2285. PR c++/60375
  2286. * parser.c (cp_parser_lambda_expression): Don't parse the body of
  2287. a lambda in unevaluated context.
  2288. PR c++/60628
  2289. * decl.c (create_array_type_for_decl): Complain about array of auto.
  2290. 2014-03-25 Jakub Jelinek <jakub@redhat.com>
  2291. PR c++/60331
  2292. * semantics.c (potential_constant_expression_1): Handle
  2293. DECL_EXPR.
  2294. 2014-03-24 Adam Butcher <adam@jessamine.co.uk>
  2295. PR c++/60627
  2296. * parser.c (cp_parser_parameter_declaration_clause): Prevent 'auto' from
  2297. introducing an implicit function template parameter within an explicit
  2298. instantiation.
  2299. 2014-03-22 Jason Merrill <jason@redhat.com>
  2300. PR c++/60574
  2301. * decl.c (grokdeclarator): Change permerror about 'virtual auto'
  2302. to error.
  2303. 2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
  2304. PR c++/60384
  2305. * name-lookup.c (push_class_level_binding_1): Check identifier_p
  2306. on the name argument.
  2307. 2014-03-20 Jakub Jelinek <jakub@redhat.com>
  2308. PR c++/60572
  2309. * init.c (build_zero_init_1): Ignore fields with error_mark_node
  2310. type.
  2311. 2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
  2312. PR c++/51474
  2313. * call.c (build_new_method_call_1): Handle pure virtuals called by
  2314. NSDMIs too.
  2315. 2014-03-17 Adam Butcher <adam@jessamine.co.uk>
  2316. PR c++/60390
  2317. * parser.c (cp_parser_member_declaration): Don't allow
  2318. finish_fully_implicit_template to consider friend declarations to be
  2319. class member templates.
  2320. (synthesize_implicit_template_parm): Handling winding back through class
  2321. scope to the class being defined in order to inject a template argument
  2322. list.
  2323. PR c++/60391
  2324. * parser.c (cp_parser_skip_to_end_of_block_or_statement): Unwind generic
  2325. function scope as per cp_parser_skip_to_end_of_statement.
  2326. 2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
  2327. PR c++/59571
  2328. * typeck2.c (check_narrowing): Use fold_non_dependent_expr_sfinae.
  2329. 2014-03-14 Jason Merrill <jason@redhat.com>
  2330. PR c++/60532
  2331. PR c++/58678
  2332. * search.c (get_pure_virtuals): Handle abstract dtor here.
  2333. (dfs_get_pure_virtuals): Not here.
  2334. PR c++/58678
  2335. * search.c (dfs_get_pure_virtuals): Treat the destructor of an
  2336. abstract class as pure.
  2337. 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
  2338. PR c++/60383
  2339. * pt.c (maybe_process_partial_specialization): Check return value
  2340. of check_specialization_namespace.
  2341. 2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
  2342. PR c++/60254
  2343. * semantics.c (finish_static_assert): Call cxx_constant_value only
  2344. if require_potential_rvalue_constant_expression returns true.
  2345. 2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
  2346. PR c++/60389
  2347. * method.c (get_inherited_ctor): New.
  2348. * cp-tree.h (get_inherited_ctor): Declare it.
  2349. * semantics.c (is_valid_constexpr_fn): Use it.
  2350. 2014-03-10 Jason Merrill <jason@redhat.com>
  2351. PR c++/60367
  2352. * call.c (convert_default_arg): Remove special handling for
  2353. CONSTRUCTOR.
  2354. PR c++/53492
  2355. * parser.c (cp_parser_class_head): Also check PRIMARY_TEMPLATE_P
  2356. when deciding whether to call push_template_decl for a member class.
  2357. * pt.c (push_template_decl_real): Return after wrong levels error.
  2358. 2014-03-08 Adam Butcher <adam@jessamine.co.uk>
  2359. PR c++/60033
  2360. * pt.c (tsubst_copy): When retrieving a capture pack from a generic
  2361. lambda, remove the lambda's own template argument list prior to fetching
  2362. the specialization.
  2363. PR c++/60393
  2364. * parser.c (cp_parser_parameter_declaration_clause): Move generic
  2365. function template unwinding on error into a more general location, ...
  2366. (cp_parser_skip_to_end_of_statement): ... here.
  2367. 2014-03-07 Jason Merrill <jason@redhat.com>
  2368. * Make-lang.in (check_g++_parallelize): Split dg.exp.
  2369. * parser.c (cp_parser_type_id_1): Only allow 'auto' in C++1y if
  2370. we're in a trailing return type.
  2371. * typeck.c (comp_template_parms_position): 'auto' and
  2372. 'decltype(auto)' are different from real template parms.
  2373. * parser.c (cp_parser_using_declaration): Consume the semicolon
  2374. after bare parameter pack error.
  2375. * cp-tree.h (REF_PARENTHESIZED_P): New.
  2376. * semantics.c (force_paren_expr): Set it.
  2377. * pt.c (do_auto_deduction): Check it.
  2378. (tsubst) [COMPONENT_REF]: Copy it.
  2379. * typeck.c (maybe_warn_about_useless_cast): Don't strip dereference.
  2380. * decl.c (create_array_type_for_decl): Only warn about invalid
  2381. C++1y VLA if flag_iso or warn_vla>0.
  2382. (grokdeclarator): Likewise.
  2383. * pt.c (tsubst): Likewise.
  2384. * semantics.c (finish_decltype_type): Likewise.
  2385. * typeck.c (cxx_sizeof_or_alignof_type): Likewise.
  2386. (cp_build_addr_expr_1): Likewise.
  2387. * init.c (build_new_1): Improve diagnostics.
  2388. 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
  2389. PR c++/58609
  2390. * decl.c (check_initializer): Return NULL_TREE after error;
  2391. consistently use inform.
  2392. 2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
  2393. * decl.c (check_initializer): Remove dead code.
  2394. 2014-03-06 Marek Polacek <polacek@redhat.com>
  2395. PR c/60197
  2396. * typeck.c (check_return_expr): Call contains_cilk_spawn_stmt instead
  2397. of checking tree code.
  2398. 2014-03-06 Paolo Carlini <paolo.carlini@oracle.com>
  2399. * parser.c (cp_lexer_set_source_position): New.
  2400. (cp_parser_mem_initializer): Use it.
  2401. (cp_parser_postfix_open_square_expression): Likewise.
  2402. (cp_parser_parenthesized_expression_list): Likewise.
  2403. (cp_parser_new_initializer): Likewise.
  2404. (cp_parser_jump_statement): Likewise.
  2405. (cp_parser_initializer): Likewise.
  2406. (cp_parser_functional_cast): Likewise.
  2407. 2014-03-05 Jason Merrill <jason@redhat.com>
  2408. PR c++/60409
  2409. * semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
  2410. dependent expression.
  2411. PR c++/60361
  2412. * parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
  2413. if re-parsing might succeed.
  2414. * semantics.c (finish_id_expression): Use of a parameter outside
  2415. the function body is a parse error.
  2416. * parser.c (cp_parser_mem_initializer): Set input_location
  2417. properly for init-list warning.
  2418. (cp_parser_postfix_open_square_expression): Likewise.
  2419. (cp_parser_parenthesized_expression_list): Likewise.
  2420. (cp_parser_new_initializer): Likewise.
  2421. (cp_parser_jump_statement): Likewise.
  2422. (cp_parser_initializer): Likewise.
  2423. (cp_parser_functional_cast): Likewise.
  2424. 2014-03-04 Jason Merrill <jason@redhat.com>
  2425. PR c++/60417
  2426. * typeck2.c (process_init_constructor_record): Set
  2427. CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
  2428. PR c++/60415
  2429. PR c++/54359
  2430. * parser.c (cp_parser_direct_declarator): Set declarator to
  2431. cp_error_declarator on invalid qualified-id.
  2432. 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
  2433. PR c++/60376
  2434. * parser.c (cp_parser_using_declaration): Early return when
  2435. cp_parser_nested_name_specifier errors out.
  2436. 2014-03-01 Adam Butcher <adam@jessamine.co.uk>
  2437. PR c++/60377
  2438. * parser.c (cp_parser_parameter_declaration_clause): Unwind generic
  2439. function scope on parse error in function parameter list.
  2440. 2014-03-01 Paolo Carlini <paolo.carlini@oracle.com>
  2441. * method.c (implicitly_declare_fn): Remove redundant
  2442. DECL_TEMPLATE_RESULT and STRIP_TEMPLATE uses.
  2443. * semantics.c (is_instantiation_of_constexpr): Likewise.
  2444. * error.c (dump_function_decl): Likewise.
  2445. 2014-03-01 Jason Merrill <jason@redhat.com>
  2446. PR c++/60379
  2447. * semantics.c (begin_maybe_infinite_loop): Use
  2448. fold_non_dependent_expr_sfinae.
  2449. 2014-02-28 Jason Merrill <jason@redhat.com>
  2450. PR c++/58845
  2451. * typeck.c (cp_build_binary_op): Sorry on vector&&vector.
  2452. 2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
  2453. PR c++/58610
  2454. * cp-tree.h (DECL_DELETED_FN): Use LANG_DECL_FN_CHECK.
  2455. * call.c (print_z_candidate): Remove STRIP_TEMPLATE use.
  2456. * lambda.c (maybe_add_lambda_conv_op): Likewise.
  2457. 2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
  2458. PR c++/60253
  2459. * call.c (convert_arg_to_ellipsis): Return error_mark_node after
  2460. error_at.
  2461. 2014-02-27 Jason Merrill <jason@redhat.com>
  2462. PR c++/60353
  2463. PR c++/55877
  2464. * decl2.c (tentative_decl_linkage): Don't mess with functions that
  2465. are not yet defined.
  2466. 2014-02-26 Jason Merrill <jason@redhat.com>
  2467. PR c++/60347
  2468. PR lto/53808
  2469. * class.c (clone_function_decl): Don't note_vague_linkage_fn.
  2470. * init.c (build_vtbl_address): Do it here.
  2471. PR c++/59231
  2472. PR c++/11586
  2473. PR c++/14710
  2474. PR c++/57132
  2475. * pt.c (struct warning_sentinel): New.
  2476. (tsubst_copy_and_build): Use it instead of
  2477. c_inhibit_evaluation_warnings.
  2478. * typeck.c (maybe_warn_about_useless_cast): Remove
  2479. c_inhibit_evaluation_warnings check.
  2480. PR c++/54440
  2481. * pt.c (get_template_parm_index): New.
  2482. (fixed_parameter_pack_p_1, fixed_parameter_pack_p): New.
  2483. (process_template_parm): Allow bare packs in template template
  2484. parm template parms.
  2485. (coerce_template_parameter_pack): Handle fixed template template
  2486. parm packs and fixed packs not at the end of the parm list.
  2487. (coerce_template_parms): Handle template parm packs not at the end
  2488. of the parm list.
  2489. (gen_elem_of_pack_expansion_instantiation): Handle a decl expansion.
  2490. PR c++/60182
  2491. * pt.c (unify): Ignore alias templates when deducing a template
  2492. template parameter.
  2493. PR c++/60345
  2494. Revert:
  2495. DR 1571
  2496. * call.c (reference_binding): Recurse on user-defined conversion.
  2497. (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
  2498. 2014-02-25 Jason Merrill <jason@redhat.com>
  2499. DR 1571
  2500. * call.c (reference_binding): Recurse on user-defined conversion.
  2501. (convert_like_real) [ck_ref_bind]: Explain cv-qual mismatch.
  2502. * call.c (print_conversion_rejection): Handle n_arg of -2.
  2503. (build_user_type_conversion_1): Pass it.
  2504. PR c++/55877
  2505. * decl2.c (no_linkage_error): Handle C++98 semantics.
  2506. (reset_type_linkage): Move from decl.c.
  2507. (reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
  2508. (bt_reset_linkage_2, reset_decl_linkage): New.
  2509. (tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
  2510. (cp_write_global_declarations): Move condition into no_linkage_error.
  2511. * decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
  2512. * semantics.c (expand_or_defer_fn_1): Factor out
  2513. tentative_decl_linkage.
  2514. * cp-tree.h: Adjust.
  2515. * decl2.c (finish_static_data_member_decl): Diagnose static data
  2516. member in unnamed class.
  2517. * class.c (finish_struct_anon_r): Avoid redundant diagnostic.
  2518. PR lto/53808
  2519. * class.c (clone_function_decl): Call note_vague_linkage_fn for
  2520. defaulted virtual dtor.
  2521. DR 1286
  2522. PR c++/60328
  2523. * pt.c (get_underlying_template): Fix equivalence calculation.
  2524. 2014-02-25 Adam Butcher <adam@jessamine.co.uk>
  2525. PR c++/60311
  2526. * parser.c (function_being_declared_is_template_p): Return false when
  2527. processing a template parameter list.
  2528. (cp_parser_parameter_declaration_clause): Don't set
  2529. auto_is_implicit_function_template_parm_p when processing a
  2530. template parameter list.
  2531. * parser.c (synthesize_implicit_template_parm): Inject new template
  2532. argument list appropriately when a generic member function
  2533. of a class template is declared out-of-line.
  2534. PR c++/60065
  2535. * parser.c (cp_parser_direct_declarator): Don't save and
  2536. restore num_template_parameter_lists around call to
  2537. cp_parser_parameter_declaration_list.
  2538. (function_being_declared_is_template_p): New predicate.
  2539. (cp_parser_parameter_declaration_list): Use
  2540. function_being_declared_is_template_p as predicate for
  2541. inspecting current function template parameter list length
  2542. rather than num_template_parameter_lists.
  2543. 2014-02-24 Jason Merrill <jason@redhat.com>
  2544. PR c++/60146
  2545. * pt.c (tsubst_omp_for_iterator): Don't let substitution of the
  2546. DECL_EXPR initialize a non-class iterator.
  2547. PR c++/60312
  2548. * parser.c (cp_parser_template_type_arg): Check for invalid 'auto'.
  2549. 2014-02-21 Jason Merrill <jason@redhat.com>
  2550. PR c++/58170
  2551. * parser.c (cp_parser_type_name): Always check dependency.
  2552. (cp_parser_type_specifier_seq): Call
  2553. cp_parser_parse_and_diagnose_invalid_type_name.
  2554. PR c++/60108
  2555. * semantics.c (expand_or_defer_fn_1): Check DECL_DEFAULTED_FN.
  2556. PR c++/60185
  2557. * parser.c (cp_parser_default_argument): Clear
  2558. current_class_ptr/current_class_ref like tsubst_default_argument.
  2559. PR c++/60252
  2560. * lambda.c (maybe_resolve_dummy): Check lambda_function rather
  2561. than current_binding_level.
  2562. PR c++/60186
  2563. * typeck2.c (massage_init_elt): Call fold_non_dependent_expr_sfinae.
  2564. PR c++/60187
  2565. * parser.c (cp_parser_enum_specifier): Call
  2566. check_for_bare_parameter_packs.
  2567. PR c++/59347
  2568. * pt.c (tsubst_decl) [TYPE_DECL]: Don't try to instantiate an
  2569. erroneous typedef.
  2570. PR c++/60241
  2571. * pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
  2572. of the partial instantiation, not the most general template.
  2573. (maybe_process_partial_specialization): Reassign everything on
  2574. that list.
  2575. PR c++/60216
  2576. * pt.c (register_specialization): Copy DECL_DELETED_FN to clones.
  2577. (check_explicit_specialization): Don't clone.
  2578. PR c++/60219
  2579. * pt.c (coerce_template_parms): Bail if argument packing fails.
  2580. PR c++/60224
  2581. * decl.c (cp_complete_array_type, maybe_deduce_size_from_array_init):
  2582. Don't get confused by a CONSTRUCTOR that already has a type.
  2583. PR c++/60227
  2584. * call.c (build_array_conv): Don't crash on VLA.
  2585. PR c++/60248
  2586. * mangle.c (mangle_decl): Don't make an alias for a TYPE_DECL.
  2587. PR c++/60252
  2588. * lambda.c (maybe_resolve_dummy): Don't try to capture this
  2589. in declaration context.
  2590. DR 1591
  2591. PR c++/60051
  2592. * pt.c (unify): Only unify if deducible. Handle 0-length list.
  2593. PR c++/60250
  2594. * parser.c (cp_parser_direct_declarator): Don't wrap a
  2595. type-dependent expression in a NOP_EXPR.
  2596. PR c++/60251
  2597. * lambda.c (is_normal_capture_proxy): Handle VLA capture.
  2598. PR c++/60167
  2599. PR c++/60222
  2600. PR c++/58606
  2601. * parser.c (cp_parser_template_argument): Restore dereference.
  2602. * pt.c (template_parm_to_arg): Dereference non-pack expansions too.
  2603. (process_partial_specialization): Handle deref.
  2604. (unify): Likewise.
  2605. 2014-02-21 Adam Butcher <adam@jessamine.co.uk>
  2606. PR c++/60052
  2607. PR c++/60053
  2608. * parser.c (cp_parser_parameter_declaration_list): Correctly reset
  2609. implicit_template_scope upon leaving an out-of-line generic member
  2610. function definition.
  2611. 2014-02-20 Kai Tietz <ktietz@redhat.com>
  2612. PR c++/58873
  2613. * parser.c (cp_parser_functional_cast): Treat NULL_TREE
  2614. valued type argument as error_mark_node.
  2615. PR c++/58835
  2616. * semantics.c (finish_fname): Handle error_mark_node.
  2617. 2014-02-19 Jason Merrill <jason@redhat.com>
  2618. PR c++/60046
  2619. * pt.c (maybe_instantiate_noexcept): Don't instantiate exception
  2620. spec from template context.
  2621. 2014-02-19 Jakub Jelinek <jakub@redhat.com>
  2622. PR debug/56563
  2623. * cp-objcp-common.c (cp_function_decl_explicit_p): Remove
  2624. FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node check.
  2625. PR c++/60267
  2626. * pt.c (tsubst_expr): Handle ANNOTATE_EXPR.
  2627. 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
  2628. PR c++/60225
  2629. * semantics.c (ensure_literal_type_for_constexpr_object): Use
  2630. strip_array_types.
  2631. 2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
  2632. PR c++/60215
  2633. * semantics.c (cxx_eval_constant_expression, [COMPONENT_REF]):
  2634. During error recovery allow_non_constant may be false.
  2635. 2014-02-18 Adam Butcher <adam@jessamine.co.uk>
  2636. PR c++/60190
  2637. * parser.c (cp_parser_lambda_declarator_opt): Pop template parameter
  2638. scope whenever a template parameter list has been started, independent
  2639. of whether the function call operator was well-formed or not.
  2640. PR c++/60064
  2641. * parser.c (cp_parser_member_declaration): Pop fully implicit template
  2642. scope for generic friend declarations as well as for non-friends.
  2643. 2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
  2644. PR c++/60047
  2645. * method.c (implicitly_declare_fn): A constructor of a class with
  2646. virtual base classes isn't constexpr (7.1.5p4).
  2647. 2014-02-05 Jan Hubicka <hubicka@ucw.cz
  2648. * parser.c (synthesize_implicit_template_parm): Use grow_tree_vec.
  2649. 2014-02-05 Jakub Jelinek <jakub@redhat.com>
  2650. PR c++/58703
  2651. * parser.c (cp_parser_omp_declare_reduction): Save and free
  2652. declarator_obstack.
  2653. 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
  2654. PR c++/53017
  2655. PR c++/59211
  2656. * tree.c (handle_init_priority_attribute): Call default_conversion on
  2657. the attribute argument.
  2658. 2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
  2659. PR c++/58871
  2660. * method.c (synthesized_method_walk): If vbases is non-null but
  2661. is_empty is true, likewise don't worry about the virtual bases.
  2662. 2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
  2663. PR c++/51219
  2664. * typeck2.c (process_init_constructor_record): Just skip unnamed
  2665. bit-fields.
  2666. 2014-01-31 Jason Merrill <jason@redhat.com>
  2667. PR c++/59469
  2668. * pt.c (mark_decl_instantiated): Call mark_needed.
  2669. PR c++/58672
  2670. * decl2.c (handle_tls_init): Handle null init fn.
  2671. PR c++/55800
  2672. * decl2.c (get_tls_init_fn): Copy DECL_EXTERNAL from the variable.
  2673. 2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
  2674. PR c++/59082
  2675. * class.c (build_vfield_ref): Early return error_mark_node if
  2676. TYPE_VFIELD (type) is null.
  2677. (build_base_path): Check return value of build_vfield_ref.
  2678. 2014-01-31 Jason Merrill <jason@redhat.com>
  2679. PR c++/59646
  2680. * call.c (convert_like_real) [ck_aggr]: Set TARGET_EXPR_LIST_INIT_P.
  2681. [ck_list]: Check for error_mark_node.
  2682. (build_aggr_conv): Set LOOKUP_NO_NARROWING and check_narrowing.
  2683. PR c++/57043
  2684. * pt.c (fn_type_unification): Don't do DEDUCE_EXACT check
  2685. during partial ordering.
  2686. 2014-01-31 Marek Polacek <polacek@redhat.com>
  2687. PR c/59963
  2688. * typeck.c (build_function_call_vec): Add dummy arg_loc parameter.
  2689. 2014-01-30 Jason Merrill <jason@redhat.com>
  2690. PR c++/57899
  2691. * cp-tree.h (struct saved_scope): Add x_local_specializations.
  2692. (local_specializations): New macro.
  2693. * pt.c (local_specializations): Remove variable.
  2694. 2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
  2695. PR c++/58708
  2696. * parser.c (make_string_pack): Use double_int::from_buffer.
  2697. 2014-01-30 Marek Polacek <polacek@redhat.com>
  2698. PR c/59940
  2699. * typeck.c (build_ptrmemfunc1): Call convert_and_check with
  2700. input_location.
  2701. * cvt.c (cp_convert_and_check): Call warnings_for_convert_and_check
  2702. with input_location.
  2703. * call.c (build_conditional_expr_1): Call unsafe_conversion_p with
  2704. loc parameter.
  2705. 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
  2706. PR c++/58843
  2707. * typeck.c (lookup_destructor): Check dtor_type for error_mark_node.
  2708. 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
  2709. PR c++/58649
  2710. * pt.c (lookup_template_class_1): Check start_enum return value
  2711. for error_mark_node.
  2712. 2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
  2713. * decl.c (duplicate_decls, typename_hash, typename_compare):
  2714. Use TYPE_IDENTIFIER.
  2715. * error.c (dump_type): Likewise.
  2716. * mangle.c (dump_substitution_candidates): Likewise.
  2717. 2014-01-30 Jason Merrill <jason@redhat.com>
  2718. PR c++/59633
  2719. * decl2.c (attributes_naming_typedef_ok): New.
  2720. * cp-tree.h: Declare it.
  2721. * decl.c (grokdeclarator): Check it.
  2722. * tree.c (no_linkage_check): Handle VECTOR_TYPE.
  2723. 2014-01-29 Jason Merrill <jason@redhat.com>
  2724. PR c++/59707
  2725. * call.c (add_builtin_candidate): Catch dependent types.
  2726. PR c++/59989
  2727. * pt.c (expand_template_argument_pack): Correct
  2728. non_default_args_count calculation.
  2729. PR c++/58466
  2730. * pt.c (unify_pack_expansion): Call expand_template_argument_pack.
  2731. PR c++/59956
  2732. * friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
  2733. have a friend template in a class template.
  2734. * pt.c (tsubst_friend_function): Look through it.
  2735. (push_template_decl_real): A friend member template is
  2736. primary.
  2737. 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
  2738. PR c++/58846
  2739. * decl.c (get_dso_handle_node): Don't crash if dso_handle_node
  2740. == error_mark_node.
  2741. 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
  2742. PR c++/58674
  2743. * pt.c (instantiate_template_1): Check for error_mark_node the second
  2744. argument too.
  2745. 2014-01-29 Jason Merrill <jason@redhat.com>
  2746. PR c++/59916
  2747. * optimize.c (maybe_thunk_body): Build a RETURN_EXPR for
  2748. cdtor_returns_this case.
  2749. PR c++/59315
  2750. * decl.c (cxx_maybe_build_cleanup): Call mark_used.
  2751. 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
  2752. PR c++/58702
  2753. * semantics.c (finish_omp_reduction_clause): Check type for
  2754. error_mark_node.
  2755. 2014-01-28 Jason Merrill <jason@redhat.com>
  2756. PR c++/59791
  2757. * pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
  2758. (tsubst_copy): Use it if lookup fails.
  2759. PR c++/59818
  2760. * pt.c (tsubst_function_type): Make sure we keep the same function
  2761. quals.
  2762. PR c++/58701
  2763. * semantics.c (build_anon_member_initialization): Stop walking
  2764. when we run out of COMPONENT_REFs.
  2765. PR c++/58632
  2766. * decl.c (lookup_and_check_tag): Ignore template parameters if
  2767. scope == ts_current.
  2768. * pt.c (check_template_shadow): Don't complain about the injected
  2769. class name.
  2770. * decl.c (duplicate_decls): Tweak.
  2771. PR c++/53756
  2772. * mangle.c (write_unqualified_name): Handle operator auto.
  2773. 2014-01-27 Jason Merrill <jason@redhat.com>
  2774. PR c++/59823
  2775. Core DR 1138
  2776. * call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
  2777. list-initialization. A conversion to rvalue ref that involves
  2778. an lvalue-rvalue conversion is bad.
  2779. (convert_like_real): Give helpful error message.
  2780. PR c++/54652
  2781. * decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.
  2782. PR c++/58504
  2783. * pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
  2784. types.
  2785. PR c++/58606
  2786. * pt.c (template_parm_to_arg): Call convert_from_reference.
  2787. (tsubst_template_arg): Don't strip reference refs.
  2788. PR c++/58639
  2789. * call.c (build_aggr_conv): Reject value-initialization of reference.
  2790. PR c++/58812
  2791. PR c++/58651
  2792. * call.c (convert_like_real): Give helpful error about excess braces
  2793. for ck_rvalue of scalar type.
  2794. Core DR 1288
  2795. * call.c (reference_binding): Only elide braces if the single
  2796. element is reference-related.
  2797. PR c++/58814
  2798. * typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
  2799. stabilizing.
  2800. PR c++/58837
  2801. * typeck.c (cp_truthvalue_conversion): Use explicit comparison for
  2802. FUNCTION_DECL.
  2803. PR c++/59097
  2804. * decl.c (compute_array_index_type): Don't call
  2805. maybe_constant_value for a non-integral expression.
  2806. 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
  2807. * call.c (magic_varargs_p): Replaced flag_enable_cilkplus with
  2808. flag_cilkplus.
  2809. * cp-gimplify.c (cp_genericize): Likewise.
  2810. * decl.c (grokfndecl): Likewise.
  2811. * parser.c (cp_parser_postfix_expression): Likewise.
  2812. (cp_parser_postfix_open_square_expression): Likewise.
  2813. (cp_parser_direct_declarator): Likewise.
  2814. (is_cilkplus_vector_p): Likewise.
  2815. (cp_parser_omp_clause_name): Likewise.
  2816. (cp_parser_omp_all_clauses): Likewise.
  2817. * pt.c (apply_late_template_attributes): Likewise.
  2818. * typeck.c (cp_build_array_ref): Likewise.
  2819. (cp_build_compound_expr): Likewise.
  2820. (check_return_expr): Likewise.
  2821. 2014-01-24 Jason Merrill <jason@redhat.com>
  2822. PR c++/58550
  2823. * decl.c (grokdeclarator): Turn pedwarn about auto return type in
  2824. c++11 into error.
  2825. PR c++/59886
  2826. PR c++/59659
  2827. * typeck2.c (process_init_constructor_array): Don't create
  2828. RANGE_EXPR yet.
  2829. 2014-01-24 Jakub Jelinek <jakub@redhat.com>
  2830. * typeck2.c (split_nonconstant_init_1): Fix num_split_elts
  2831. handling for RANGE_ARRAY case.
  2832. 2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
  2833. PR c++/57524
  2834. * name-lookup.c (push_using_directive): Use timevar_cond_start.
  2835. 2014-01-23 Marek Polacek <polacek@redhat.com>
  2836. PR c/59846
  2837. * typeck.c (cp_build_binary_op): Pass location to shorten_compare.
  2838. 2014-01-23 Marek Polacek <polacek@redhat.com>
  2839. PR c/58346
  2840. * typeck.c (pointer_diff): Give an error on arithmetic on pointer to
  2841. an empty aggregate.
  2842. 2014-01-23 Jason Merrill <jason@redhat.com>
  2843. PR c++/55189
  2844. * cp-tree.h (struct language_function): Add infinite_loop and
  2845. infinite_loops.
  2846. (current_function_infinite_loop): New.
  2847. * semantics.c (begin_maybe_infinite_loop, end_maybe_infinite_loop)
  2848. (break_maybe_infinite_loop): New.
  2849. (finish_while_stmt_cond, finish_while_stmt, begin_do_stmt)
  2850. (finish_do_stmt, finish_for_cond, finish_for_stmt)
  2851. (begin_range_for_stmt): Use them.
  2852. * decl.c (finish_function): Don't warn about missing return
  2853. if current_function_infinite_loop.
  2854. * pt.c (instantiate_decl): Copy current_function_infinite_loop.
  2855. * parser.c (cp_parser_jump_statement): Call break_maybe_infinite_loop.
  2856. * call.c (build_op_delete_call): Use make_tree_vector and
  2857. release_tree_vector.
  2858. 2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
  2859. PR c++/58980
  2860. * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
  2861. nested_name_specifier.
  2862. 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
  2863. * parser.c (cp_parser_direct_declarator): When Cilk Plus is enabled
  2864. see if there is an attribute after function decl. If so, then
  2865. parse them now.
  2866. (cp_parser_late_return_type_opt): Handle parsing of Cilk Plus SIMD
  2867. enabled function late parsing.
  2868. (cp_parser_gnu_attribute_list): Parse all the tokens for the vector
  2869. attribute for a SIMD-enabled function.
  2870. (cp_parser_omp_all_clauses): Skip parsing to the end of pragma when
  2871. the function is used by SIMD-enabled function (indicated by NULL
  2872. pragma token). Added 3 new clauses: PRAGMA_CILK_CLAUSE_MASK,
  2873. PRAGMA_CILK_CLAUSE_NOMASK and PRAGMA_CILK_CLAUSE_VECTORLENGTH
  2874. (cp_parser_cilk_simd_vectorlength): Modified this function to handle
  2875. vectorlength clause in SIMD-enabled function and #pragma SIMD's
  2876. vectorlength clause. Added a new bool parameter to differentiate
  2877. between the two.
  2878. (cp_parser_cilk_simd_fn_vector_attrs): New function.
  2879. (is_cilkplus_vector_p): Likewise.
  2880. (cp_parser_late_parsing_elem_fn_info): Likewise.
  2881. (cp_parser_omp_clause_name): Added a check for "mask", "nomask"
  2882. and "vectorlength" clauses when Cilk Plus is enabled.
  2883. (cp_parser_omp_clause_linear): Added a new parameter of type bool
  2884. and emit a sorry message when step size is a parameter.
  2885. * parser.h (cp_parser::cilk_simd_fn_info): New field.
  2886. * decl.c (grokfndecl): Added flag_enable_cilkplus along with
  2887. flag_openmp.
  2888. * pt.c (apply_late_template_attributes): Likewise.
  2889. 2014-01-23 Jakub Jelinek <jakub@redhat.com>
  2890. PR middle-end/58809
  2891. * semantics.c (finish_omp_reduction_clause): Reject
  2892. BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
  2893. 2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
  2894. PR c++/59482
  2895. * parser.c (cp_parser_class_head): Push the class before parsing
  2896. the base-clause, pop after it.
  2897. 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
  2898. * decl2.c (cpp_check): Revert prototype change.
  2899. 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
  2900. PR c++/59270
  2901. PR c++/58811
  2902. * init.c (build_value_init_noctor): Don't pass error_mark_node to
  2903. build_value_init.
  2904. 2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
  2905. PR c++/59269
  2906. * init.c (build_value_init_noctor): Assert !TYPE_HAS_COMPLEX_DFLT
  2907. only when errorcount == 0.
  2908. 2014-01-17 Marek Polacek <polacek@redhat.com>
  2909. PR c++/59838
  2910. * cvt.c (ocp_convert): Don't segfault on non-existing
  2911. ENUM_UNDERLYING_TYPE.
  2912. 2014-01-16 Jason Merrill <jason@redhat.com>
  2913. PR c++/59821
  2914. * tree.c (bot_manip): Update the location of builtin_LINE and
  2915. builtin_FILE calls.
  2916. 2014-01-14 Jason Merrill <jason@redhat.com>
  2917. PR c++/59659
  2918. * typeck2.c (massage_init_elt): New.
  2919. (process_init_constructor_record)
  2920. (process_init_constructor_union): Use it.
  2921. (process_init_constructor_array): Use it. Use RANGE_EXPR.
  2922. (split_nonconstant_init_1): Handle it.
  2923. * semantics.c (cxx_eval_vec_init_1): Use force_rvalue.
  2924. 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
  2925. PR c++/59631
  2926. * parser.c (cp_parser_postfix_expression): Added a new if-statement
  2927. and replaced an existing if-statement with else-if statement.
  2928. Changed an existing error message wording to match the one from the C
  2929. parser.
  2930. 2014-01-08 Jason Merrill <jason@redhat.com>
  2931. PR c++/59614
  2932. * class.c (abi_tag_data): Add tags field.
  2933. (check_abi_tags): Initialize it.
  2934. (find_abi_tags_r): Support collecting missing tags.
  2935. (mark_type_abi_tags): Don't look at template args.
  2936. (inherit_targ_abi_tags): New.
  2937. (check_bases_and_members): Use it.
  2938. * cp-tree.h (ABI_TAG_IMPLICIT): New.
  2939. * mangle.c (write_abi_tags): Check it.
  2940. 2014-01-07 Jason Merrill <jason@redhat.com>
  2941. PR c++/58856
  2942. * pt.c (num_innermost_template_parms): New.
  2943. (get_underlying_template): Use it.
  2944. PR c++/58965
  2945. * mangle.c (write_guarded_var_name): Handle null DECL_NAME.
  2946. 2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
  2947. * semantics.c (trait_expr_value, [CPTK_IS_BASE_OF]): Implement
  2948. the letter of 20.11.6 about Base and Derived naming the same
  2949. class type modulo cv-qualifiers.
  2950. 2014-01-06 Adam Butcher <adam@jessamine.co.uk>
  2951. PR c++/59635
  2952. * lambda.c (maybe_add_lambda_conv_op): Handle marking conversion
  2953. function as unimplemented for generic lambdas with varargs.
  2954. PR c++/59636
  2955. * parser.c (cp_parser_template_parameter): Early out with
  2956. error_mark_node if parameter declaration was not parsed.
  2957. PR c++/59629
  2958. * parser.c (cp_parser_lambda_expression): Save/reset/restore
  2959. auto_is_implicit_function_template_parm_p around lambda body.
  2960. PR c++/59638
  2961. * parser.c (cp_parser_init_declarator): Undo fully implicit
  2962. template parameter list when declarator is not a function.
  2963. 2014-01-03 Marc Glisse <marc.glisse@inria.fr>
  2964. PR c++/58950
  2965. * cvt.c (convert_to_void): Handle VEC_PERM_EXPR and VEC_COND_EXPR.
  2966. 2014-01-03 Tobias Burnus <burnus@net-b.de>
  2967. PR c++/58567
  2968. * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node.
  2969. 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
  2970. Core DR 1442
  2971. PR c++/59165
  2972. * parser.c (cp_parser_perform_range_for_lookup): Don't pass true
  2973. as include_std to perform_koenig_lookup.
  2974. (cp_parser_postfix_expression): Adjust.
  2975. * pt.c (tsubst_copy_and_build): Likewise.
  2976. * semantics.c (perform_koenig_lookup): Remove bool parameter.
  2977. (omp_reduction_lookup): Adjust.
  2978. * name-lookup.c (lookup_arg_dependent_1): Remove bool parameter.
  2979. (lookup_arg_dependent): Likewise.
  2980. (lookup_function_nonclass): Adjust.
  2981. * name-lookup.h: Adjust declaration.
  2982. * cp-tree.h: Likewise.
  2983. 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
  2984. PR c++/59087
  2985. * parser.c (cp_parser_userdef_numeric_literal): Mention
  2986. -fext-numeric-literals in the message.
  2987. 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
  2988. PR c++/59641
  2989. * call.c (build_conditional_expr_1): Check the return value of
  2990. force_rvalue.
  2991. 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
  2992. * call.c (convert_like_real): Check complain.
  2993. 2014-01-02 Marc Glisse <marc.glisse@inria.fr>
  2994. PR c++/59378
  2995. * typeck.c (build_x_vec_perm_expr): Handle non-dependent arguments
  2996. in templates.
  2997. 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
  2998. Update copyright years
  2999. 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
  3000. * cp-array-notation.c, cp-cilkplus.c, vtable-class-hierarchy.c: Use
  3001. the standard form for the copyright notice.
  3002. Copyright (C) 2014 Free Software Foundation, Inc.
  3003. Copying and distribution of this file, with or without modification,
  3004. are permitted in any medium without royalty provided the copyright
  3005. notice and this notice are preserved.