ChangeLog-2002 157 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582
  1. 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
  2. * .cvsignore: Remove.
  3. 2002-12-31 Steven Bosscher <s.bosscher@student.tudelft.nl>
  4. * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
  5. except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
  6. lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
  7. pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
  8. typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
  9. copyright header.
  10. * lex.h: parse.y is dead, so don't mention it. Also replace the
  11. copyright header with the default GNU copyright header.
  12. 2002-12-31 Mark Mitchell <mark@codesourcery.com>
  13. * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
  14. (lookup_name_namespace_only): Likewise.
  15. (begin_only_namespace_names): Likewise.
  16. (end_only_namespace_names): Likewise.
  17. * decl.c (only_namespace_names): Remove.
  18. (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
  19. (lookup_name_real): Do not check only_namespace_names.
  20. (lookup_name_namespace_only): Remove.
  21. (begin_only_namespace_names): Likewise.
  22. (end_only_namespace_names): Likewise.
  23. * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
  24. nested-name-specifiers more gracefully.
  25. (cp_parser_class_or_namespace_name): Avoid looking up namespace
  26. names when they cannot possibly appear.
  27. (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
  28. (cp_parser_elaborated_type_specifier): Likewise.
  29. (cp_parser_namespace_name): Only look for namespace names.
  30. (cp_parser_lookup_name): Add is_namespace parameter.
  31. (cp_parser_lookup_name_simple): Adjust call to
  32. cp_parser_lookup_name.
  33. * parser.c (cp_parser_dependent_type_p): Fix thinko.
  34. 2002-12-31 Neil Booth <neil@daikokuya.co.uk>
  35. * .cvsignore: Update.
  36. 2002-12-31 Nathan Sidwell <nathan@codesourcery.com>
  37. * class.c (modify_vtable_entry): Remove unused variable.
  38. (get_vcall_index): Always expect a non-thunk.
  39. (update_vtable_entry_for_fn): Combine covariant adjustments, when
  40. overriding a thunk. Pass get_vcall_index a non-thunk.
  41. * decl2.c (finish_file): Mark undefined inlines as extern.
  42. 2002-12-31 Mark Mitchell <mark@codesourcery.com>
  43. * cp-tree.def (RETURN_INIT): Remove.
  44. * cp-tree.h (DECL_IN_MEMORY_P): Remove.
  45. (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
  46. (note_level_for_for): Remove.
  47. (note_level_for_try): Likewise.
  48. (note_level_for_catch): Likewise.
  49. (finish_named_return_value): Likewise.
  50. (do_pushlevel): Change prototype.
  51. (pending_lang_change): Remove.
  52. * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
  53. sk_for.
  54. (note_level_for_for): Remove.
  55. (note_level_for_try): Likewise.
  56. (note_level_for_catch): Likewise.
  57. (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
  58. * parser.c (cp_parser_context_free_list): Make it "deletable".
  59. (cp_parser_template_argument): Remove misleading comment.
  60. * pt.c (tsubst_expr): Remove RETURN_INIT code.
  61. * semantics.c (genrtl_named_return_value): Remove.
  62. (do_pushlevel): Take a scope kind as an argument.
  63. (begin_if_stmt): Adjust.
  64. (begin_while_stmt): Likewise.
  65. (begin_for_stmt): Likewise.
  66. (finish_for_init_stmt): Likewise.
  67. (begin_switch_stmt): Likewise.
  68. (begin_handler): Likewise.
  69. (begin_compound_stmt): Likewise.
  70. (finish_named_return_value): Remove.
  71. (cp_expand_stmt): Remove RETURN_INIT case.
  72. * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
  73. 2002-12-31 Mark Mitchell <mark@codesourcery.com>
  74. PR c++/9112
  75. * parser.c (cp_parser_direct_declarator): Handle erroneous
  76. parenthesized declarators correctly.
  77. 2002-12-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
  78. * cp-tree.h (pending_lang_change): Declare.
  79. 2002-12-30 Mark Mitchell <mark@codesourcery.com>
  80. * parser.c (cp_parser_context_free_list): New variable.
  81. (cp_parser_context_new): Use it.
  82. (cp_parser_error): Check return code from
  83. cp_parser_simulate_error.
  84. (cp_parser_simulate_error): Return a value.
  85. (cp_parser_id_expression): Optimize common case.
  86. (cp_parser_class_name): Likewise.
  87. (cp_parser_class_specifier): Adjust call to
  88. cp_parser_late_parsing_default_args.
  89. (cp_parser_lookup_name): Optimize common case.
  90. (cp_parser_late_parsing_for_member): Adjust call to
  91. cp_parser_late_parsing_default_args.
  92. (cp_parser_late_parsing_default_args): Add scope parameter.
  93. (cp_parser_require): Avoid creating the error message unless it's
  94. needed.
  95. (cp_parser_parse_definitely): Place free'd contexts on the free
  96. list.
  97. * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
  98. 2002-12-30 David Edelsohn <edelsohn@gnu.org>
  99. * parser.c (cp_parser_parameter_declaration_clause): Treat system
  100. header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
  101. 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
  102. * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
  103. GCC, not GNU CC.
  104. 2002-12-30 Mark Mitchell <mark@codesourcery.com>
  105. * parse.y: Remove.
  106. * spew.c: Likewise.
  107. * Make-lang.in (gt-cp-spew.h): Remove.
  108. * cp-tree.h (do_pending_lang_change): Remove.
  109. (do_identifier): Change prototype.
  110. (finish_id_expr): Remove.
  111. * decl.c (lookup_name_real): Remove yylex variable.
  112. * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
  113. * lex.c (init_cpp_parse): Remove.
  114. (reduce_cmp): Likewise.
  115. (token_cmp): Likewise.
  116. (yychar): Likewise.
  117. (lastiddecl): Likewise.
  118. (token_count): Likewise.
  119. (reduce_count): Likewise.
  120. (yyhook): Likewise.
  121. (print_parse_statistics): Likewise.
  122. (do_pending_lang_change): Likewise.
  123. (do_identifier): Remove parsing parameter.
  124. * lex.h (lastiddecl): Remove.
  125. (looking_for_typename): Remove.
  126. (looking_for_template): Likewise.
  127. (pending_lang_change): Likewise.
  128. (yylex): Likewise.
  129. * semantics.c (finish_id_expr): Remove.
  130. * decl.c (grokdeclarator): Diagnost "extern thread" and "static
  131. thread" correctly.
  132. 2002-12-30 Nathanael Nerode <neroden@gcc.gnu.org>
  133. * decl.c, decl2.c, decl.h: GCC, not GNU CC. This is the C++ front
  134. end, not the C front end.
  135. 2002-12-30 Nathan Sidwell <nathan@codesourcery.com>
  136. * cp-tree.h (THUNK_TARGET): New macro.
  137. (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
  138. (finish_thunk): Remove offset parms.
  139. * class.c (find_final_overrider): Look through thunks.
  140. (get_vcall_index): Use THUNK_TARGET.
  141. (update_vtable_entry_for_fn): Look through thunks. Set covariant
  142. fixed offset here. Adjust finish_thunk call.
  143. (build_vtbl_initializer): Adjust finish_thunk calls.
  144. * mangle.c (mangle_call_offset): Remove superfluous if.
  145. (mangle_thunk): Adjust.
  146. * method.c (make_thunk): Adjust.
  147. (finish_thunk): Adjust.
  148. (thunk_adjust): Remove assert.
  149. (use_thunk): Use THUNK_TARGET
  150. * dump1.c (cp_dump_tree): Adjust thunk dumping.
  151. PR c++/9054
  152. * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
  153. * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
  154. 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
  155. Remove traditional C constructs 4/n.
  156. * decl2.c (grok_method_quals, warn_if_unknown_interface,
  157. grok_x_components, cp_build_parm_decl, build_artificial_parm,
  158. maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
  159. delete_sanity, check_member_template, check_java_method,
  160. check_classfn, finish_static_data_member_decl, grokfield,
  161. grokbitfield, grokoptypename, grok_function_init,
  162. cplus_decl_attributes, constructor_name, defer_fn,
  163. build_anon_union_vars, finish_anon_union, coerce_new_type,
  164. coerce_delete_type, comdat_linkage, maybe_make_one_only,
  165. key_method, import_export_vtable, import_export_class,
  166. output_vtable_inherit, import_export_decl, import_export_tinfo,
  167. build_cleanup, get_guard, get_guard_bits, get_guard_cond,
  168. set_guard, start_objects, finish_objects,
  169. start_static_storage_duration_function,
  170. finish_static_storage_duration_function, get_priority_info,
  171. start_static_initialization_or_destruction,
  172. finish_static_initialization_or_destruction,
  173. do_static_initialization, do_static_destruction,
  174. prune_vars_needing_no_initialization, write_out_vars,
  175. reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
  176. add_using_namespace, merge_functions, ambiguous_decl,
  177. lookup_using_namespace, lookup_using_namespace,
  178. qualified_lookup_using_namespace, set_decl_namespace,
  179. decl_namespace, current_decl_namespace, push_decl_namespace,
  180. pop_decl_namespace, push_scope, pop_scope, add_function,
  181. arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
  182. lookup_arg_dependent, do_namespace_alias,
  183. validate_nonmember_using_decl, do_nonmember_using_decl,
  184. do_toplevel_using_decl, do_local_using_decl,
  185. do_class_using_decl, do_using_directive, check_default_args,
  186. mark_used, handle_class_head): Use C90 prototypings. Use booleans.
  187. * parser.c (cp_parser_class_head): Use booleanss.
  188. * decl.c (walk_globals, walk_vtables): Likewise.
  189. * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
  190. walk_globals): Change return type from 'int' to 'bool'.
  191. * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
  192. throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
  193. build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
  194. get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
  195. qualifier_flags, tinfo_base_init, generic_initializer,
  196. ptr_initializer, dfs_class_hint_mark, ptm_initializer,
  197. dfs_class_hint_unmark, class_hint_flags, class_initializer,
  198. typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
  199. get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
  200. unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
  201. * repo.c (repo_compile_flags, repo_template_declared,
  202. repo_template_defined, repo_class_defined, repo_get_id,
  203. repo_template_used, repo_vtable_used, repo_inline_used,
  204. repo_tinfo_used, repo_template_instantiated, extract_string,
  205. open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
  206. finish_repo): Likewise.
  207. * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
  208. cxx_print_xnode): Likewise..
  209. * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
  210. cxx_warn_unused_global_decl, cp_expr_size): Likewise.
  211. * cxxfilt.c (demangle_it, print_demangler_list, usage,
  212. standard_symbol_characters, hp_symbol_characters, main, fatal):
  213. Likewise.
  214. (strip_underscore): Change type from 'int' to 'bool'.
  215. (main): Use boolean constants.
  216. 2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
  217. Remove traditional C constructs 3/n.
  218. * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
  219. build_up_reference, warn_ref_binding, convert_to_reference,
  220. convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
  221. convert_to_void, convert, convert_force, build_type_conversion,
  222. build_expr_type_conversion, type_promotes_to,
  223. perform_qualification_conversions): Use C90 prototyping style.
  224. * decl2.c (grok_array_decl): Use boolean constant.
  225. (delete_sanity): Likewise.
  226. * typeck.c (build_unary_op): Likewise.
  227. * semantics.c (finish_switch_cond): Likewise.
  228. * parser.c (cp_parser_direct_new_declarator): Likewise.
  229. * init.c (build_new): Likewise.
  230. 2002-12-27 Mark Mitchell <mark@codesourcery.com>
  231. * Make-lang.in (po-generated): Remove parse.c.
  232. (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
  233. ($(srcdir)/cp/parse.h): Remove target.
  234. ($(srcdir)/cp/parse.c): Likewise.
  235. (gt-cp-parse.h): Likewise.
  236. (gt-cp-parser.h): New target.
  237. (c++.distclean): Do not remove parse.output.
  238. (c++.maintainer-clean): Do not remove parse.c or parse.h.
  239. (cp/spew.o): Remove target.
  240. (cp/lex.o): Adjust dependencies.
  241. (cp/pt.o): Likewise.
  242. (cp/parse.o): Likewise.
  243. (cp/TAGS): Do not mention parse.c.
  244. (cp/parser.o): New target.
  245. * NEWS: Mention the new parser.
  246. * call.c (build_scoped_method_call): Simplify.
  247. (build_method_call): Likewise.
  248. (build_new_function_call): Adjust calls to add_function_candidate
  249. and add_template_candidate.
  250. (build_new_op): Improve handling of erroroneous operands.
  251. (convert_default_arg): Remove circular argument processing.
  252. (name_as_c_string): New function.
  253. (build_new_method_call): Use it.
  254. (perform_implicit_conversion): Use error_operand_p.
  255. * class.c (finish_struct_anon): Use constructor_name_p.
  256. (check_field_decls): Likewise.
  257. (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
  258. (resolve_address_of_overloaded_function): Likewise.
  259. (instantiate_type): Tweak pointer-to-member handling.
  260. (get_primary_binfo): Remove incorrect assertion.
  261. * config-lang.in (gtfiles): Add parser.c, remove parse.c.
  262. * cp-tree.h (DEFARG_TOKENS): New macro.
  263. (default_arg): New structure.
  264. (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
  265. (lang_tree_node): Add default_arg.
  266. (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
  267. (type_info_ref_type): New macro.
  268. (saved_scope): Make processing_explicit_instantiation a boolean.
  269. (check_access): New field.
  270. (unparsed_text): Remove.
  271. (language_function): Remove unparsed_inlines.
  272. (error_operand_p): New macro.
  273. (lang_decl): Adjust pending_inline_info.
  274. (DEFARG_POINTER): Remove.
  275. (tag_types): Add typenames.
  276. (lookup_ualified_name): Declare.
  277. (lookup_name_real): Likewise.
  278. (shadow_tag): Adjust prototype.
  279. (get_scope_of_declarator): Declare it.
  280. (process_next_inline): Remove it.
  281. (check_for_missing_semicolon): Likewise.
  282. (maybe_get_template_decl_from_type_decl): Declare it.
  283. (finish_label_stmt): Adjust prototype.
  284. (finish_non_static_data_meber): Declare it.
  285. (finish_pseudo_destructor_call_expr): Rename to ...
  286. (finish_pseudo_destructor_expr): ... this.
  287. (finish_compound_literal): Declare it.
  288. (begin_inline_definitions): Remove it.
  289. (init_spew): Remove.
  290. (peekyylex): Likewise.
  291. (arbitrate_lookup): Likewise.
  292. (frob_opname): Likewise.
  293. (maybe_snarf_defarg): Likewise.
  294. (add_defarg_fn): Likewise.
  295. (do_pending_defargs): Likewise.
  296. (done_pending_defargs): Likewise.
  297. (unprocessed_defarg_fn): Likewise.
  298. (replace_defarg): Likewise.
  299. (end_input): Likewise.
  300. (get_overloaded_fn): Likewise.
  301. * cvt.c (convert_to_reference): Improve error handling.
  302. * decl.c (lookup_name_real): Do not declare it static.
  303. (maybe_push_to_top_level): Set check_access.
  304. (identifier_type_value): Adjust call to lookup_name_real.
  305. (lookup_qualified_name): New method.
  306. (lookup_name_real): Remove special-case parsing code.
  307. (lookup_name-nonclass): Adjust call to lookup_name_real.
  308. (lookup_name_namespace_only): Likewise.
  309. (lookup_name): Likewise.
  310. (check_tag_decl): Return the type declared.
  311. (shadow_tag): Likewise.
  312. (register_dtor_fn): Tweak check_access.
  313. (grokfndecl): Use constructor_name_p.
  314. (get_scope_of_declarator): New function.
  315. (grokdeclarator): Obscure tweaks for slightly different declarator
  316. representations.
  317. (start_method): Return error_mark_node to indicate failure.
  318. (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
  319. * decl2.c (constructor_name_full): Simplify.
  320. (constructor_name): Use it.
  321. (build_expr_from_tree): Adjust for changes to do new parser.
  322. (push_scope): Improve robustness.
  323. (validate_nonmember_using_decl): Process declarations, not names.
  324. (do_class_using_decl): Likewise.
  325. (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
  326. here.
  327. * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
  328. * expr.c (cxx_expand_expr): Handle BASELINKs.
  329. * init.c (member_init_ok_or_else): Issue more errors.
  330. (build_offset_ref): Tweak handling of FUNCTION_DECLs.
  331. * lex.c: Do not include parse.h.
  332. (yypring): Do not declare.
  333. (yylval): Likewise.
  334. (make_reference_declarator): Remove error-generating code.
  335. (rid_to_yy): Remove.
  336. (cxx_init): Do not call init_spew.
  337. (yypring): Remove.
  338. (check_for_missing_semicolon): Remove.
  339. * lex.h (got_scope): Remove.
  340. (got_object): Remove.
  341. * method.c (hack_identifier): Use finish_non_static_data_member.
  342. (implicitly_declare_fn): Adjust use of constructor_name.
  343. * parser.c: New file.
  344. * pt.c (parse.h): Do not include it.
  345. (maybe_get_template_decl_from_template): Do not declare it.
  346. (finish_member_template_decl): Tweak.
  347. (begin_explicit_instantiation): Adjust for
  348. processing_explicit_instantiation being boolean.
  349. (end_explicit_instantiation): Likewise.
  350. (maybe_process_partial_specialization): Tighten specialization
  351. test.
  352. (retrieve_local_specialization): Adjust ue of hash table.
  353. (eq_local_specializations): New function.
  354. (register_local_specialization): Likewise.
  355. (push_template_decl_real): Remove unnecessary test.
  356. (maybe_get_template_decl_from_type_decl): Don't make it static.
  357. (for_each_template_parm_r): Handle TYPEOF_TYPE.
  358. (tsubst_copy): Use retrieive_local_specialization to handle
  359. PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
  360. Handle COMPONENT_REFs with pseudo-destructor-expressions.
  361. Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
  362. (tsubst_expr): Pass decls, not names, to do_local_using_decl.
  363. (unify): Tweak handling of CONST_DECLs.
  364. (regenerate_decl_from_template): Use push_nested_class.
  365. (template_for_substitution): New funciton.
  366. (instantiate_decl): Use it. Register parameters as local
  367. specializations.
  368. * rtti.c (init_rtti_processing): Set type_info_ref_type.
  369. (build_typeid): Use it.
  370. (get_typeid): Likeise.
  371. * search.c (accessible_p): Use check_access, not
  372. flag_access_control.
  373. (adjust_result_of_qualified_name_lookup): Pay attention to the
  374. context_class.
  375. * semantics.c (finish_asm_stmt): Adjust error handling.
  376. (finish_label_stmt): Return the statement.
  377. (finish_non_static_data_member): New function.
  378. (finish_class_expr): Handle BASELINKs.
  379. (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
  380. (finish_object_call_expr): Simplify handling during templates.
  381. (finish_pseudo_destructor_call_expr): Rename to ...
  382. (finish_pseudo_dtor_expr): ... this.
  383. (finish_compound_literal): New function.
  384. (begin_inline_definitions): Remove.
  385. (finish_sizeof): Remove special template handling.
  386. * spew.c: Do not include parse.h.
  387. * tree.c (get_overloaded_fn): Remove.
  388. * typeck.c (build_class_member_access_expr): Handle
  389. PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
  390. (lookup_destructor): New function.
  391. (finish_class_member_access_expr): Use it.
  392. (convert_arguments): Simplify.
  393. (build_unary_op): Handle BASELINKs.
  394. 2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
  395. PR c++/4803
  396. * decl2.c (mark_used): Defer inline functions.
  397. (finish_file): Merge deferred_fns loops. Check all used
  398. inline functions have a definition.
  399. * method.c (make_thunk): Thunks are not inline.
  400. PR c++/5116, c++/764
  401. * call.c (build_new_op): Make sure template class operands are
  402. instantiated.
  403. 2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
  404. PR C++/7964
  405. * cp-tree.h (resolve_scoped_fn_name): Prototype.
  406. * call.c (resolve_scoped_fn_name): New function. Deal with
  407. more template expansion. Broken out of ...
  408. * parse.y (parse_finish_call_expr): ... here. Call it.
  409. * decl2.c (build_expr_from_tree, CALL_EXPR): Use
  410. resolve_scoped_fn_name and build_call_from_tree.
  411. PR c++/9053
  412. * decl.c (duplicate_decls): Templates may be disambiguated by
  413. return type.
  414. PR c++/8702
  415. * decl2.c (check_classfn): Use lookup_fnfield_1. List all
  416. conversion operators on failure.
  417. 2002-12-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
  418. Remove traditional C constructs 2/n.
  419. * call.c (tourney, build_field_call, equal_functions, joust,
  420. compare_ics, build_over_call, build_java_interface_fn_ref,
  421. convert_like_real, op_error, build_object_call, resolve_args,
  422. build_vfield_ref, check_dtor_name, build_scoped_method_call,
  423. build_addr_func, build_call, build_method_call, null_ptr_cst_p,
  424. sufficient_parms_p, build_conv, non_reference, strip_top_quals,
  425. standard_conversion, reference_related_p,
  426. reference_compatible_p, convert_class_to_reference,
  427. direct_reference_binding, reference_binding,
  428. ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
  429. add_template_conv_candidate, any_viable, any_strictly_viable,
  430. build_this, splice_viable, print_z_candidates,
  431. build_user_type_conversion, build_new_function_call,
  432. conditional_conversion, build_conditional_expr, build_new_op,
  433. build_op_delete_call, enforce_access, call_builtin_trap,
  434. convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
  435. convert_default_arg, type_passed_as, convert_for_arg_passing,
  436. in_charge_arg_for_name, is_properly_derived_from,
  437. maybe_handle_implicit_object, maybe_handle_ref_bind,
  438. source_type, add_warning, can_convert, can_convert_arg,
  439. perform_implicit_conversion, can_convert_arg_bad,
  440. initialize_reference, add_conv_candidate,
  441. add_template_candidate_real, add_template_candidate): Ansify.
  442. 2002-12-22 Nathan Sidwell <nathan@codesourcery.com>
  443. PR c++/8572
  444. * cp-tree.h (grokoptypename): Add SCOPE parameter.
  445. * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
  446. if in a template scope.
  447. * parse.y (unoperator): Return the scope.
  448. (operator_name): Adjust grokoptypename call.
  449. 2002-12-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  450. * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
  451. * decl.c (make_unbound_class_template): Adjust. Check for tf_error.
  452. * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
  453. 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
  454. * ChangeLog: Fix a typo.
  455. * class.c: Fix comment typos.
  456. * cp-tree.h: Likewise.
  457. 2002-12-18 Jason Merrill <jason@redhat.com>
  458. Handle anonymous unions at the tree level.
  459. C++ ABI change: Mangle anonymous unions using the name of their
  460. first named field (by depth-first search). Should not cause
  461. binary compatibility problems, though, as the compiler previously
  462. didn't emit anything for affected unions.
  463. * cp-tree.def (ALIAS_DECL): New tree code.
  464. * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the
  465. first field, not the largest.
  466. (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME,
  467. push the decl, and write it out at namespace scope.
  468. * decl.c (lookup_name_real): See through an ALIAS_DECL.
  469. (pushdecl): Add namespace bindings for ALIAS_DECLs.
  470. * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
  471. of a decl which doesn't have one.
  472. * typeck.c (build_class_member_access_expr): Don't recurse if
  473. we already have the type we want.
  474. 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  475. PR c++/8099
  476. * friend.c (make_friend_class): Allow partial specialization
  477. when declaration is not a template friend.
  478. 2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  479. PR c++/3663
  480. * pt.c (lookup_template_class): Copy TREE_PRIVATE and
  481. TREE_PROTECTED to created decl nodes.
  482. 2002-12-18 Mark Mitchell <mark@codesourcery.com>
  483. * class.c (build_base_field): Do not set DECL_PACKED on the
  484. FIELD_DECL.
  485. 2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
  486. * cp-tree.h (struct tree_srcloc): Use location_t.
  487. (SOURCE_LOCUS): New.
  488. (SRCLOC_FILE, SRCLOC_LINE): Adjust.
  489. 2002-12-17 Jason Merrill <jason@redhat.com>
  490. * decl.c (finish_function): Also complain about no return in
  491. templates.
  492. * semantics.c (finish_return_stmt): Also call check_return_expr in
  493. templates.
  494. * typeck.c (check_return_expr): In a template, just remember that we
  495. saw a return.
  496. 2002-12-16 Jason Merrill <jason@redhat.com>
  497. * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
  498. of the CALL_EXPR.
  499. * semantics.c (do_pushlevel): Call pushlevel after adding the
  500. SCOPE_STMT.
  501. (do_poplevel): Call poplevel before adding the SCOPE_STMT.
  502. * parse.y (function_body): Go back to using compstmt.
  503. * decl.c (pushdecl): Skip another level to get to the parms level.
  504. * call.c (build_new_method_call): Use is_dummy_object to determine
  505. whether or not to evaluate the object parameter to a static member
  506. function.
  507. 2002-12-14 Jason Merrill <jason@redhat.com>
  508. * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
  509. return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
  510. * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
  511. don't bother with an AGGR_INIT_EXPR.
  512. (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
  513. just generate a new decl normally. Take return slot parm.
  514. * cp-tree.h: Adjust prototype.
  515. 2002-12-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
  516. PR C++/8031
  517. * cvt.c (convert_to_pointer_force): Don't try comparing against
  518. erronous type.
  519. 2002-12-13 Geoffrey Keating <geoffk@apple.com>
  520. * cp-tree.h: Have the multiple-include guards around
  521. the entire file.
  522. 2002-12-10 David Edelsohn <edelsohn@gnu.org>
  523. * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
  524. for SPEW_DEBUG.
  525. (snarf_method): Same.
  526. (snarf_defarg): Same.
  527. 2002-12-10 Mark Mitchell <mark@codesourcery.com>
  528. PR c++/8372
  529. * pt.c (tsubst_copy): Handle destructor names more correctly.
  530. 2002-12-10 Matt Austern <austern@apple.com>
  531. * cp-tree.h: get rid of needs_virtual_reinit bit.
  532. 2002-12-09 Mark Mitchell <mark@codesourcery.com>
  533. * NEWS: Document removal of in-class initialization extension for
  534. static data members of non-arithmetic, non-enumeration type.
  535. * decl.c (check_static_variable_definition): Do not allow that
  536. extension.
  537. * decl2.c (grokfield): Do not call digest_init when processing
  538. templates.
  539. 2002-12-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  540. * error.c (dump_expr): Fix format specifier warning.
  541. 2002-12-04 Geoffrey Keating <geoffk@apple.com>
  542. * class.c (finish_struct_1): Correct comment.
  543. * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
  544. 2002-12-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
  545. PR C++/8799
  546. * error.c (dump_expr): Don't ever try to dump a non-existent
  547. expression.
  548. 2002-12-03 Nathan Sidwell <nathan@codesourcery.com>
  549. Implement covariant returns.
  550. * cp-tree.h (IS_AGGR_TYPE_2): Remove.
  551. (struct lang_decl_flags): Add this_thunk_p flag.
  552. Rename vcall_offset to virtual_offset.
  553. (struct lang_decl): Rename delta to fixed_offset.
  554. (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
  555. (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
  556. (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
  557. (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
  558. (make_thunk): Add this_adjusting arg.
  559. (finish_thunk): Declare.
  560. (mangle_thunk): Add this_adjusting arg.
  561. * class.c (get_vcall_index): Use base function for lookup.
  562. (update_vtable_entry_for_fn): Generate covariant thunk.
  563. (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
  564. (build_vtbl_initializer): Use base function for lookup.
  565. Finish covariant thunk here. Adjust thunk generation.
  566. * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
  567. Adjust thunk dumping.
  568. * mangle.c (mangle_call_offset): New function.
  569. (mangle_thunk): Adjust for covariant thunks.
  570. * method.c (make_thunk): Adjust. Do not set name here.
  571. (finish_thunk): New function. Set name here.
  572. (use_thunk): Generate covariant thunks too.
  573. (thunk_adjust): New function.
  574. * search.c (covariant_return_p): Remove. Fold into ...
  575. (check_final_overrider): ... here. Simplify.
  576. * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
  577. 2002-12-03 Jason Merrill <jason@redhat.com>
  578. PR c++/8674
  579. * call.c (build_over_call): Check specifically for TARGET_EXPR
  580. when eliding.
  581. PR c++/8461, c++/8625
  582. * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
  583. (cp_convert_parm_for_inlining): Remove.
  584. * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
  585. Remove.
  586. * cp-tree.h (ADDR_IS_INVISIREF): Remove.
  587. * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
  588. * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
  589. an ambiguous conversion.
  590. 2002-12-03 Mark Mitchell <mark@codesourcery.com>
  591. PR c++/8688
  592. * decl.c (reshape_init): Handle erroneous initializers.
  593. 2002-12-02 Mark Mitchell <mark@codesourcery.com>
  594. PR c++/8720
  595. * spew.c (remove_last_token): Make sure that last_chunk is set
  596. correctly.
  597. PR c++/8615
  598. * error.c (dump_expr): Handle character constants with
  599. TREE_OVERFLOW set.
  600. 2002-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  601. DR 180
  602. * decl.c (grokdeclarator): Require class-key for all friend class.
  603. Output the correct type and context in the error message.
  604. 2002-12-01 Mark Mitchell <mark@codesourcery.com>
  605. PR c++/5919
  606. * pt.c (unify): Use variably_modified_type_p to test validity of
  607. template argument types.
  608. PR c++/8727
  609. * cp-tree.h (lang_type_class): Add typeinfo_var.
  610. (CLASSTYPE_TYPEINFO_VAR): New macro.
  611. * rtti.c (get_tinfo_decl): Use it.
  612. PR c++/8663
  613. * init.c (expand_member_init): Always get the main variant of a
  614. base class.
  615. 2002-12-01 Mark Mitchell <mark@codesourcery.com>
  616. PR c++/8332
  617. PR c++/8493
  618. * decl.c (cxx_init_decl_processing): Use size_type_node, not
  619. c_size_type_node.
  620. * decl2.c (coerce_new_type): Likewise.
  621. * except.c (do_allocate_exception): Likewise.
  622. 2002-11-30 Zack Weinberg <zack@codesourcery.com>
  623. * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
  624. dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
  625. lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
  626. repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
  627. typeck2.c: Include coretypes.h and tm.h.
  628. * Make-lang.in: Update dependencies.
  629. 2002-11-30 Mark Mitchell <mark@codesourcery.com>
  630. PR c++/8227
  631. * decl.c (layout_var_decl): Deal gracefully with erroneous types.
  632. (check_initializer): Validate the type of the initialized
  633. variable, even if the initializer is absent.
  634. * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
  635. PR c++/8214
  636. * typeck.c (convert_for_assignment): Do not use
  637. decl_constant_value on the operand.
  638. PR c++/8511
  639. * pt.c (instantiate_decl): Handle template friends defined outside
  640. of the class correctly.
  641. 2002-11-29 Joe Buck <jbuck@synopsys.com>
  642. * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
  643. anonymous structs.
  644. 2002-11-29 Mark Mitchell <mark@codesourcery.com>
  645. * class.c (walk_subobject_offsets): Recur on binfos as well as on
  646. types.
  647. (layout_nonempty_base_or_field): Pass it a binfo when processing a
  648. base class.
  649. (layout_empty_base): Likewise.
  650. (build_base_field): Likewise.
  651. 2002-11-27 Mark Mitchell <mark@codesourcery.com>
  652. * class.c (build_base_field): Make sure we get the canonical base
  653. when descending through primary bases.
  654. 2002-11-26 Geoffrey Keating <geoffk@apple.com>
  655. * decl.c (check_initializer): Don't error on initialisation of
  656. a scalar with a brace-enclosed expression.
  657. 2002-11-26 Nathan Sidwell <nathan@codesourcery.com>
  658. * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
  659. (template_parms_equal): Remove prototype.
  660. * typeck.c (buuld_indirect_ref): Reformat.
  661. 2002-11-25 Jason Merrill <jason@redhat.com>
  662. * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
  663. and a DO_STMT.
  664. 2002-11-25 Mark Mitchell <mark@codesourcery.com>
  665. * tree.c (cp_build_qualified_type_real): Correct handling of
  666. array types.
  667. * class.c (walk_subobject_offsets): Fix thinko.
  668. (build_base_field): Record offsets of empty bases in primary
  669. virtual bases.
  670. (layout_class_type): Record offsets of empty bases in fields.
  671. * search.c (is_subobject_of_p_1): Fix thinko.
  672. (lookup_field_queue_p): Likewise.
  673. 2002-11-24 Mark Mitchell <mark@codesourcery.com>
  674. * class.c (layout_class_type): Reuse tail padding when laying out
  675. virtual bases.
  676. 2002-11-22 Mark Mitchell <mark@codesourcery.com>
  677. * rtti.c (qualifier_flags): Fix thinko.
  678. 2002-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
  679. Remove traditional C constructs 1/n.
  680. * cp-tree.h (init_method, set_mangled_name_for_decl,
  681. build_opfncall, hack_identifier, make_thunk, use_thunk,
  682. synthesize_method, implicitly_declare_fn,
  683. skip_artificial_parms_for, optimize_function, calls_setjmp_p,
  684. maybe_clone_body): Remove use of PARAMS.
  685. * method.c (do_build_assign_ref, do_build_copy_constructor,
  686. synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
  687. Likewise.
  688. (synthesize_method): Use 'bool' type and constants instead of
  689. 'int'.
  690. (locate_copy): Likewise.
  691. (implicitly_declare_fn): Likewise.
  692. * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
  693. Remove old-style declaration.
  694. (maybe_clone_body): Use 'bool' type and constants.
  695. 2002-11-21 Glen Nakamura <glen@imodulo.com>
  696. PR c++/8342
  697. * typeck.c (get_member_function_from_ptrfunc): Make sure that a
  698. SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
  699. of the branches of a COND_EXPR.
  700. 2002-11-19 Mark Mitchell <mark@codesourcery.com>
  701. * pt.c (for_each_template_parm): Free allocated memory.
  702. * search.c (is_subobject_of_p_1): New function.
  703. (is_subobject_of_p): Avoid walking virtual bases multiple times.
  704. 2002-11-19 Jason Thorpe <thorpej@wasabisystems.com>
  705. * g++spec.c (lang_specific_spec_functions): New.
  706. 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
  707. * ChangeLog: Follow spelling conventions.
  708. * class.c: Likewise.
  709. * decl2.c: Likewise.
  710. 2002-11-14 Zack Weinberg <zack@codesourcery.com>
  711. * search.c (dfs_push_decls): Do not try to reorder elements
  712. 3..n of method_vec if method_vec has only two elements.
  713. Reverse order of two tests to avoid accessing unallocated
  714. memory.
  715. 2002-11-14 Mark Mitchell <mark@codesourcery.com>
  716. * class.c (dfs_find_final_overrider): Adjust so that the most
  717. derived object is a binfo, rather than a class type.
  718. (find_final_overrider): Likewise.
  719. (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
  720. (add_vcall_offset): Likewise.
  721. 2002-11-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  722. PR c++/8389
  723. * pt.c (instantiate_template): Push class scope for member
  724. functions.
  725. (get_mostly_instantiated_function_type): Likewise. Don't call
  726. tsubst on context. Remove CONTEXTP and TPARMSP parameters.
  727. * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
  728. * mangle.c (write_encoding, write_unqualified_name): Adjust.
  729. 2002-11-07 Mark Mitchell <mark@codesourcery.com>
  730. * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
  731. vcall offfsets. Split out ...
  732. (add_vcall_offset): ... new function.
  733. PR c++/8338
  734. * pt.c (for_each_template_parm): Add htab parameter.
  735. (process_partial_specialization): Adjust call.
  736. (push_template_decl_real): Likewise.
  737. (pair_fn_data): Add visited.
  738. (for_each_template_parm_r): Avoid walking duplicates more than
  739. once.
  740. (uses_template_parms): Adjust call to for_each_template_parm.
  741. 2002-11-07 Mark Mitchell <mark@codesourcery.com>
  742. * class.c (add_implicitly_declared_members): Put implicitly
  743. declared functions at the end of TYPE_METHODs when -fabi-version
  744. is at least 2.
  745. 2002-11-05 Geoffrey Keating <geoffk@apple.com>
  746. * decl2.c (finish_file): Correct spelling.
  747. 2002-11-03 Mark Mitchell <mark@codesourcery.com>
  748. * call.c (build_special_member_call): Do not try to lookup VTTs by
  749. name.
  750. * class.c (vtbl_init_data): Add generate_vcall_entries.
  751. (get_vtable_decl): Do not look up virtual tables by name.
  752. (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
  753. (set_primary_base): Do not set CLASSTYPE_RTTI.
  754. (determine_primary_base): Likewise.
  755. (get_matching_virtual): Remove.
  756. (get_vcall_index): New function.
  757. (update_vtable_entry_for_fn): Do not try to use virtual thunks
  758. when they are not required. Assign vcall indices at this point.
  759. (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
  760. Do update dynamic_classes.
  761. (build_vtt): Do not add VTTs to the symbol table.
  762. (build_ctor_vtbl_group): Likewise.
  763. (build_vtbl_initializer): Simplify handling of vcall indices.
  764. (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
  765. for the most derived class.
  766. (add_vcall_offset_vtbl_entries_1): But do not actually add them to
  767. the vtable.
  768. * cp-tree.h (dynamic_classes): New macro.
  769. (lang_type_class): Remove rtti. Add vtables. Add vcall_indices.
  770. (CLASSTYPE_RTTI): Remove.
  771. (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
  772. (CLASSTYPE_VCALL_INDICES): New macro.
  773. (CLASSTYPE_VTABLES): Likewise.
  774. (BV_USE_VCALL_INDEX_P): Remove.
  775. (build_vtable_path): Remove.
  776. * decl2.c (finish_vtable_vardecl): Remove.
  777. (key_method): Remove #if 0'd code.
  778. (finish_vtable_vardecl): Rename to ...
  779. (maybe_emit_vtables): ... this.
  780. (finish_file): Use it.
  781. * search.c (look_for_overrides_here): Update comment.
  782. 2002-11-01 Zack Weinberg <zack@codesourcery.com>
  783. PR c/7353 redux
  784. * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
  785. 2002-10-30 Jason Merrill <jason@redhat.com>
  786. PR c++/8186
  787. * cp-tree.h (ADDR_IS_INVISIREF): New macro.
  788. * call.c (convert_for_arg_passing): Set it.
  789. * except.c (stabilize_throw_expr): Recurse for such an arg.
  790. 2002-10-31 Mark Mitchell <mark@codesourcery.com>
  791. * cp-tree.h (lang_decl_flags): Remove init_priority.
  792. (lang_decl): Add delta.
  793. (GLOBAL_INIT_PRIORITY): Remove.
  794. (THUNK_DELTA): Revise definition.
  795. * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
  796. * dump.c (cp_dump_tree): Don't dump it.
  797. 2002-10-30 Mark Mitchell <mark@codesourcery.com>
  798. PR c++/8160
  799. * typeck2.c (process_init_constructor): Call complete_array_type.
  800. PR c++/8149
  801. * decl.c (make_typename_type): Issue errors about invalid results.
  802. 2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  803. Core issue 287, PR c++/7639
  804. * cp-tree.h (lang_type_class): Add decl_list field.
  805. (CLASSTYPE_DECL_LIST): New macro.
  806. (maybe_add_class_template_decl_list): Add declaration.
  807. * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
  808. (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
  809. (maybe_add_class_template_decl_list): New function.
  810. (add_implicitly_declared_members): Use it.
  811. * decl.c (maybe_process_template_type_declaration): Likewise.
  812. (pushtag): Likewise.
  813. * friend.c (add_friend): Likewise.
  814. (make_friend_class): Likewise.
  815. * semantics.c (finish_member_declaration): Likewise.
  816. (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
  817. * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
  818. to process members and friends in the order of declaration.
  819. 2002-10-29 Mark Mitchell <mark@codesourcery.com>
  820. PR c++/8287
  821. * decl.c (finish_destructor_body): Create the label to jump to
  822. when returning from a destructor here.
  823. (finish_function_body): Rather than here.
  824. 2002-10-25 Zack Weinberg <zack@codesourcery.com>
  825. PR c++/7266
  826. * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
  827. SCOPE_REF is not null before dereferencing it.
  828. 2002-10-25 Mark Mitchell <mark@codesourcery.com>
  829. * call.c (build_over_call): Use DECL_CONTEXT, not
  830. DECL_VIRTUAL_CONTEXT.
  831. * class.c (modify_vtable_entry): Don't mess with
  832. DECL_VIRTUAL_CONTEXT.
  833. (set_vindex): Remove.
  834. (set_primary_base): Remove vfuns_p parameter.
  835. (determine_primary_base): Likewise.
  836. (modify_all_vtables): Likewise.
  837. (layout_class_type): Likewise. Adjust calls to other functions
  838. accordingly.
  839. (finish_struct_1): Adjust calls to modified functions. Set
  840. DECL_VINDEX here.
  841. * cp-tree.h (lang_type_class): Remove vsize.
  842. (CLASSTYPE_VSIZE): Remove.
  843. (lang_decl): Remove thunks.
  844. (DECL_THUNKS): Adjust.
  845. (DECL_VIRTUAL_CONTEXT): Remove.
  846. (duplicate_decls): Don't copy it.
  847. * pt.c (build_template_decl): Don't set it.
  848. (tsubst_decl): Likewise.
  849. * typeck.c (expand_ptrmemfunc_cst): Don't use it.
  850. * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
  851. (build_vtable_entry): Remove.
  852. * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
  853. (lang_decl): Add thunks.
  854. (DECL_THUNKS): New macro.
  855. * decl.c (duplicate_decls): Copy it.
  856. * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
  857. * semantics.c (emit_associated_thunks): Simplify.
  858. 2002-10-24 David Edelsohn <edelsohn@gnu.org>
  859. PR c++/7228
  860. * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
  861. lang_type structure exists before accessing field.
  862. (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
  863. (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
  864. (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
  865. * class.c (check_field_decls): Use new macros.
  866. * typeck2.c (process_init_constructor): Remove redundant check for
  867. existence of lang_type structure.
  868. 2002-10-24 Mark Mitchell <mark@codesourcery.com>
  869. * class.c (end_of_base): New method.
  870. (end_of_class): Use it. Check indirect virtual bases.
  871. * class.c (check_field_decls): Fix typo.
  872. 2002-10-23 Mark Mitchell <mark@codesourcery.com>
  873. PR c++/8067
  874. * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
  875. related variables.
  876. PR c++/7679
  877. * spew.c (next_token): Do not return an endless stream of
  878. END_OF_SAVED_INPUT tokens.
  879. (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
  880. the cached token stream.
  881. (snarf_defarg): Likewise.
  882. 2002-10-23 Zack Weinberg <zack@codesourcery.com>
  883. * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
  884. variably_modified_type_p.
  885. * cp-tree.h: Remove prototype of variably_modified_type_p.
  886. * tree.c (variably_modified_type_p): Remove; now implemented
  887. in language-independent code.
  888. 2002-10-22 Mark Mitchell <mark@codesourcery.com>
  889. PR c++/6579
  890. * spew.c (snarf_parenthesized_expression): New function.
  891. (snarf_block): Use it.
  892. 2002-10-22 Richard Henderson <rth@redhat.com>
  893. * method.c (use_thunk): Always compute vcall_value; assert that
  894. it is not zero. Use can_output_mi_thunk; use output_mi_thunk
  895. for vcall thunks as well.
  896. 2002-10-21 Mark Mitchell <mark@codesourcery.com>
  897. * class.c (empty_base_at_nonzero_offset_p): New function.
  898. (layout_nonempty_base_or_field): Do not check for conflicts when
  899. laying out a virtual base using the GCC 3.2 ABI.
  900. (build_base_field): Correct checking for presence of empty classes
  901. at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
  902. * class.c (include_empty_classes): Use normalize_rli.
  903. (layout_class_type): Likewise.
  904. * decl.c (reshape_init): Tweak handling of character arrays.
  905. PR c++/8218
  906. * cp-tree.h (lang_type_class): Add contains_empty_class_p.
  907. (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
  908. * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
  909. (check_field_decls): Likewise.
  910. (layout_class_type): Likewise.
  911. (finish_struct_1): Initialize it.
  912. (walk_subobject_offsets): Use it to prune searches.
  913. 2002-10-20 Mark Mitchell <mark@codesourcery.com>
  914. * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
  915. * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
  916. TARGET_ASM_OUTPUT_MI_THUNK in comments.
  917. 2002-10-18 Zack Weinberg <zack@codesourcery.com>
  918. * decl.c (start_decl): Point users of the old initialized-
  919. typedef extension at __typeof__.
  920. 2002-10-18 Mark Mitchell <mark@codesourcery.com>
  921. * Make-lang.in (method.o): Depend on TARGET_H.
  922. * method.c (target.h): Include it.
  923. (use_thunk): Use target hooks. Use vcall thunks, if available.
  924. 2002-10-18 Mark Mitchell <mark@codesourcery.com>
  925. * class.c (base_derived_from): Make sure return value is a bool.
  926. 2002-10-18 Mark Mitchell <mark@codesourcery.com>
  927. * class.c (find_final_overrider_data_s): Remove overriding_fn and
  928. overriding_base.
  929. (dfs_base_derived_from): New function.
  930. (base_derived_from): Likewise.
  931. (dfs_find_final_overrider): Use base_derived_from.
  932. (find_final_overrider): Adjust.
  933. 2002-10-18 Jason Merrill <jason@redhat.com>
  934. PR c++/8080
  935. * semantics.c (finish_for_cond, finish_while_cond): Don't mess
  936. with condition decls in a template.
  937. 2002-10-17 Nathan Sidwell <nathan@codesourcery.com>
  938. * class.c (add_method): Compare template parms too.
  939. 2002-10-17 Mark Mitchell <mark@codesourcery.com>
  940. PR c++/7584
  941. * class.c (handle_using_decl): Allow the declaration used to be
  942. from an ambiguous base.
  943. * pt.c (convert_template_argument): Revert this change:
  944. 2002-10-16 Mark Mitchell <mark@codesourcery.com>
  945. * pt.c (convert_template_argument): Do not fold non-type
  946. template rguments when inside a template.
  947. * init.c (expand_default_init): Handle brace-enclosed initializers
  948. correctly.
  949. 2002-10-16 Mark Mitchell <mark@codesourcery.com>
  950. * mangle.c (write_expression): Correct handling of enumeration
  951. constants.
  952. (write_template_arg): Likewise.
  953. * pt.c (convert_template_argument): Do not fold non-type template
  954. arguments when inside a template.
  955. PR c++/7478
  956. * cvt.c (convert_to_reference): Allow references as the incoming
  957. type.
  958. 2002-10-16 Mark Mitchell <mark@codesourcery.com>
  959. PR c++/7524
  960. * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
  961. build_qualified_type.
  962. 2002-10-15 Richard Henderson <rth@redhat.com>
  963. * error.c (dump_expr): Use real_to_decimal directly, and with
  964. the new arguments.
  965. 2002-10-15 Mark Mitchell <mark@codesourcery.com>
  966. * decl.c (reshape_init): Fix typo.
  967. * cp-tree.h (operator_name_info_t): Add arity.
  968. * lex.c (init_operators): Initialize it.
  969. * mangle.c (write_conversion_operator_name): New function.
  970. (write_unqualified_name): Use it.
  971. (write_template_args): Accept template arguments as a TREE_LIST.
  972. (write_expression): Adjust handling of qualified names to match
  973. specification.
  974. 2002-10-15 Jason Merrill <jason@redhat.com>
  975. * call.c (call_builtin_trap): New fn.
  976. (convert_arg_to_ellipsis): Use it. Downgrade error to warning.
  977. (build_call): Don't set current_function_returns_abnormally outside
  978. a function.
  979. 2002-10-14 Mark Mitchell <mark@codesourcery.com>
  980. * class.c (check_field_decls): Remove empty_p parameter. Instead,
  981. clear CLASSTYPE_EMPTY_P.
  982. (build_base_field): Likewise.
  983. (build_base_fields): Likewise.
  984. (check_bases_and_members): Likewise.
  985. (create_vtbl_ptr): Likewise.
  986. (layout_class_type): Likewise. Ensure that empty classes have
  987. size zero when used as base classes in the 3.2 ABI.
  988. (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
  989. CLASSTYPE_NEARLY_EMPTY_P. Adjust calls to avoid passing empty_p
  990. parameter.
  991. (is_empty_class): Correct definition when using post-3.2 ABI.
  992. * cp-tree.h (lang_type_class): Add empty_p.
  993. (CLASSTYPE_EMPTY_P): New macro.
  994. 2002-10-12 Nathan Sidwell <nathan@codesourcery.com>
  995. * init.c (build_delete): Do not apply save_expr for arrays.
  996. (build_vec_delete): Likewise.
  997. 2002-10-14 Mark Mitchell <mark@codesourcery.com>
  998. * decl.c (layout_var_decl): Call layout_decl even for variables
  999. whose type is an array with unspecified bounds.
  1000. PR c++/7176
  1001. * lex.c (do_identifier): Add another option for the parsing
  1002. parameter.
  1003. * parse.y (do_id): Use it.
  1004. 2002-10-11 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1005. PRs C++/6803, C++/7721 and C++/7803
  1006. * decl.c (grokdeclarator): Gracefully handle template-name as
  1007. decl-specifier.
  1008. 2002-10-11 Jason Molenda <jmolenda@apple.com>
  1009. * init.c (build_field_list): Provide uses_unions_p with a default
  1010. value.
  1011. 2002-10-11 Mark Mitchell <mark@codesourcery.com>
  1012. PR c++/5661
  1013. * cp-tree.h (variably_modified_type_p): New function.
  1014. (grokdeclarator) Tighten check for variably modified types as
  1015. fields.
  1016. * pt.c (convert_template_argument): Do not allow variably modified
  1017. types as template arguments.
  1018. * tree.c (variably_modified_type_p): New function.
  1019. * NEWS: Document removal of "new X = ..." extension.
  1020. * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
  1021. brace-enclosed initializers.
  1022. * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
  1023. (initialize_local_var): Remove declaration.
  1024. (expand_static_init): Likewise.
  1025. * decl.c (next_initializable_field): New function.
  1026. (reshape_init): Likewise.
  1027. (check_initializer): Use them. Build dynamic initializer for
  1028. aggregates here too.
  1029. (initialize_local_var): Simplify, and incorporate cleanup
  1030. insertion code as well.
  1031. (destroy_local_var): Remove.
  1032. (cp_finish_decl): Tidy.
  1033. (expand_static_init): Fold checks for whether or not a variable
  1034. needs initialization into this function. Simplify.
  1035. * decl2.c (do_static_initialization): Simplify.
  1036. * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
  1037. be done for us automatically.
  1038. (expand_default_init): Handle brace-enclosed initializers
  1039. correctly.
  1040. (expand_aggr_init_1): Remove RTL-generation code.
  1041. (build_vec_init): Remove "new X = ..." support.
  1042. * parse.y (new_initializer): Likewise.
  1043. * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
  1044. brace-enclosed initializer.
  1045. (create_pseudo_type_info): Likewise.
  1046. * typeck2.c (store_init_value): Don't try to handle digest_init
  1047. being called more than once.
  1048. (digest_init): Tidy handling of brace-enclosed initializers.
  1049. 2002-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1050. * decl.c (typename_hash): Use htab_hash_pointer.
  1051. 2002-10-10 Jim Wilson <wilson@redhat.com>
  1052. * decl.c (duplicate_decls): Don't call decl_attributes.
  1053. 2002-10-09 Zack Weinberg <zack@codesourcery.com>
  1054. PR c/7353
  1055. * decl.c (start_decl): Unconditionally issue error for
  1056. 'typedef foo = bar'.
  1057. (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
  1058. (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
  1059. 2002-10-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1060. * decl2.c (prune_vtable_vardecl): Delete unused function.
  1061. 2002-10-03 Mark Mitchell <mark@codesourcery.com>
  1062. PR c++/7754
  1063. * decl2.c (finish_anon_union): Do not expand anonymous unions when
  1064. procesing template functions.
  1065. * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
  1066. type. Call layout_decl.
  1067. (tsubst_expr, case DECL_STMT): Handle anonymous unions.
  1068. 2002-10-07 Richard Henderson <rth@redhat.com>
  1069. * decl2.c, pt.c: Revert c++/7754 fix.
  1070. 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1071. PR c++/7804
  1072. * error.c (dump_expr) [REAL_CST]: Output in decimal format.
  1073. 2002-10-03 Mark Mitchell <mark@codesourcery.com>
  1074. PR c++/7931
  1075. * pt.c (for_each_template_parm_r): Handle BASELINKs.
  1076. PR c++/7754
  1077. * decl2.c (finish_anon_union): Do not expand anonymous unions when
  1078. procesing template functions.
  1079. * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
  1080. type. Call layout_decl.
  1081. (tsubst_expr, case DECL_STMT): Handle anonymous unions.
  1082. 2002-10-03 Mark Mitchell <mark@codesourcery.com>
  1083. PR c++/8006
  1084. * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
  1085. template parameters.
  1086. (globals): Add entity and need_abi_warning.
  1087. (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
  1088. CLASSTYPE_TEMPLATE_INFO.
  1089. (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
  1090. TYPE_TI_TEMPLATE.
  1091. (write_prefix): Handle typename types correctly.
  1092. (write_template_prefix): Handle template template parameters
  1093. correctly.
  1094. (start_mangling): Add entity parameter.
  1095. (finish_mangling): Warn about names whose mangling will change.
  1096. (mangle_decl_string): Adjust.
  1097. (mangle_type_string): Likewise.
  1098. (mangle_special_for_type): Likewise.
  1099. (mangle_ctor_vtbl_for_type): Likewise.
  1100. (mangle_thunk): Likewise.
  1101. (mangle_guard_variable): Likewise.
  1102. (mangle_ref_init_variable): Likewise.
  1103. 2002-10-02 Mark Mitchell <mark@codesourcery.com>
  1104. PR c++/7188.
  1105. * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
  1106. * cp-tree.h (emit_base_init): Rename to ....
  1107. (emit_mem_initializers): ... this.
  1108. (expand_member_init): Change prototype.
  1109. * init.c (perform_member_init): Compute explicit, rather than
  1110. requiring it as a parameter.
  1111. (sort_member_init): Rename to ...
  1112. (sort_mem_initializers): ... this. Process bases and data members
  1113. together.
  1114. (sort_base_init): Remove.
  1115. (emit_base_init): Rename to ...
  1116. (emit_mem_initializers): ... this.
  1117. (expand_aggr_vbase_init_1): Remove.
  1118. (construct_virtual_bases): Rename to ...
  1119. (construct_virtual_base): ... this.
  1120. (expand_member_init): Rework handling of base initializers.
  1121. * method.c (do_build_copy_constructor): Use
  1122. finish_mem_initializers.
  1123. * parse.y (member_init): Adjust calls to expand_member_init.
  1124. * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
  1125. (tsubst_initializer_list): Use expand_member_init.
  1126. * semantics.c (finish_mem_intiailizers): Simplify.
  1127. 2002-10-02 Matt Austern <austern@apple.com>
  1128. * decl.c (walk_vtables_r): Fixed typo that caused result to
  1129. never get a nonzero value.
  1130. 2002-10-02 Roger Sayle <roger@eyesopen.com>
  1131. PR optimization/6627
  1132. * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
  1133. from here, and move it to tree.h.
  1134. * decl.c (cxx_init_decl_processing): If storing the vbit
  1135. in function pointers, ensure that force_align_functions_log
  1136. is atleast one.
  1137. 2002-10-02 Matt Austern <austern@apple.com>
  1138. * class.c (check_field_decls): Changed warning about const member
  1139. variables so that it doesn't get issued for a class aggregate.
  1140. 2002-10-01 Mark Mitchell <mark@codesourcery.com>
  1141. * decl.c (cp_finish_decl): Make sure array types are laid out,
  1142. even if the array bounds are unknown.
  1143. 2002-10-01 Steve Ellcey <sje@cup.hp.com>
  1144. * class.c (build_vtbl_initializer): Change build_c_cast
  1145. to build1.
  1146. 2002-10-01 Mark Mitchell <mark@codesourcery.com>
  1147. * decl.c (cp_finish_decl): Make sure array types are laid out,
  1148. even if the array bounds are unknown.
  1149. * decl.c (cp_finish_decl): Correct check for dynamic
  1150. initialization of thread-local storage.
  1151. 2002-09-30 Nathan Sidwell <nathan@codesourcery.com>
  1152. * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
  1153. overloaded.
  1154. 2002-09-30 Steve Ellcey <sje@cup.hp.com>
  1155. * class.c (build_vtbl_initializer): Add cast.
  1156. (add_vcall_offset_vtbl_entries_1):
  1157. Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
  1158. 2002-09-30 Mark Mitchell <mark@codesourcery.com>
  1159. * class.c (walk_subobject_offsets): Correct the calculation of
  1160. offsets for virtual bases. Correct the counting of array
  1161. elements.
  1162. (layout_nonempty_base_or_field): Simplify. Correct the
  1163. calculation of offsets to be propagated through the binfo
  1164. hierarchy.
  1165. (build_base_field): Avoid creating a FIELD_DECL for empty bases.
  1166. Add the FIELD_DECL to TYPE_FIELDS.
  1167. (build_base_fields): Adjust accordingly.
  1168. (layout_virtual_bases): Use build_base_field.
  1169. (end_of_class): Return a tree, not an integer.
  1170. (warn_about_ambiguous_direct_bases): Rename to ...
  1171. (warn_about_ambiguous_bases): ... this.
  1172. (include_empty_classes): New function.
  1173. (layout_class_type): Create an alternative version of the type to
  1174. be used when as a base class type. Do not call
  1175. finish_record_layout until we are done laying out the class.
  1176. * cp-tree.h (lang_type_class): Remove size, size_unit. Add
  1177. as_base.
  1178. (CLASSTYPE_SIZE): Reimplement.
  1179. (CLASSTYPE_SIZE_UNIT): Likewise.
  1180. (CLASSTYPE_ALIGN): Likweise.
  1181. (CLASSTYPE_USER_ALIGN): Likewise.
  1182. (CLASSTYPE_AS_BASE): New macro.
  1183. (DECL_INITIALIZED_P): Likewise.
  1184. (extract_init): Remove prototype.
  1185. (build_forced_zero_init): Rename to ...
  1186. (build_zero_init): ... this.
  1187. (force_store_init_value): Remove.
  1188. * decl.c (obscure_complex_init): Remove.
  1189. (duplicate_decls): Copy DECL_INITIALIZED_P.
  1190. (check_initializer): Do not leave junk in DECL_INITIAL.
  1191. (cp_finish_decl): Handle zero-initialization of entities with
  1192. static storage duration.
  1193. * expr.c (extract_init): Remove.
  1194. * init.c (build_forced_zero_init): Remove.
  1195. (build_zero_init): New function.
  1196. (build_default_init): Use it.
  1197. (build_field_list): Skip FIELD_DECLs for base subobjects.
  1198. (push_base_cleanups): Likewise.
  1199. * method.c (do_build_assign_ref): Likewise.
  1200. (synthesize_exception_spec): Likewise.
  1201. * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
  1202. (regenerate_decl_from_template): To not set DECL_INITIAL for a
  1203. static data member whose initialization took place in its class.
  1204. (instantiate_decl): Do not pass an initializer to cp_finish_decl
  1205. in that situation.
  1206. * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
  1207. (dfs_unuse_fields): Likewise.
  1208. * tree.c (pod_type_p): Handle error_mark_node.
  1209. (zero_init_p): Likewise.
  1210. * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
  1211. subobjects.
  1212. * typeck2.c (store_init_value): Remove #if 0'd code.
  1213. (force_store_init_value): Remove.
  1214. (process_init_constructor): Use build_zero_init.
  1215. 2002-09-29 Nathan Sidwell <nathan@codesourcery.com>
  1216. PR c++/7788
  1217. * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
  1218. 2002-09-29 Kazu Hirata <kazu@cs.umass.edu>
  1219. * cp-tree.h: Fix comment typos.
  1220. * decl.c: Likewise.
  1221. * pt.c: Likewise.
  1222. 2002-09-25 Mark Mitchell <mark@codesourcery.com>
  1223. * cp/class.c (contains_empty_class_p): New method.
  1224. (walk_subobject_offsets): Correct computation of field offset.
  1225. (layout_empty_base): Correct placement of emtpy base classes.
  1226. (layout_class_type): Warn about ABI changes.
  1227. 2002-09-23 Mark Mitchell <mark@codesourcery.com>
  1228. * cp/class.c (layout_virtual_bases): Do not round the size of the
  1229. type to a multiple of the alignment before laying out virtual bases.
  1230. (layout_class_type): Correct handling of bit-fields that are wider
  1231. than their type inside unions. Round the size of the type to a
  1232. even number of bytes when computing the size without virtual
  1233. bases.
  1234. * cp/cp-tree.h (abi_version_at_least): New macro.
  1235. 2002-09-21 Kazu Hirata <kazu@cs.umass.edu>
  1236. * ChangeLog: Follow spelling conventions.
  1237. * ChangeLog.2: Likewise.
  1238. * call.c: Likewise.
  1239. * class.c: Likewise.
  1240. * cp-tree.h: Likewise.
  1241. * cvt.c: Likewise.
  1242. * decl.c: Likewise.
  1243. * decl2.c: Likewise.
  1244. * except.c: Likewise.
  1245. * friend.c: Likewise.
  1246. * g++spec.c: Likewise.
  1247. * init.c: Likewise.
  1248. * lex.c: Likewise.
  1249. * mangle.c: Likewise.
  1250. * method.c: Likewise.
  1251. * operators.def: Likewise.
  1252. * optimize.c: Likewise.
  1253. * pt.c: Likewise.
  1254. * rtti.c: Likewise.
  1255. * search.c: Likewise.
  1256. * semantics.c: Likewise.
  1257. * spew.c: Likewise.
  1258. * tree.c: Likewise.
  1259. * typeck.c: Likewise.
  1260. 2002-09-18 Devang Patel <dpatel@apple.com>
  1261. * cp/cp-tree.h: New prototype for walk_vtabls().
  1262. * cp/decl.c (walk_vtables_r): New function.
  1263. (struct cp_binding_level): Add new members, namespaces,
  1264. names_size and vtables.
  1265. (add_decl_to_level): Add decl in namespaces or vtables
  1266. chain, if conditions match.
  1267. (walk_vtables): New function.
  1268. (walk_namespaces_r): Travers separate namespace chain
  1269. for namespace decls.
  1270. (wrapup_globals_for_namespace): Use names_size instead
  1271. of list_length().
  1272. * cp/decl2.c (finish_file): Use walk_vtables() instead of
  1273. walk_globals() to walk vtable decls.
  1274. 2002-09-18 Nathan Sidwell <nathan@codesourcery.com>
  1275. * decl.c (grokdeclarator): Use assert, not internal_error. Don't
  1276. ICE with invalid pointers & references.
  1277. 2002-09-17 Zack Weinberg <zack@codesourcery.com>
  1278. * Make-lang.in: Remove all references to the demangler.
  1279. * cxxfilt.c: Moved to binutils.
  1280. 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
  1281. PR c++/7718
  1282. * pt.c (tsubst_decl): Remove assert.
  1283. Remove DR 295 implementation.
  1284. * pt.c (check_cv_quals_for_unify): Disable function & method cases.
  1285. * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
  1286. about ignoring volatile qualifiers.
  1287. * search.c (lookup_member): Correct documentation.
  1288. 2002-09-16 Geoffrey Keating <geoffk@apple.com>
  1289. * cp-tree.h (union lang_tree_node): Add chain_next option.
  1290. 2002-09-16 Nathan Sidwell <nathan@codesourcery.com>
  1291. * parse.y (parse_finish_call_expr): Check lookup_member result.
  1292. PR c++/7015
  1293. * semantic.c (finish_asm_stmt): Fix operand/output_operands
  1294. thinko.
  1295. * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
  1296. 2002-09-15 Nathan Sidwell <nathan@codesourcery.com>
  1297. PR c++/7919
  1298. * call.c (build_over_call): Convert this pointer for fns found by
  1299. using decls.
  1300. 2002-09-15 Kazu Hirata <kazu@cs.umass.edu>
  1301. * ChangeLog: Follow spelling conventions.
  1302. * ChangeLog.1: Likewise.
  1303. 2002-09-14 Nathan Sidwell <nathan@codesourcery.com>
  1304. PR c++/7768
  1305. * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
  1306. 2002-09-14 Kazu Hirata <kazu@cs.umass.edu>
  1307. * error.c: Fix comment formatting.
  1308. * except.c: Likewise.
  1309. * expr.c: Likewise.
  1310. * friend.c: Likewise.
  1311. * g++spec.c: Likewise.
  1312. * init.c: Likewise.
  1313. * lex.c: Likewise.
  1314. * mangle.c: Likewise.
  1315. * method.c: Likewise.
  1316. * optimize.c: Likewise.
  1317. * pt.c: Likewise.
  1318. * rtti.c: Likewise.
  1319. * search.c: Likewise.
  1320. * semantics.c: Likewise.
  1321. * spew.c: Likewise.
  1322. * tree.c: Likewise.
  1323. * typeck.c: Likewise.
  1324. * typeck2.c: Likewise.
  1325. 2002-09-13 Matt Austern <austern@apple.com>
  1326. PR C++/7828
  1327. * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
  1328. * cp/call.c: Change call-by-const-reference mechanism to use
  1329. non_cast_lvalue_p when deciding whether the create a temporary.
  1330. We need a temporary when passing, e.g. (long) x by const ref.
  1331. 2002-09-13 Nathan Sidwell <nathan@codesourcery.com>
  1332. * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
  1333. 2002-09-13 Kazu Hirata <kazu@cs.umass.edu>
  1334. * decl.c: Fix comment formatting.
  1335. * decl2.c: Likewise.
  1336. 2002-09-12 Kazu Hirata <kazu@cs.umass.edu>
  1337. * call.c: Fix comment formatting.
  1338. * class.c: Likewise.
  1339. * cp-lang.c: Likewise.
  1340. * cp-tree.h: Likewise.
  1341. * cvt.c: Likewise.
  1342. 2002-09-11 Zack Weinberg <zack@codesourcery.com>
  1343. * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
  1344. and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
  1345. * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
  1346. minor adjustments (use version_string, eliminate yet another
  1347. duplicate of xmalloc)
  1348. 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1349. * cp-tree.h (require_complete_eh_spec_types): Add prototype.
  1350. 2002-09-05 Jason Merrill <jason@redhat.com>
  1351. * typeck2.c (add_exception_specifier): Only pedwarn for an
  1352. incomplete type.
  1353. (require_complete_eh_spec_types): New fn.
  1354. (cxx_incomplete_type_diagnostic): Also support pedwarning.
  1355. * typeck.c (complete_type_or_diagnostic): Likewise.
  1356. * call.c (build_call): Call require_complete_eh_spec_types.
  1357. * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
  1358. on an incomplete type.
  1359. 2002-09-04 Jakub Jelinek <jakub@redhat.com>
  1360. * decl.c (start_cleanup_fn): Clear interface_only before
  1361. start_function, restore it afterwards.
  1362. 2002-09-02 Nathan Sidwell <nathan@codesourcery.com>
  1363. * cp-tree.h (finish_builtin_type): Remove.
  1364. * decl2.c (finish_builtin_type): Move to common code.
  1365. * decl.c (build_ptrmemfunc_type): Adjust.
  1366. * rtti.c (create_pseudo_type_info): Adjust.
  1367. (create_tinfo_types): Adjust.
  1368. 2002-08-31 Jason Merrill <jason@redhat.com>
  1369. * cp-lang.c (cp_expr_size): Allow initialization from a
  1370. CONSTRUCTOR.
  1371. 2002-08-30 Richard Henderson <rth@redhat.com>
  1372. PR opt/7515
  1373. * tree.c: Include target.h.
  1374. (cp_cannot_inline_tree_fn): Don't auto-inline functions that
  1375. don't bind locally.
  1376. * Makefile.in (tree.o): Update.
  1377. 2002-08-27 Mark Mitchell <mark@codesourcery.com>
  1378. * class.c (layout_virtual_bases): Warn about bugs in G++ that
  1379. result in incorrect object layouts.
  1380. (layout_class_type): Likewise.
  1381. 2002-08-24 Matt Austern <austern@apple.com>
  1382. * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
  1383. are allowable.
  1384. (real_lvalue_p): Update caller.
  1385. (lvalue_p): Ditto.
  1386. (non_cast_lvalue_or_else): New.
  1387. * tree.h: Declare it.
  1388. * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
  1389. 2002-08-22 Mark Mitchell <mark@codesourcery.com>
  1390. * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
  1391. and COND_EXPR specially; fix error message output.
  1392. 2002-08-22 Jason Merrill <jason@redhat.com>
  1393. * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
  1394. * semantics.c (nullify_returns_r): Likewise.
  1395. 2002-08-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1396. Fix PR/7621
  1397. * typeck.c (finish_class_member_access_expr): Diagnose cases where
  1398. name lookup finds nothing.
  1399. 2002-08-15 Jason Merrill <jason@redhat.com>
  1400. * semantics.c (finish_then_clause): Remove redundant assignment.
  1401. (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
  1402. extra binding level outside the if/switch statement.
  1403. (finish_while_cond, finish_for_cond): Rewrite complex condition
  1404. into the loop body.
  1405. 2002-08-15 Alexandre Oliva <aoliva@redhat.com>
  1406. * parse.y (sizeof, alignof, typeof): New non-terminals to
  1407. increment skip_evaluation. Replace terminals with them and
  1408. decrement skip_evaluation at the end of rules using them.
  1409. * decl2.c (mark_used): Don't assemble_external if
  1410. skipping evaluation.
  1411. 2002-08-15 Gabriel Dos Reis <gdr@nerim.net>
  1412. Fix PR/7504
  1413. * parse.y (parse_finish_call_expr): Handle incomplete
  1414. type used to name a scope.
  1415. 2002-08-15 Nathan Sidwell <nathan@codesourcery.com>
  1416. PR c++/7598
  1417. * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
  1418. regression caused by my 2002-08-08 patch.
  1419. 2002-08-13 Mark Mitchell <mark@codesourcery.com>
  1420. * decl.c (pushdecl_class_level): Honor requests to bind names to
  1421. OVERLOADs.
  1422. 2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1423. * decl2.c (build_call_from_tree): Fix uninitialized variable.
  1424. * parse.y (parse_finish_call_expr): Likewise.
  1425. * repo.c (old_args, old_dir, old_main): Const-ify.
  1426. 2002-08-11 Gabriel Dos Reis <gdr@nerim.net>
  1427. * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
  1428. DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
  1429. * optimize.c (maybe_clone_body): Likewise.
  1430. * pt.c (tsubst_enum): Likewise.
  1431. (lookup_template_class): Likewise.
  1432. * tree.c (cp_copy_res_decl_for_inlining): Likewise.
  1433. 2002-08-10 Neil Booth <neil@daikokuya.co.uk>
  1434. * lang-specs.h: Remove -ansi.
  1435. 2002-08-10 Nathan Sidwell <nathan@codesourcery.com>
  1436. * tree.c (maybe_dummy_object): Replace // with /* */
  1437. 2002-08-09 Mark Mitchell <mark@codesourcery.com>
  1438. * call.c (standard_conversion): Use build_ptrmem_type.
  1439. * cp-tree.h (build_ptrmem_type): New function.
  1440. (adjust_result_of_qualified_name_lookup): Likewise.
  1441. * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
  1442. static data members.
  1443. (build_ptrmem_type): New function.
  1444. (grokdeclarator): Do not use build_offset_type when encountering a
  1445. qualified name.
  1446. * parse.y (parse_finish_call_expr): Use
  1447. adjust_result_of_qualified_name_lookup.
  1448. * search.c (adjust_result_of_qualified_name_lookup): New function.
  1449. * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
  1450. accessing OFFSET_TYPEs directly.
  1451. 2002-08-08 Mike Stump <mrs@apple.com>
  1452. * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
  1453. (type_decays_to): Likewise.
  1454. * class.c (find_final_overrider): Likewise.
  1455. (maybe_note_name_used_in_class): Likewise.
  1456. * decl.c (current_tmpl_spec_kind): Likewise.
  1457. (add_binding): Likewise.
  1458. (push_class_binding): Likewise.
  1459. (duplicate_decls): Likewise.
  1460. (layout_var_decl): Likewise.
  1461. (grokfndecl): Likewise.
  1462. (grokdeclarator): Likewise.
  1463. (check_default_argument): Likewise.
  1464. * decl2.c (handle_class_head): Likewise.
  1465. * error.c (dump_template_decl): Likewise.
  1466. * init.c (build_offset_ref): Likewise.
  1467. * pt.c (check_specialization_scope): Likewise.
  1468. (determine_specialization): Likewise.
  1469. (check_explicit_specialization): Likewise.
  1470. (maybe_check_template_type): Likewise.
  1471. (process_partial_specialization): Likewise.
  1472. (check_default_tmpl_args): Likewise.
  1473. (push_template_decl_real): Likewise.
  1474. (convert_template_argument): Likewise.
  1475. (try_class_unification): Likewise.
  1476. (get_bindings_real): Likewise.
  1477. (do_decl_instantiation): Likewise.
  1478. * semantics.c (begin_function_definition): Likewise.
  1479. (finish_member_declaration): Likewise.
  1480. (check_multiple_declarators): Likewise.
  1481. * typeck.c (comp_array_types): Likewise.
  1482. (comptypes): Likewise.
  1483. (expr_sizeof): Likewise.
  1484. (build_binary_op): Likewise.
  1485. (dubious_conversion_warnings): Likewise.
  1486. (check_return_expr): Likewise.
  1487. 2002-08-08 Mark Mitchell <mark@codesourcery.com>
  1488. * typeck.c (build_class_member_access_expr): Do not return
  1489. error_mark_node when no error has occurred.
  1490. 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
  1491. * typeck.c (build_component_addr): Remove.
  1492. (build_unary_op): Just check it's not a bitfield, and then build
  1493. an ADDR_EXPR.
  1494. 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
  1495. * class.c (convert_to_base): Correct check for error_mark_node.
  1496. (create_vtable_ptr): Remove unused VFUNS_P parm.
  1497. 2002-08-08 Nathan Sidwell <nathan@codesourcery.com>
  1498. * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
  1499. 2002-08-07 Mark Mitchell <mark@codesourcery.com>
  1500. Rework build_component_ref.
  1501. * call.c (build_vfield_ref): Do not go through build_component_ref.
  1502. (build_field_call): Use build_class_member_access_expr.
  1503. (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
  1504. (build_object_call): Likewise.
  1505. * class.c (convert_to_base): New function.
  1506. (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
  1507. (instantiate_type): Handle BASELINKs.
  1508. * cp-tree.def (BASELINK): New tree code.
  1509. * cp-tree.h (BASELINK_P): Reimplement.
  1510. (SET_BASELINK_P): Remove.
  1511. (BASELINK_BINFO): Reimplement.
  1512. (BASELINK_FUNCTIONS): Likewise.
  1513. (BASELINK_ACCESS_BINFO): Likewise.
  1514. (BASELINK_OPTYPE): Likewise.
  1515. (convert_to_base): New function.
  1516. (name_p): Likewise.
  1517. (build_object_ref): Remove.
  1518. (build_component_ref_1): Likewise.
  1519. (build_component_ref): Likewise.
  1520. (build_x_component_ref): Likewise.
  1521. (build_class_member_access_expr): New function.
  1522. (finish_class_member_access_expr): Likewise.
  1523. (build_ptrmemfunc_access_expr): Likewise.
  1524. * decl.c (grokdeclarator): Handle BASELINKs.
  1525. * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
  1526. finish_class_member_access_expr.
  1527. (arg_assoc): Handle BASELINKs.
  1528. (do_class_using_decl): Likewise.
  1529. * error.c (dump_decl): Likewise.
  1530. (dump_expr): Use build_ptrmemfunc_access_expr.
  1531. * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
  1532. destructors.
  1533. (build_throw): Use BASELINK_FUNCTIONS.
  1534. * init.c (perform_member_init): Use
  1535. build_class_member_access_expr.
  1536. (build_offset_ref): Handle BASELINKs. Use
  1537. build_class_member_access_expr.
  1538. * method.c (hack_identifier): Likewise.
  1539. * parse.y (do_id): Use BASELINK, not TREE_LIST.
  1540. (primary): Remove uses of build_object_ref.
  1541. * pt.c (lookup_template_function): Handle BASELINKs.
  1542. (resolve_overloaded_unification): Likewise.
  1543. * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
  1544. (lookup_field): Use BASELINK, not TREE_LIST.
  1545. (lookup_fnfiels): Likewise.
  1546. (setup_class_bindings): Likewise.
  1547. * semantics.c (finish_object_call_expr): Do not use
  1548. build_method_call when we already know what function is being
  1549. called.
  1550. * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
  1551. * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
  1552. TREE_CHAIN.
  1553. (name_p): New function.
  1554. * typeck.c (build_object_ref): Remove.
  1555. (build_component_ref_1): Likewise.
  1556. (build_x_component_ref): Likewise.
  1557. (build_class_member_access_expr): New function.
  1558. (finish_class_member_access_expr): Likewise.
  1559. (build_ptrmemfunc_access_expr): Likewise.
  1560. (get_member_function_from_ptrfunc): Use
  1561. build_ptrmemfunc_access_expr.
  1562. (build_binary_op): Likewise.
  1563. (build_unary_op): Likewise.
  1564. (build_ptrmemfunc): Likewise.
  1565. (pfn_from_ptrmemfunc): Likewise.
  1566. * typeck2.c (build_m_component_ref): Adjust comment.
  1567. 2002-08-07 Neil Booth <neil@daikokuya.co.uk>
  1568. * Make-lang.in (CXX_C_OBJS): Update.
  1569. * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
  1570. * cp-tree.h (cxx_decode_option): Remove.
  1571. * decl2.c (compare_options, lang_f_options, unsupported_options,
  1572. cxx_decode_option): Remove.
  1573. 2002-08-06 Gabriel Dos Reis <gdr@nerim.net>
  1574. * typeck.c (build_x_unary_op): Handle pointer-to-member.
  1575. 2002-08-05 Geoffrey Keating <geoffk@redhat.com>
  1576. * class.c: Don't include obstack.h.
  1577. (popclass):
  1578. * decl2.c: Delete bogus comment.
  1579. * error.c: Don't include obstack.h.
  1580. * except.c: Likewise.
  1581. (dump_type): Correct comment.
  1582. * method.c: Don't include obstack.h.
  1583. * tree.c: Likewise.
  1584. 2002-08-04 Gabriel Dos Reis <gdr@nerim.net>
  1585. Fix PR/2213
  1586. * cvt.c (cp_convert_to_pointer): Reject conversions from integral
  1587. expressions to pointer-to-data-member of pointer-to-member-functions.
  1588. 2002-08-04 Geoffrey Keating <geoffk@redhat.com>
  1589. * cvt.c (ocp_convert): Delete obsolete code.
  1590. * parse.y (permanent_obstack): Delete declaration.
  1591. * pt.c (permanent_obstack): Delete declaration.
  1592. * repo.c (permanent_obstack): Delete declaration.
  1593. (open_repo_file): Use xmalloc instead of permanent_obstack.
  1594. (init_repo): Use xstrdup instead of permanent_obstack.
  1595. 2002-08-04 Nathan Sidwell <nathan@codesourcery.com>
  1596. * cp-tree.h (VF_DERIVED_VALUE): Remove.
  1597. * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
  1598. 2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
  1599. PR 7470.
  1600. C++ ABI change - vfunc ordering.
  1601. * class.c (add_virtual_function): Remove.
  1602. (dfs_modify_all_vtables): Take list of all declared
  1603. virtuals. Assign all that are not in primary base.
  1604. (check_for_override): Adjust comments.
  1605. (create_vtable_ptr): Take single list of virtuals. Build chain
  1606. of declared virtuals here.
  1607. (layout_class_type): Take single list of virtuals. Adjust.
  1608. (finish_struct_1): Keep virtuals on single list. Adjust.
  1609. 2002-08-02 Mark Mitchell <mark@codesourcery.com>
  1610. * init.c (build_member_call): Use build_new_method_call, not
  1611. build_method_call.
  1612. 2002-08-02 Krister Walfridsson <cato@df.lth.se>
  1613. * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
  1614. 2002-08-02 Mark Mitchell <mark@codesourcery.com>
  1615. * call.c (build_method_call): Issue a more helpful error message
  1616. about ambiguous method names.
  1617. 2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
  1618. * tree.c (build_shared_int_cst): Make cache file scope, and
  1619. GTY it.
  1620. 2002-08-02 Jason Merrill <jason@redhat.com>
  1621. * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
  1622. (cp_expr_size): New fn.
  1623. * call.c (build_over_call): Lose empty class hackery.
  1624. (convert_arg_to_ellipsis): Promote non-POD warning to error.
  1625. * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
  1626. * semantics.c (expand_body): Do tree optimization in the function
  1627. context, too.
  1628. 2002-08-01 Neil Booth <neil@daikokuya.co.uk>
  1629. * cp-tree.h: Move all warning and flag declarations to c-common.h.
  1630. * decl.c: Move all warning and flag variables to c-common.c.
  1631. * decl2.c: Move all warning and flag variables to c-common.c.
  1632. * lex.c (flag_digraphs): Remove.
  1633. (warn_traditional): Now in c-common.c.
  1634. 2002-07-31 Mark Mitchell <mark@codesourcery.com>
  1635. * call.c (build_field_call): Do not look up the field by name.
  1636. (build_method_call): Simplify.
  1637. (struct z_candidate): Add access_path and conversion_path. Remove
  1638. basetype_path.
  1639. (convert_class_to_reference): Adjust use of
  1640. add_function_candidate.
  1641. (add_candidate): Add conversion_path argument.
  1642. (add_function_candidate): Use it.
  1643. (add_conv_dndidate): Likewise.
  1644. (build_builtin_candidate): Likewise.
  1645. (add_template_candidate_real): Add conversion_path argument.
  1646. (add_template_conv_candidate): Likewise.
  1647. (add_template_candidate): Likewise.
  1648. (build_user_type_conversion_1): Use it.
  1649. (build_new_function_call): Remove name lookup code. Adjust use of
  1650. add_template_candidate and add_function_candidate.
  1651. (build_new_op): Likewise.
  1652. (convert_like_real): Use build_special_member_call.
  1653. (build_over_call): Use cand->conversion_path.
  1654. (build_special_member_call): New method.
  1655. (build_new_method_call): Remove name lookup code.
  1656. * cp-tree.def (OFFSET_REF): Update documentation.
  1657. (TEMPLATE_ID_EXPR): Likewise.
  1658. * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
  1659. (BASELINK_OPTYPE): Likewise.
  1660. (build_new_method_call): Adjust prototype.
  1661. (build_special_member_call): New method.
  1662. (build_baselink): New method.
  1663. (build_offset_ref_call_from_tree): Likewise.
  1664. (build_call_from_tree): Likewise.
  1665. (finish_qualified_call_expr): Remove.
  1666. (finish_call_expr): Adjust prototype.
  1667. (build_x_function_call): Remove.
  1668. * cvt.c (ocp_convert): Use build_special_member_call.
  1669. * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
  1670. (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
  1671. CALL_EXPR.
  1672. (build_offset_ref_call_from_tree): New function.
  1673. (build_call_from_tree): Likewise.
  1674. * init.c (expand_cleanup): Use build_special_member_call.
  1675. (expand_default_init): Likewise.
  1676. (build_member_call): Use finish_call_expr.
  1677. (build_new_1): Use build_special_member_call.
  1678. (push_base_cleanups): Likewise.
  1679. * method.c (do_build_assign_ref): Likewise.
  1680. * parse.y (template_id): Do not pass a COMPONENT_REF to
  1681. lookup_template_function.
  1682. (primary): Use parse_finish_call_epxr, not finish_call_expr.
  1683. (parse_finish_call_expr): New function.
  1684. * pt.c (lookup_template_function): Add assertions.
  1685. * search.c (lookup_base): Allow T to be a binfo.
  1686. (build_baselink): New function.
  1687. (lookup_member): Use it.
  1688. * semantics.c (finish_call_expr): Do not do name lookup.
  1689. (finish_object_call_expr): Remove #if 0'd code.
  1690. (finish_qualified_call_expr): Remove.
  1691. * typeck.c (build_x_function_call): Remove.
  1692. (build_static_case): Use build_special_member_call.
  1693. * typeck2.c (build_functional_cast): Likewise.
  1694. 2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
  1695. * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
  1696. 2002-07-30 Gabriel Dos Reis <gdr@nerim.net>
  1697. * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
  1698. 2002-07-30 Nathan Sidwell <nathan@codesourcery.com>
  1699. * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
  1700. documentation.
  1701. 2002-07-29 Alan Modra <amodra@bigpond.net.au>
  1702. * cp-tree.h: Comment typo fix.
  1703. 2002-07-29 Richard Earnshaw <rearnsha@arm.com>
  1704. * spew.c (space_for_token): Allocate zeroed memory for a new token
  1705. chunk.
  1706. 2002-07-27 Roger Sayle <roger@eyesopen.com>
  1707. * decl.c (builtin_function_1): No need to explicitly mark
  1708. BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
  1709. 2002-07-27 Roger Sayle <roger@eyesopen.com>
  1710. * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
  1711. 2002-07-26 Jason Merrill <jason@redhat.com>
  1712. * call.c (build_over_call): Likewise.
  1713. (cp_convert_parm_for_inlining): New fn.
  1714. (convert_for_arg_passing): New fn.
  1715. (convert_default_arg, build_over_call): Use it.
  1716. (type_passed_as): New fn.
  1717. * pt.c (tsubst_decl): Use it.
  1718. * decl2.c (cp_build_parm_decl): New fn.
  1719. (build_artificial_parm): Use it.
  1720. (start_static_storage_duration_function): Likewise.
  1721. * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
  1722. (grokparms): Don't mess with DECL_ARG_TYPE.
  1723. * typeck.c (convert_arguments): Use convert_for_arg_passing.
  1724. * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
  1725. Define.
  1726. * cp-tree.h: Declare new fns.
  1727. 2002-07-26 Neil Booth <neil@daikokuya.co.uk>
  1728. * cp-tree.h (flag_operator_names): Remove.
  1729. * decl2.c (flag_operator_names): Remove.
  1730. (lang_f_options): Remove operator-names.
  1731. * lex.c (D_OPNAME): Remove.
  1732. (reswords): Remove operator names.
  1733. (rid_to_yy): Remove operator names.
  1734. (init_reswords): No need to handle D_OPNAME.
  1735. * spew.c (read_process_identifier): There are no operator
  1736. names.
  1737. 2002-07-26 Jason Merrill <jason@redhat.com>
  1738. * dump.c (cp_dump_tree): Call c_dump_tree.
  1739. * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
  1740. 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
  1741. * error.c (print_whitespace): Remove.
  1742. * g++spec.c (LIBUNWIND): Move.
  1743. * mangle.c (mangled_position, write_signed_number): Remove.
  1744. 2002-07-25 Neil Booth <neil@daikokuya.co.uk>
  1745. * decl2.c (cxx_decode_option): Similarly.
  1746. 2002-07-25 Gabriel Dos Reis <gdr@nerim.net>
  1747. * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
  1748. (cxx_sizeof_or_alignof_type): Take a third argument.
  1749. (cxx_sizeof): Adjust definition.
  1750. (cxx_alignof): Likewise.
  1751. * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
  1752. * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
  1753. complaining.
  1754. (c_sizeof_nowarn): Remove definition.
  1755. (build_unary_op): Use cxx_sizeof_nowarn.
  1756. 2002-07-24 Geoffrey Keating <geoffk@redhat.com>
  1757. * tree.c (cp_build_qualified_type_real): When copying
  1758. pointer-to-method types, unshare the record that holds
  1759. the cached pointer-to-member-function type.
  1760. 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
  1761. * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
  1762. 2002-07-23 Gabriel Dos Reis <gdr@nerim.net>
  1763. Fix PR/7363:
  1764. * typeck.c (cxx_sizeof_or_alignof_type): New function.
  1765. (c_sizeof): Remove definition.
  1766. (expr_sizeof): Use cxx_sizeof.
  1767. * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
  1768. * decl.c (finish_destructor_body): Use cxx_sizeof.
  1769. * semantics.c (finish_alignof): Likewise.
  1770. (finish_alignof): Use cxx_alignof.
  1771. * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
  1772. (cxx_sizeof_or_alignof_type): Declare.
  1773. (my_friendly_assert): Move to ../c-common.h.
  1774. 2002-07-23 Neil Booth <neil@daikokuya.co.uk>
  1775. * class.c, method.c, pt.c, search.c: Don't define obstack macros.
  1776. 2002-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1777. PR c++/7347, c++/7348
  1778. * cp-tree.h (tsubst_flags_t): Add tf_parsing.
  1779. * decl.c (make_typename_type): Use it.
  1780. (make_unbound_class_template): Likewise.
  1781. (lookup_name_real): Don't call type_access_control if scope is
  1782. template parameter dependent.
  1783. * parse.y (template_arg): Call make_unbound_class_template with
  1784. tf_parsing set.
  1785. (nest_name_specifier): Call make_typename_type with tf_parsing set.
  1786. (typename_sub0): Likewise.
  1787. (typename_sub1): Likewise.
  1788. (instantiate_decl): Push class scope.
  1789. * pt.c (regenerate_decl_from_template): Call pushclass and popclass
  1790. for both static variable and member function template.
  1791. (instantiate_decl) Call pushclass and popclass when tsubst'ing type
  1792. and arguments.
  1793. * search.c (type_access_control): Do type access for TEMPLATE_DECL
  1794. too.
  1795. 2002-07-20 Roger Sayle <roger@eyesopen.com>
  1796. * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
  1797. test by using positive_option. Make whitespace consistent.
  1798. 2002-07-20 Gabriel Dos Reis <gdr@nerim.net>
  1799. * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
  1800. members with 'locus'. Adjust use throughout.
  1801. (struct feed): Likewise.
  1802. (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
  1803. Adjust use.
  1804. (snarf_defarg): Use error(), not error_with_file_and_line().
  1805. 2002-07-19 Chris Demetriou <cgd@broadcom.com>
  1806. * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
  1807. cpp_options is included.
  1808. 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1809. PR c++/2862, c++/2863
  1810. * pt.c (determine_specialization): Compare the length of
  1811. TYPE_ARG_TYPES. Tidy.
  1812. 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1813. PR c++/3797
  1814. * decl.c (duplicate_decls): Don't propagate inlining parameters from
  1815. olddecl to newdecl when newdecl is a specialization of the
  1816. instantiation olddecl.
  1817. 2002-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1818. PR c++/4802, c++/5387
  1819. * decl.c (make_typename_type): Use enforce_access.
  1820. 2002-07-17 Scott Snyder <snyder@fnal.gov>
  1821. PR c++/7320
  1822. * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
  1823. 2002-07-12 Mark Mitchell <mark@codesourcery.com>
  1824. * class.c (add_method): Correct handling of conversion operators.
  1825. 2002-07-11 Mark Mitchell <mark@codesourcery.com>
  1826. PR c++/7224
  1827. * class.c (add_method): Simplify.
  1828. 2002-07-11 Jason Merrill <jason@redhat.com>
  1829. PR c++/7279
  1830. * tree.c (cp_copy_res_decl_for_inlining): Also copy
  1831. TREE_ADDRESSABLE.
  1832. 2002-07-10 Graham Stott <graham.stott@btinternet.com>
  1833. * pt.c (template_parm_this_level_p, push_template_decl_real):
  1834. Pass depth as int pointer.
  1835. 2002-07-11 Tim Josling <tej@melbpc.org.au>
  1836. Remove front end hard coding from gengtype.c.
  1837. * config-lang.in (gtfiles): Add files needed for this front end.
  1838. 2002-07-10 Mark Mitchell <mark@codesourcery.com>
  1839. * cp-tree.h (unqualified_name_lookup_error): Declare it.
  1840. (begin_function_definition): Adjust prototype.
  1841. * lex.c (unqualified_name_lookup_error): New function, split out
  1842. from ...
  1843. (do_identifier): ... here.
  1844. * parse.y (parse_begin_function_definition): New function.
  1845. (fn.def1): Use it.
  1846. * semantics.c (begin_function_definition): Accept decl-specifiers
  1847. and attributes as separate parameters.
  1848. 2002-07-10 Jason Merrill <jason@redhat.com>
  1849. PR c++/6255
  1850. * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
  1851. modifying the old one.
  1852. 2002-07-09 Mark Mitchell <mark@codesourcery.com>
  1853. * cp-tree.h (constructor_name_p): Declare it.
  1854. (check_template_template_default_arg): Likewise.
  1855. * class.c (handle_using_decl): Use constructor_name_p.
  1856. * decl.c (grokdeclarator): Likewise.
  1857. * decl2.c (constructor_name_p): Define it.
  1858. * init.c (build_member_call): Use constructor_name_p.
  1859. * parse.y (template_parm): Use check_template_template_default_arg.
  1860. * pt.c (check_explicit_specialization): Use constructor_name_p.
  1861. * semantics.c (check_template_template_default_arg): New function.
  1862. 2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1863. * pt.c (can_complete_type_without_circularity): Add static to
  1864. function definition.
  1865. 2002-07-08 Mark Mitchell <mark@codesourcery.com>
  1866. * cp-tree.h (have_extern_spec): Declare it
  1867. * decl.c (have_extern_spec): Define it.
  1868. (start_decl): Eliminate use of used_extern_spec.
  1869. (start_function): Likewise.
  1870. * parse.y (have_extern_spec): Remove declaration.
  1871. (used_extern_spec): Likewise.
  1872. (frob_specs): Eliminate use of used_extern_spec.
  1873. (.hush_warning): Likewise.
  1874. 2002-07-07 Mark Mitchell <mark@codesourcery.com>
  1875. * Make-lang.in (cp/parse.o): Depend on decl.h.
  1876. * cp-tree.h (do_decl_instantiation): Change prototype.
  1877. * parse.y: Include decl.h.
  1878. (parse_decl_instantiation): New function.
  1879. (explicit_instantiation): Use it.
  1880. * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
  1881. and DECLSPECS.
  1882. 2002-07-07 Roger Sayle <roger@eyesopen.com>
  1883. * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
  1884. constructor and destructor tests when passed a TEMPLATE_DECL.
  1885. 2002-07-05 Jason Merrill <jason@redhat.com>
  1886. * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
  1887. pointers.
  1888. PR optimization/7145
  1889. * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
  1890. 2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
  1891. Repair damage on weak-impared targets caused by my previous patch.
  1892. * cp-tree.h (import_export_tinfo): Add parameter.
  1893. * decl2.c (import_export_tinfo): Add parameter, post adjust
  1894. DECL_COMDAT.
  1895. * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
  1896. import_export_tinfo.
  1897. 2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1898. PR c++/6944
  1899. * init.c (build_aggr_init): Remove qualifiers of init before calling
  1900. build_vec_init.
  1901. (build_vec_init): Flatten multi-dimensional array during cleanup.
  1902. (build_vec_delete_1): Abort if the type of each element is array.
  1903. 2002-07-03 Graham Stott <graham.stott@btinternet.com>
  1904. * pt.c (instantiate_class_template): Fix typo.
  1905. 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1906. * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
  1907. by CVS conflict in my last patch.
  1908. 2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1909. PR c++/6716
  1910. * pt.c (can_complete_type_without_circularity): New function.
  1911. (instantiate_class_template): Use it.
  1912. * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
  1913. message due to incomplete fields.
  1914. 2002-07-01 Mark Mitchell <mark@codesourcery.com>
  1915. PR c++/7112
  1916. * mangle.c (write_expression): Add mangling for sizeof when
  1917. applied to a type.
  1918. * operators.def: Remove stale comment.
  1919. 2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
  1920. * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
  1921. (CPTI_TYPE_INFO_PTR_TYPE): ... this.
  1922. (tinfo_decl_type): Replace with ...
  1923. (type_info_ptr_type): ... this.
  1924. (import_export_tinfo): Declare.
  1925. (tinfo_decl_p): Rename to ...
  1926. (unemitted_tinfo_decl_p): ... this.
  1927. * decl2.c (import_export_decl): Break out tinfo handling into ...
  1928. (import_export_tinfo): ... here. New function.
  1929. (finish_file): Adjust.
  1930. * rtti.c (TINFO_REAL_NAME): New macro.
  1931. (init_rtti_processing): Create the tinfo types.
  1932. (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
  1933. (get_tinfo_decl): Adjust.
  1934. (get_tinfo_ptr): New function.
  1935. (get_type_id): Use it.
  1936. (tinfo_base_init): Create vtable decl here, if it doesn't exist.
  1937. (ptr_initializer): Use get_tinfo_ptr.
  1938. (ptm_initializer): Likewise.
  1939. (synthesize_tinfo_var): Break into ...
  1940. (get_pseudo_ti_init): ... this. Just create the initializer.
  1941. (get_pseudo_ti_desc): .. and this.
  1942. (create_real_tinfo_var): Remove.
  1943. (create_pseudo_type_info): Don't create the vtable decl here.
  1944. (get_vmi_pseudo_type_info): Remove.
  1945. (create_tinfo_types): Adjust.
  1946. (tinfo_decl_p): Rename to ...
  1947. (unemitted_tinfo_decl_p): ... here. Adjust.
  1948. (emit_tinfo_decl): Adjust. Create the initializer.
  1949. 2002-06-27 Mark Mitchell <mark@codesourcery.com>
  1950. PR c++/6695
  1951. * pt.c (tsubst_friend_class): Substitute into the context of the
  1952. friend before using it.
  1953. 2002-06-26 Mark Mitchell <mark@codesourcery.com>
  1954. * cp-tree.h (xref_tag): Change prototype.
  1955. (handle_class_head): Likewise.
  1956. (build_x_component_ref): Likewise.
  1957. * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
  1958. (xref_tag): Take attributes as a separate parameter.
  1959. (xref_tag_from_type): Adjust call to xref_tag.
  1960. * decl2.c (build_expr_from_tree): Adjust call to
  1961. build_x_component_ref.
  1962. (handle_class_head): Take attributes as a separate parameter.
  1963. * parse.y (parse_xref_tag): New function.
  1964. (parse_handle_class_head): Likewise.
  1965. (primary): Use parse_xref_tag.
  1966. (class_head_decl): Use parse_handle_class_head.
  1967. (class_head_defn): Likewise.
  1968. * rtti.c (init_rtti_processing): Adjust call to xref_tag.
  1969. (build_dynamic_cast_1): Likewise.
  1970. (create_pseudo_type_info): Likewise.
  1971. (emit_support_tinfos): Likewise.
  1972. * typeck.c (build_object_ref): Adjust call to
  1973. build_x_component_ref.
  1974. (build_x_component_ref): Remove protect parameter.
  1975. 2002-06-25 Mark Mitchell <mark@codesourcery.com>
  1976. * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
  1977. * class.c (handle_using_decl): Likewise.
  1978. (instantiate_type): Likewise.
  1979. * cp-tree.h (BASELINK_FUNCTIONS): New macro.
  1980. (xref_basetypes): Change prototype.
  1981. (begin_mem_initializers): New function.
  1982. (get_overloaded_fn): Likewise.
  1983. * decl.c (xref_basetypes): Simplify.
  1984. * error.c (dump_expr): Use BASELINK_FUNCTIONS.
  1985. * init.c (build_offset_ref): Likewise.
  1986. * parse.y (base_init): Use begin_mem_initializers().
  1987. (structsp): Adjust call to xref_basetypes.
  1988. * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
  1989. (instantiate_class_template): Adjust call to xref_basetypes.
  1990. * semantics.c (begin_mem_initializers): New function.
  1991. * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
  1992. (really_overloaded_fn): Likewise.
  1993. (get_overloaded_fn): New function.'
  1994. (get_first_fn): USe BASELINK_FUNCTIONS.
  1995. 2002-06-24 Mark Mitchell <mark@codesourcery.com>
  1996. * cp-tree.h (SCALAR_TYPE_P): New macro.
  1997. (check_for_out_of_scope_variable): New function.
  1998. (at_class_scope_p): Likewise.
  1999. (finish_fname): Likewise.
  2000. * class.c (finish_struct): Use at_function_scope_p.
  2001. * decl.c (check_for_out_of_scope_variable): New function, split
  2002. out from do_identifier.
  2003. (finish_enum): Use at_function_scope_p.
  2004. * lex.c (do_identifier): Use check_for_out_of_scope_variable.
  2005. * parse.y (VAR_FUNC_NAME): Give it <ttype>. Use finish_fname.
  2006. (primary): Use at_function_scope_p.
  2007. * search.c (at_class_scope_p): New function.
  2008. * semantics.c (finish_fname): Likewise.
  2009. (check_multiple_declarators): Use at_function_scope_p.
  2010. 2002-06-23 Mark Mitchell <mark@codesourcery.com>
  2011. * parse.y (parse_scoped_id): New function.
  2012. (primary): Use it.
  2013. * cp-tree.h (do_scoped_id): Adjust declaration.
  2014. * lex.c (do_scoped_id): Remove call to yylex.
  2015. * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
  2016. * typeck2.c (add_exception_specifier): Use tree_cons, rather than
  2017. expanding it inline.
  2018. 2002-06-23 Matt Thomas <matt@3am-software.com>
  2019. * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
  2020. "#if VMS_TARGET".
  2021. 2002-06-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2022. * mangle.c (integer_type_codes): Const-ify.
  2023. 2002-06-20 Richard Henderson <rth@redhat.com>
  2024. PR c++/6747
  2025. * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
  2026. Call put_var_into_stack.
  2027. 2002-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2028. * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
  2029. array size calculation.
  2030. 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2031. PR c++/6892
  2032. * pt.c (tsubst_expr): Handle FILE_STMT.
  2033. 2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2034. PR c++/6723
  2035. * pt.c (lookup_template_class): Don't build complete argument of
  2036. BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
  2037. argument.
  2038. 2002-06-19 Akim Demaille <akim@epita.fr>
  2039. * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
  2040. decl.h's TYPENAME.
  2041. * spew.c, lex.c: Adjust.
  2042. * parse.y (explicit_instantiation): Add empty action to override
  2043. the default $$ = $1 where it introduces a type clash.
  2044. 2002-06-14 Jason Merrill <jason@redhat.com>
  2045. * semantics.c (begin_for_stmt): Push the 'for' scope before
  2046. adding the FOR_STMT.
  2047. C++ ABI changes.
  2048. * class.c (build_base_field): Set DECL_PACKED.
  2049. (layout_class_type): Don't use tail padding of PODs.
  2050. * mangle.c (write_unqualified_name): Fix template conversion op
  2051. mangling.
  2052. 2002-06-16 Richard Henderson <rth@redhat.com>
  2053. PR opt/6793
  2054. * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
  2055. after template instantiation.
  2056. 2002-06-16 Richard Henderson <rth@redhat.com>
  2057. * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
  2058. 2002-06-15 Gabriel Dos Reis <gdr@codesourcery.com>
  2059. * cp-tree.h (compiler_error): Remove declaration.
  2060. * lex.c (compiler_error): Remove definition.
  2061. 2002-06-14 Steve Ellcey <sje@cup.hp.com>
  2062. * g++spec.c (LIBUNWIND): New.
  2063. (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
  2064. 2002-06-13 Jessica Han <jessica@cup.hp.com>
  2065. * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
  2066. (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
  2067. (build_vbase_offset_vtbl_entries): Likewise.
  2068. * rtti.c (build_headof): Likewise.
  2069. (get_tinfo_decl_dynamic): Likewise.
  2070. (create_pseudo_type_info): Likewise.
  2071. 2002-06-12 Stan Shebs <shebs@apple.com>
  2072. * mpw-config.in: Remove file, no longer used.
  2073. * mpw-make.sed: Ditto.
  2074. 2002-06-07 Zack Weinberg <zack@codesourcery.com>
  2075. * decl2.c: Update call to cpp_handle_option.
  2076. 2002-06-07 H.J. Lu (hjl@gnu.org)
  2077. * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
  2078. 2002-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
  2079. * error.c (cp_error_at): Fix typo.
  2080. 2002-06-04 Gabriel Dos Reis <gdr@codesourcery.com>
  2081. * error.c (cp_diagnostic_starter): Adjust call.
  2082. (maybe_print_instantiation_context): Change prototype to take a
  2083. 'diagnostic_info *'.
  2084. (print_instantiation_full_context): Likewise.
  2085. (print_instantiation_partial_context): Likewise.
  2086. (cp_diagnostic_starter): Likewise.
  2087. (cp_diagnostic_finalizer): Likewise.
  2088. (cp_print_error_function): Likewise.
  2089. (cp_printer): Take a secondary parameter as a 'text_info *'.
  2090. Remove output_state savings. Adjust calls.
  2091. 2002-06-03 Geoffrey Keating <geoffk@redhat.com>
  2092. * pt.c (inline_parm_levels): Mark for GC.
  2093. * mangle.c (start_mangling): Allocate G.substitutions here...
  2094. (init_mangle): ... rather than here.
  2095. (finish_mangling): Clear the varray pointer when done with it.
  2096. * spew.c (yylexstring): Don't use VARRAY_FREE.
  2097. * search.c (bfs_walk): Don't use VARRAY_FREE.
  2098. * decl2.c (pending_statics): Use gengtype to mark.
  2099. (deferred_fns): Likewise.
  2100. (ssdf_decls): Likewise.
  2101. (init_decl2): Delete.
  2102. * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
  2103. (cxx_init_decl_processing): Don't call init_decl2.
  2104. (cxx_pop_function_context): Don't use VARRAY_FREE.
  2105. * cp-tree.h (struct saved_scope): No need for special marking
  2106. of varrays.
  2107. (struct language_function): Likewise.
  2108. (local_classes): Use gengtype to mark.
  2109. (init_decl2): Delete prototype.
  2110. * class.c (init_class_processing): Don't use
  2111. ggc_add_tree_varray_root.
  2112. (build_vtbl_initializer): Don't use VARRAY_FREE.
  2113. * decl.c (typename_compare): Don't use same_type_p.
  2114. * decl.c: Include hashtab.h instead of hash.h.
  2115. (typename_hash): Update to use htab_h.
  2116. (typename_compare): Likewise.
  2117. (typename_htab): Use gengtype to mark.
  2118. (build_typename_type): Update to use htab_h.
  2119. * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
  2120. * Make-lang.in (gt-cp-tree.h): New rule.
  2121. (cp/tree.o): Depend on gt-cp-tree.h.
  2122. * config-lang.in (gtfiles): Add cp/tree.c.
  2123. * tree.c: Include gt-cp-tree.h.
  2124. (list_hash_table): Use gengtype to mark.
  2125. (init_tree): Use gengtype to mark trees.
  2126. * Make-lang.in (cp/decl.o): Add debug.h dependency.
  2127. * call.c (struct z_candidate): Use gengtype.
  2128. (USER_CONV_CAND): Use WRAPPER_ZC.
  2129. (convert_class_to_reference): Use build_zc_wrapper.
  2130. (build_type_conversion_1): Likewise.
  2131. (build_over_call): Use WRAPPER_ZC.
  2132. (add_warning): Use build_zc_wrapper.
  2133. * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
  2134. * cp-tree.h (struct lang_identifier): Use gengtype.
  2135. (struct template_parm_index_s): Likewise.
  2136. (struct ptrmem_cst): Likewise.
  2137. (struct tree_binding): Likewise.
  2138. (struct tree_overload): Likewise.
  2139. (struct tree_srcloc): Likewise.
  2140. (struct tree_wrapper): Likewise. Also modify to have a pointer
  2141. to struct z_candidate rather than void.
  2142. (enum cp_tree_node_structure_enum): New.
  2143. (union lang_tree_node): New.
  2144. (cxx_mark_tree): Delete prototype.
  2145. (cp_tree_node_structure): New prototype.
  2146. (build_ptr_wrapper): Delete prototype.
  2147. (build_int_wrapper): Delete prototype.
  2148. (build_zc_wrapper): New prototype.
  2149. * decl.c: Include debug.h
  2150. (cxx_mark_tree): Delete.
  2151. (cp_tree_node_structure): New.
  2152. * tree.c (build_ptr_wrapper): Delete.
  2153. (build_int_wrapper): Delete.
  2154. (build_zc_wrapper): New.
  2155. * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
  2156. Correct typo. Patch from k_fukui@highway.ne.jp.
  2157. * semantics.c (current_stmt_tree): Update for change to
  2158. struct language_function.
  2159. (finish_mem_initializers): Likewise.
  2160. * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
  2161. * cp-tree.h (struct language_function): Rename from
  2162. cp_language_function. Change all uses.
  2163. (cp_function_chain): Don't need to cast.
  2164. * class.c (duplicate_tag_error): Reset discriminator.
  2165. (check_bases_and_members): Update for data structure changes.
  2166. * cp-tree.h (struct lang_id2): Use gengtype.
  2167. (flagged_type_tree): Likewise.
  2168. (SET_LANG_ID): Use GGC on struct lang_id2.
  2169. (struct cp_language_function): Use gengtype. Remove field
  2170. 'x_vcalls_possible_p'.
  2171. (current_vcalls_possible_p): Delete.
  2172. (struct lang_type_header): New.
  2173. (struct lang_type_class): Rename from struct lang_type. Include
  2174. struct lang_type_header.
  2175. (struct lang_type_ptrmem): New.
  2176. (struct lang_type): New.
  2177. (LANG_TYPE_CLASS_CHECK): New. Use it in all the appropriate macros.
  2178. (LANG_TYPE_PTRMEM_CHECK): New. Use it in all the appropriate macros.
  2179. (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
  2180. (struct lang_decl_flags): Use gengtype. Add discriminators.
  2181. (struct lang_decl): Use gengtype. Add and use discriminators.
  2182. Update the macros that reference moved fields.
  2183. (LANG_DECL_U2_CHECK): New function. Use it when appropriate.
  2184. (SET_DECL_THUNK_P): Set discriminator too.
  2185. (clear_inline_text_obstack): Delete prototype.
  2186. (finish_inline_definitions): Delete prototype.
  2187. (mark_pending_inlines): Delete prototype.
  2188. (lang_check_failed): New prototype.
  2189. * decl.c (struct named_label_use_list): Use gengtype.
  2190. (struct named_label_list): Likewise.
  2191. (mark_binding_level): Delete.
  2192. (mark_named_label_lists): Delete.
  2193. (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
  2194. (cxx_init_decl_processing): Use generated marker routine.
  2195. (begin_destructor_body): Delete dead set to
  2196. current_vcalls_possible_p.
  2197. (mark_lang_function): Delete.
  2198. (mark_cp_function_context): Delete.
  2199. (lang_mark_tree): Use generated marker routines.
  2200. * decl2.c (start_objects): Set discriminator when setting
  2201. GLOBAL_INIT_PRIORITY.
  2202. * lex.c (retrofit_lang_decl): Set discriminators.
  2203. (copy_lang_type): Update for changes to lang_type structure.
  2204. (cp_make_lang_type): Set discriminator.
  2205. * parse.y: Use gengtype on YYLVAL. Don't use dots in identifiers.
  2206. * search.c: Include ggc.h.
  2207. * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
  2208. (finish_inline_definitions): Delete.
  2209. * spew.c (struct token): Use gengtype.
  2210. (struct token_chunk): New.
  2211. (struct unparsed_text): Use gengtype. Store tokens in chunks.
  2212. (struct feed): Use gengtype.
  2213. (feed_obstack): Delete.
  2214. (feed): Mark as GC root.
  2215. (pending_inlines): Mark as GC root.
  2216. (pending_inlines_tail): Likewise.
  2217. (processing_these_inlines): Likewise.
  2218. (token_obstack): Make static.
  2219. (first_token): Likewise.
  2220. (init_spew): Don't initialize deleted things; use gengtype for roots.
  2221. (clear_inline_text_obstack): Delete.
  2222. (feed_input): Use GC for struct feed. Update for changes to
  2223. struct unparsed_text.
  2224. (mark_pending_inlines): Delete.
  2225. (next_token): Rename from add_token. Change all callers. Update
  2226. for changes to struct unparsed_text.
  2227. (space_for_token): New.
  2228. (remove_last_token): New.
  2229. (alloc_unparsed_text): New.
  2230. (snarf_block): Take an unparsed_text. Update for changes to struct
  2231. unparsed_text.
  2232. (snarf_method): Update for changes to struct unparsed_text.
  2233. (snarf_defarg): Update for changes to struct unparsed_text.
  2234. * tree.c (lang_check_failed): New.
  2235. * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
  2236. gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
  2237. (cp/spew.o): Add dependency on gt-<filename>.h.
  2238. (cp/decl2.o): Add dependency on gt-<filename>.h.
  2239. (cp/call.o): Add dependency on gt-<filename>.h.
  2240. (cp/pt.o): Add dependency on gt-<filename>.h.
  2241. (cp/repo.o): Add dependency on gt-<filename>.h.
  2242. (cp/parse.o): Add dependency on gt-<filename>.h.
  2243. * call.c: Use gengtype for roots.
  2244. * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
  2245. decl2.c parse.y pt.c repo.c spew.c.
  2246. * cp-tree.h: Use gengtype for roots.
  2247. (struct saved_scope): Use GGC, gengtype.
  2248. (cp_parse_init): Delete prototype.
  2249. (init_pt): Delete prototype.
  2250. * decl.c: Use gengtype for roots.
  2251. (mark_saved_scope): Delete.
  2252. (cxx_init_decl_processing): Don't call deleted initilisation
  2253. routines.
  2254. (signed_size_zero_node): Delete, unused.
  2255. * decl.h: Use gengtype for roots.
  2256. * decl2.c: Use gengtype for roots.
  2257. * lex.h: Use gengtype for roots.
  2258. * parse.y: Use gengtype for roots.
  2259. (cp_parse_init): Delete.
  2260. * pt.c: Use gengtype for roots.
  2261. (init_pt): Delete.
  2262. * repo.c: Use gengtype for roots.
  2263. * spew.c: Use gengtype for roots.
  2264. * Make-lang.in: Allow for filename changes. Add gtype-cp.h.
  2265. (cp/decl.o): Add dependency on gtype-cp.h.
  2266. * decl.c: Remove use of add_deletable_root, use GTY marker instead.
  2267. Include gtype-cp.h. Allow for filename changes.
  2268. * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
  2269. (cp/decl.o): Add cp/gt-decl.h dependency.
  2270. * config-lang.in (gtfiles): New.
  2271. * tree.h: Rename struct binding_level to struct cp_binding_level.
  2272. * decl.c: Rename struct binding_level to struct cp_binding_level.
  2273. Include cp/gt-decl.h.
  2274. (struct cp_binding_level): Use gengtype.
  2275. (make_binding_level): Use GGC on struct cp_binding_level.
  2276. (mark_binding_level): Use gt_ggc_m_cp_binding_level.
  2277. (cxx_init_decl_processing): Mark free_binding_level as
  2278. deletable.
  2279. * decl.c (mark_cp_function_context): Update calling sequence.
  2280. * decl.c (start_function): Don't free 'struct
  2281. cp_language_function'.
  2282. (pop_cp_function_context): Likewise.
  2283. (save_function_data): Allocate it using GC.
  2284. * semantics.c (genrtl_start_function): Don't free 'struct
  2285. cp_language_function'.
  2286. 2002-05-31 Matthew Woodcraft <mattheww@chiark.greenend.org.uk>
  2287. * lang-specs.h: Use cpp_debug_options.
  2288. 2002-05-28 Zack Weinberg <zack@codesourcery.com>
  2289. * mangle.c, tree.c: Include real.h.
  2290. * Make-lang.in: Update dependency lists.
  2291. 2002-05-25 Neil Booth <neil@daikokuya.demon.co.uk>
  2292. * lex.c: Don't include c-lex.h.
  2293. * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
  2294. 2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
  2295. * spew.c (yyungetc, snarf_block): Remove indent_level handling.
  2296. 2002-05-22 Richard Henderson <rth@redhat.com>
  2297. * decl.c (obscure_complex_init): Check for VAR_DECL
  2298. before using DECL_THREAD_LOCAL.
  2299. 2002-05-22 Richard Henderson <rth@redhat.com>
  2300. * decl.c (check_tag_decl): Handle RID_THREAD.
  2301. (obscure_complex_init): Reject run-time init of tls.
  2302. (grokvardecl, grokdeclarator): Handle RID_THREAD.
  2303. * lex.c (reswords): Add __thread.
  2304. (rid_to_yy): Map RID_THREAD to SCSPEC.
  2305. 2002-05-22 Neil Booth <neil@daikokuya.demon.co.uk>
  2306. * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
  2307. * cp-tree.h (cxx_post_options): Kill.
  2308. * cp-lex.c (cxx_post_options): Kill.
  2309. 2002-05-21 Richard Henderson <rth@redhat.com>
  2310. * lex.c (rid_to_yy): Add RID_THREAD.
  2311. 2002-05-21 Alexandre Oliva <aoliva@redhat.com>
  2312. * init.c (build_vec_init): Test for trivial copy-assignment when
  2313. copy-assigning arrays.
  2314. 2002-05-20 Andreas Jaeger <aj@suse.de>
  2315. * init.c (build_default_init): Remove unused variable.
  2316. 2002-05-20 Alexandre Oliva <aoliva@redhat.com>
  2317. * call.c (any_strictly_viable): New.
  2318. (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
  2319. 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2320. * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
  2321. 2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2322. PR c++/186, DR 259
  2323. * pt.c (do_decl_instantiation): Don't complain explicit
  2324. instantiation after explicit specialization.
  2325. (do_type_instantiation): Likewise.
  2326. 2002-05-19 Alexandre Oliva <aoliva@redhat.com>
  2327. * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
  2328. renamed from...
  2329. (complete_type_or_else): ... this. Redefined as macro.
  2330. (cxx_incomplete_type_diagnostic): Declare.
  2331. (cxx_incomplete_type_error): Define as macro.
  2332. * init.c (build_delete): Warn about incomplete types other than
  2333. void, and use the built-in operator delete for them.
  2334. * typeck.c (complete_type_or_diagnostic): Renamed from
  2335. complete_type_or_else. Added warn_only argument, passed to...
  2336. * typeck2.c (cxx_incomplete_type_diagnostic): ... this. Print
  2337. warnings or errors depending on new warn_only argument. Renamed
  2338. from...
  2339. (cxx_incomplete_type_error): ... this. New implementation in
  2340. terms of cxx_incomplete_type_diagnostic.
  2341. 2002-05-18 Jason Merrill <jason@redhat.com>
  2342. PR c++/6611
  2343. * decl2.c (import_export_decl): If we clear
  2344. DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
  2345. 2002-05-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2346. PR c++/6620
  2347. * pt.c (verify_class_unification): Don't check if PARM is template
  2348. parameter dependent. Simplify.
  2349. (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
  2350. parameter dependent expression.
  2351. 2002-05-14 Jason Merrill <jason@redhat.com>
  2352. * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
  2353. Do set DECL_COMDAT.
  2354. (synthesize_tinfo_var): Take the public decl.
  2355. (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
  2356. (emit_tinfo_decl): Adjust. Call import_export_decl.
  2357. * decl2.c (import_export_decl): Simplify tinfo decl handling.
  2358. 2002-05-14 Alexandre Oliva <aoliva@redhat.com>
  2359. * cp-tree.h (struct lang_type): Added non_zero_init.
  2360. (CLASSTYPE_NON_ZERO_INIT_P): New macro.
  2361. (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
  2362. * class.c (check_field_decls): Test non_zero_init.
  2363. * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
  2364. zero-to-NULL conversions.
  2365. * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
  2366. type that needs zero-initialization without zeros.
  2367. (check_initializer_decl): Compute zero-initializer for types
  2368. that require a non-trivial one.
  2369. * init.c (build_forced_zero_init): New function.
  2370. (build_default_init): Use it.
  2371. * tree.c (zero_init_p): New function.
  2372. * typeck2.c (force_store_init_value): New function.
  2373. (process_init_constructor): Create non-trivial zero-initializers
  2374. for array members and class fields.
  2375. 2002-05-14 Neil Booth <neil@daikokuya.demon.co.uk>
  2376. * lang-specs.h: Remove redundant -lang-c++.
  2377. 2002-05-13 Jason Merrill <jason@redhat.com>
  2378. * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
  2379. (fixed_type_or_null): See through reference vars.
  2380. (build_base_path): Vtable contents are constant.
  2381. * typeck.c (get_member_function_from_ptrfunc): Likewise.
  2382. 2002-05-12 Jason Merrill <jason@redhat.com>
  2383. * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
  2384. structs are safe.
  2385. 2002-05-09 Neil Booth <neil@daikokuya.demon.co.uk>
  2386. * cp-tree.h (flag_ansi): Remove.
  2387. * decl2.c (flag_ansi): Remove.
  2388. (cxx_decode_option): Set flag_iso and flag_undef.
  2389. 2002-05-09 Jason Merrill <jason@redhat.com>
  2390. * typeck.c (get_member_function_from_ptrfunc): Reorganize.
  2391. Use subtraction rather than a bitmask to get the index.
  2392. * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
  2393. * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
  2394. 2002-05-07 Neil Booth <neil@daikokuya.demon.co.uk>
  2395. * Make-lang.in (decl2.o): Update.
  2396. * cp-tree.h (warn_multichar): Remove.
  2397. * decl2.c: Include c-common.h.
  2398. (warn_multichar): Remove.
  2399. 2002-05-03 Jason Merrill <jason@redhat.com>
  2400. * tree.c (build_cplus_array_type): Only const and volatile get
  2401. special handling.
  2402. * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
  2403. 2002-04-30 Mark Mitchell <mark@codesourcery.com>
  2404. ABI change, returning simple classes from functions.
  2405. * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
  2406. TYPE_HAS_TRIVIAL_INIT_REF is false or
  2407. TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
  2408. 2002-04-30 Jason Merrill <jason@redhat.com>
  2409. PR debug/6436
  2410. * decl.c (grokdeclarator): Don't override TYPE_NAME of an
  2411. anonymous class with a typedef if there are attributes.
  2412. 2002-04-29 Paul Eggert <eggert@twinsun.com>
  2413. * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
  2414. 2002-04-29 Jakub Jelinek <jakub@redhat.com>
  2415. PR c++/6477
  2416. * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
  2417. non-NULL first.
  2418. 2002-04-29 Mark Mitchell <mark@codesourcery.com>
  2419. PR c++/6492
  2420. * pt.c (tsubst_friend_class): If the friend has an explicit scope,
  2421. enter that scope before name lookup.
  2422. PR c++/6486
  2423. * method.c (do_build_copy_constructor): Avoid building
  2424. cv-qualified reference types.
  2425. 2002-04-29 Nathan Sidwell <nathan@codesourcery.com>
  2426. PR c++/5719
  2427. * decl.c (grok_op_properties): Assignment ops don't have to return
  2428. by value. operator% should.
  2429. 2002-04-28 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
  2430. PR c/6343
  2431. * decl.c (duplicate_decls): Call merge_weak.
  2432. 2002-04-26 Richard Henderson <rth@redhat.com>
  2433. * parse.y (malloced_yyss, malloced_yyvs): New.
  2434. (yyoverflow): Re-add. Set them.
  2435. (free_parser_stacks): New.
  2436. 2002-04-26 Mark Mitchell <mark@codesourcery.com>
  2437. PR c++/6497
  2438. * method.c (do_build_assign_ref): Pass a derivation to
  2439. build_method_call when calling base class assignment operators.
  2440. 2002-04-26 Richard Henderson <rth@redhat.com>
  2441. * parse.y (yyoverflow): Revert.
  2442. 2002-04-26 Richard Henderson <rth@redhat.com>
  2443. PR c/3581
  2444. * parse.y (string): Remove. Update all uses to use STRING
  2445. instead, and not call combine_strings.
  2446. * rtti.c (tinfo_name): Use fix_string_type.
  2447. * semantics.c (finish_asm_stmt): Don't call combine_strings.
  2448. * spew.c (yylexstring): New.
  2449. (read_token): Use it.
  2450. 2002-04-25 Richard Henderson <rth@redhat.com>
  2451. PR c/2161
  2452. * parse.y (yyoverflow): New.
  2453. 2002-04-25 Jason Merrill <jason@redhat.com>
  2454. PR c++/5607
  2455. * search.c (check_final_overrider): No longer static.
  2456. * class.c (update_vtable_entry_for_fn): Call it.
  2457. * cp-tree.h: Adjust.
  2458. 2002-04-25 Neil Booth <neil@daikokuya.demon.co.uk>
  2459. * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
  2460. * cp-tree.h (cxx_set_yydebug): Die.
  2461. * lex.c (YYDEBUG): Get from c-lex.h.
  2462. (cxx_set_yydebug): Remove.
  2463. * parse.y: Include c-lex.h.
  2464. (YYDEBUG): Get from c-lex.h.
  2465. 2002-04-24 Mark Mitchell <mark@codesourcery.com>
  2466. PR c++/6438.
  2467. * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
  2468. void.
  2469. 2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
  2470. * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
  2471. LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
  2472. Redefine.
  2473. * cp-tree.h (cp_attribute_table): Rename.
  2474. * decl.c (lang_attribute_table): Remove declaration.
  2475. (cxx_init_decl_processing): Don't set it.
  2476. * tree.c (cp_attribute_table): Rename.
  2477. 2002-04-24 Jason Merrill <jason@redhat.com>
  2478. PR c++/6331
  2479. * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
  2480. * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
  2481. The pedwarn for array assignment is now unconditional.
  2482. * tree.c (build_cplus_array_type_1): Still process simple array types
  2483. normally in templates.
  2484. PR c++/6395
  2485. * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
  2486. stuff for comdats.
  2487. 2002-04-23 Jakub Jelinek <jakub@redhat.com>
  2488. * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
  2489. node with attributes.
  2490. 2002-2-23 David O'Brien <obrien@FreeBSD.org>
  2491. * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
  2492. Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
  2493. 2002-04-23 Mark Mitchell <mark@codesourcery.com>
  2494. PR c++/6256:
  2495. * pt.c (tsubst_friend_class): Handle templates with explicit
  2496. nested names.
  2497. PR c++/6331:
  2498. * typeck.c (merge_types): Remember the cv-qualification of pointer
  2499. types when merging them.
  2500. 2002-04-20 Neil Booth <neil@daikokuya.demon.co.uk>
  2501. * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
  2502. LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
  2503. * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
  2504. cxx_mark_function_context): New.
  2505. * decl.c (push_cp_function_context, pop_cp_function_context,
  2506. mark_cp_function_context): Rename for consistency.
  2507. (cxx_init_decl_processing): Don't set old hooks.
  2508. 2002-04-19 Neil Booth <neil@daikokuya.demon.co.uk>
  2509. * call.c (convert_type_from_ellipsis): Rename, update.
  2510. * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
  2511. * cp-tree.h (convert_type_from_ellipsis): Rename.
  2512. * decl.c (cxx_init_decl_processing): Don't set hook.
  2513. 2002-04-18 Neil Booth <neil@daikokuya.demon.co.uk>
  2514. * call.c (build_new_method_call): Update.
  2515. * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
  2516. * cp-tree.h (cxx_incomplete_type_error): New.
  2517. * decl.c (grokdeclarator, grokparms): Update.
  2518. * decl2.c (check_classfn): Update.
  2519. * pt.c (tsubst): Update.
  2520. * typeck.c (complete_type_or_else, expr_sizeof,
  2521. decay_conversion): Update.
  2522. * typeck2.c (incomplete_type_error): Rename.
  2523. (add_exception_specifier): Update.
  2524. 2002-04-18 Jason Merrill <jason@redhat.com>
  2525. PR c++/5658
  2526. * search.c (setup_class_bindings): A class template qualifies as a
  2527. type binding.
  2528. 2002-04-17 Jakub Jelinek <jakub@redhat.com>
  2529. PR c++/6316
  2530. * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
  2531. before expanding.
  2532. 2002-04-16 Mark Mitchell <mark@codesourcery.com>
  2533. * init.c (begin_init_stmts): Remove commented out code.
  2534. (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
  2535. * semantics.c (begin_gobal_stmt_expr): Adjust call to
  2536. expand_start_stmt_expr.
  2537. 2002-04-15 Mark Mitchell <mark@codesourcery.com>
  2538. * decl.c (register_dtor_fn): Pass the address of dso_handle, not
  2539. dso_handle itself, to __cxa_atexit.
  2540. 2002-04-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
  2541. * error.c (cxx_print_error_function): Adjust call to macros.
  2542. 2002-04-14 Jakub Jelinek <jakub@redhat.com>
  2543. * class.c (layout_virtual_bases): Do all dsize computation on trees.
  2544. 2002-04-14 Jason Merrill <jason@redhat.com>
  2545. * typeck.c (get_member_function_from_ptrfunc): Don't do
  2546. gratuitious division and multiplication on
  2547. ptrmemfunc_vbit_in_delta targets.
  2548. 2002-04-12 Mark Mitchell <mark@codesourcery.com>
  2549. PR c++/5373.
  2550. * semantics.c (finish_expr_stmt): Remember the type of the
  2551. expression before any conversions are performed.
  2552. 2002-04-12 Mark Mitchell <mark@codesourcery.com>
  2553. PR c++/5189.
  2554. * call.c (add_template_candidate_real): Do not treat member
  2555. templates as copy constructors.
  2556. 2002-04-12 Mark Mitchell <mark@codesourcery.com>
  2557. * decl.c (duplicate_decls): Do not copy the RTL for a variable
  2558. declaration if the old variable had an incomplete type and the new
  2559. variable does not.
  2560. (complete_vars): Do not call layout_decl for completed variables.
  2561. 2002-04-12 Richard Sandiford <rsandifo@redhat.com>
  2562. * decl.c (duplicate_decls): Don't try to unify an implicit typedef
  2563. with an explicit one.
  2564. (follow_tag_typedef): New.
  2565. (lookup_tag): Use it to extract the tag of an explicit typedef.
  2566. (xref_tag): Likewise.
  2567. 2002-04-11 Andrew Haley <aph@redhat.com>
  2568. * typeck.c (type_after_usual_arithmetic_conversions):
  2569. If two types have the same variant, return immediately.
  2570. When two floating-point operands are the same precision:
  2571. convert to float if one of the operands is float;
  2572. if neither operand is one of the standard types, return the type
  2573. of the first operand.
  2574. 2002-04-10 Nathan Sidwell <nathan@codesourcery.com>
  2575. PR c++/5507
  2576. * decl.c (make_typename_type): Remove implicit typenameness.
  2577. 2002-04-09 Jason Merrill <jason@redhat.com>
  2578. PR optimization/6189
  2579. * semantics.c (genrtl_start_function): Don't free
  2580. DECL_SAVED_FUNCTION_DATA for inline functions.
  2581. * init.c (build_member_call): For now, don't convert to
  2582. intermediate base if it would cause an error.
  2583. 2002-04-08 Paolo Carlini <pcarlini@unitus.it>
  2584. * parse.y (namespace_qualifier, maybe_identifier,
  2585. begin_explicit_instantiation, end_explicit_instantiation,
  2586. apparent_template_type, .finish_template_type,
  2587. do_id, maybe_init, defarg_again, component_decl_1):
  2588. Add ending ';', in accordance with POSIX.
  2589. 2002-04-06 Mark Mitchell <mark@codesourcery.com>
  2590. PR c++/5571
  2591. * class.c (layout_class_type): Remember incomplete static
  2592. variables.
  2593. (finish_struct_1): Call complete_vars, not
  2594. hack_incomplete_structures.
  2595. * cp-tree.h (hack_incomplete_structures): Rename to ...
  2596. (complete_vars): ... this.
  2597. (struct saved_scope): Remove incomplete.
  2598. (namespace_scope_incomplete): Remove.
  2599. * decl.c (struct binding_level): Remove incomplete.
  2600. (incomplete_vars): New variable.
  2601. (mark_binding_level): Don't mark incomplete.
  2602. (print_binding_level): Don't print it.
  2603. (mark_saved_scope): Don't mark incomplete.
  2604. (pushdecl): Use maybe_register_incopmlete_var.
  2605. (cxx_init_decl_processing): Register incomplete_vars for GC.
  2606. (start_decl_1): Clarify error message.
  2607. (hack_incomplete_vars): Remove.
  2608. (maybe_register_incomplete_var): New function.
  2609. (complete_vars): Likewise.
  2610. 2002-04-06 Jason Merrill <jason@redhat.com>
  2611. PR c++/4934
  2612. * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
  2613. set before checking it.
  2614. PR c++/525
  2615. * init.c (build_member_call): Use build_scoped_ref.
  2616. (resolve_offset_ref): Likewise.
  2617. * call.c (build_scoped_method_call): Likewise.
  2618. * tree.c (maybe_dummy_object): Kludge around current_class_type being
  2619. wrong.
  2620. * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
  2621. * cp-tree.h: Adjust.
  2622. * init.c (push_base_cleanups): Just use build_scoped_method_call.
  2623. PR c++/6179
  2624. * method.c (implicitly_declare_fn): Pass unqualified type to
  2625. synthesize_exception_spec.
  2626. 2002-04-04 Neil Booth <neil@daikokuya.demon.co.uk>
  2627. * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
  2628. * cvt.c: Update comment.
  2629. * init.c (expand_cleanup_for_base): Update.
  2630. * semantics.c (finish_parenthesized_expr): Update.
  2631. * typeck.c (cp_truthvalue_conversion): Update.
  2632. 2002-04-04 Jason Merrill <jason@redhat.com>
  2633. * semantics.c (finish_eh_cleanup): New fn.
  2634. * cp-tree.h: Add prototype.
  2635. * init.c (perform_member_init, expand_cleanup_for_base): Use
  2636. finish_eh_cleanup.
  2637. * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
  2638. * cp-tree.h: Remove references.
  2639. * decl.c (begin_constructor_body, end_constructor_body): Likewise.
  2640. * dump.c (cp_dump_tree): Likewise.
  2641. * pt.c (tsubst_expr): Likewise.
  2642. * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
  2643. (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
  2644. * tree.c (cp_statement_code_p): Likewise.
  2645. * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
  2646. PR c++/5636
  2647. * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
  2648. cleanup for nrv.
  2649. PR c++/5104
  2650. * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
  2651. specifiers.
  2652. [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
  2653. 2002-04-03 Richard Henderson <rth@redhat.com>
  2654. * cp-lang.c (cxx_warn_unused_global_decl): New.
  2655. (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
  2656. 2002-04-03 Neil Booth <neil@daikokuya.demon.co.uk>
  2657. * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
  2658. * tree.c (init_tree): Don't set hook.
  2659. 2002-04-03 Roger Sayle <roger@eyesopen.com>
  2660. PR c++/5998:
  2661. * decl.c (duplicate_decls): Don't mess with assembler names when
  2662. redeclaring builtin functions as static.
  2663. 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
  2664. * call.c (build_addr_func): Update.
  2665. * class.c (resolve_address_of_overloaded_function): Update.
  2666. * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
  2667. * cp-tree.h (cxx_mark_addressable): New.
  2668. * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
  2669. * decl2.c (build_cleanup): Update.
  2670. * except.c (build_throw): Update.
  2671. * init.c (resolve_offset_ref): Update.
  2672. * pt.c (convert_nontype_argument): Update.
  2673. * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
  2674. * typeck.c (decay_conversion, build_array_ref, build_unary_op,
  2675. unary_complex_lvalue): Update.
  2676. (mark_addressable): Rename.
  2677. 2002-04-01 Roger Sayle <roger@eyesopen.com>
  2678. PR c++/5998:
  2679. * decl.c (duplicate_decls): Overwrite the RTL when (and only
  2680. when) overwriting a built-in function. Don't use COPY_DECL_RTL,
  2681. but follow the SET_DECL_RTL idiom used elsewhere in the function.
  2682. 2002-04-01 Neil Booth <neil@daikokuya.demon.co.uk>
  2683. * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
  2684. LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
  2685. * decl.c (grokdeclarator): Update.
  2686. * mangle.c (write_integer_cst): Update.
  2687. * typeck.c (build_binary_op): Update.
  2688. 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
  2689. * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
  2690. * lex.c (cxx_init): Don't set hook.
  2691. 2002-03-31 Neil Booth <neil@daikokuya.demon.co.uk>
  2692. * Make-lang.in (error.o): Update.
  2693. * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
  2694. * cp-tree.h (struct diagnostic_context): Predeclare.
  2695. (cxx_print_error_function): New.
  2696. * error.c: Include langhooks-def.h.
  2697. (lang_print_error_function): Rename. Update.
  2698. (init_error): Don't set hook.
  2699. 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
  2700. * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
  2701. Redefine.
  2702. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
  2703. * decl.c (finish_enum): Similarly.
  2704. * error.c (dump_type): Similarly.
  2705. * lex.c (cxx_init): Similarly.
  2706. * mangle.c (write_builtin_type): Similarly.
  2707. * typeck.c (comptypes): Similarly.
  2708. 2002-03-28 Roger Sayle <roger@eyesopen.com>
  2709. PR c++/5998:
  2710. * decl.c (cxx_init_decl_processing): Re-enable built-in functions
  2711. in the g++ front-end.
  2712. (duplicate_decl): Allow redefinition of anticipated built-ins.
  2713. Fix inlining problem by over-writing the old DECL_RTL.
  2714. (lookup_namespace_name): Fail to find an identifier in the
  2715. specified namespace if its still anticipated.
  2716. (builtin_function_1): New function split out from builtin_function
  2717. to create a builtin in the current namespace with given context.
  2718. (builtin_function): Call builtin_function_1 to define the
  2719. appropriate builtins in both the std and global namespaces.
  2720. (select_decl): Don't test for anticipated decls here.
  2721. (unqualified_namespace_lookup): Instead ignore them whilst
  2722. searching through scopes and namespaces.
  2723. * decl2.c (do_nonmember_using_decl): If a using declaration
  2724. specifies an anticipated built-in function, mark it as no longer
  2725. anticipated in that scope.
  2726. (ambiguous_decl): Avoid resolving to an anticipated decl.
  2727. * lex.c (do_scoped_id): Fail to find an identifier in the global
  2728. namespace if its still anticipated.
  2729. 2002-03-29 Neil Booth <neil@daikokuya.demon.co.uk>
  2730. * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
  2731. * cp-tree.h (cp_make_lang_type): Rename.
  2732. * lex.c (cp_make_lang_type): Rename.
  2733. (make_aggr_type): Update.
  2734. * tree.c (init_tree): Don't set make_lang_type_fn.
  2735. 2002-03-29 Jakub Jelinek <jakub@redhat.com>
  2736. PR c++/6073
  2737. * class.c (finish_struct_1): Update static field's DECL_MODE even
  2738. if its type is a variant of t.
  2739. 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
  2740. * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
  2741. * cp-tree.h (cxx_insert_default_attributes): New.
  2742. * decl.c (insert_default_attributes): Rename.
  2743. 2002-03-27 Mark Mitchell <mark@codesourcery.com>
  2744. PR c++/4884
  2745. * call.c (build_op_delete_call): Allow for the fact the placement
  2746. may be a COMPOUND_EXPR.
  2747. 2002-03-27 Neil Booth <neil@daikokuya.demon.co.uk>
  2748. * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
  2749. * cp-tree.h (init_cplus_expand): Remove.
  2750. (cxx_expand_expr): New.
  2751. * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
  2752. fix prototype.
  2753. (init_cplus_expand): Remove.
  2754. * lex.c (cxx_init): Don't call init_cplus_expand.
  2755. 2002-03-26 Mark Mitchell <mark@codesourcery.com>
  2756. PR c++/4884.
  2757. * init.c (build_new_1): Allow for the fact the result of
  2758. build_function_call may be a COMPOUND_EXPR.
  2759. 2002-03-26 Nathan Sidwell <nathan@codesourcery.com>
  2760. PR c++/5682
  2761. * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
  2762. (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
  2763. (dfs_skip_nonprimary_vbases_markedp): Remove.
  2764. * search.c (get_shared_vbase_if_not_primary): Remove.
  2765. (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
  2766. (dfs_skip_nonprimary_vbases_markedp): Remove.
  2767. (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
  2768. (dfs_marked_real_bases_queue_p): Likewise.
  2769. 2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
  2770. * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
  2771. * cp-tree.h (cxx_mark_tree): New.
  2772. * decl.c (lang_mark_tree): Rename cxx_mark_tree.
  2773. 2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
  2774. * cp-tree.h (cxx_maybe_build_cleanup): New.
  2775. * decl.c (destroy_local_var, hack_incomplete_structures): Update.
  2776. (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
  2777. * tree.c (build_target_expr): Update.
  2778. * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
  2779. 2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
  2780. * decl2.c (cxx_decode_option): Handle -E.
  2781. * lang-specs.h (default_compilers): Preprocess with cc1plus.
  2782. * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
  2783. 2002-03-23 Jakub Jelinek <jakub@redhat.com>
  2784. PR c++/6037
  2785. * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
  2786. 2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
  2787. * error.c (dump_type): Be careful about implicit typenames.
  2788. 2002-03-21 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
  2789. PR C++/3656
  2790. * semantics.c (finish_base_specifier): Handle erronous base
  2791. classes.
  2792. 2002-03-22 Zack Weinberg <zack@codesourcery.com>
  2793. * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
  2794. REAL_IS_NOT_DOUBLE.
  2795. 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
  2796. * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
  2797. an index into the vtable_entry array regardless of
  2798. TARGET_PTRMEMFUNC_VBIT_LOCATION.
  2799. 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
  2800. * tree.c (cp_cannot_inline_tree_fn): Same.
  2801. 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
  2802. * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
  2803. insert_block, getdecls, global_bindings_p): New.
  2804. 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
  2805. PR c++/4361
  2806. * mangle.c (struct globals) Add internal_mangling_p member.
  2807. (write_template_param): Do internal mangling, if needed.
  2808. (mangle_conv_op_name_for_type): Request internal mangling.
  2809. 2002-03-20 Jason Merrill <jason@redhat.com>
  2810. PR c++/2136
  2811. * init.c (build_delete): Check access for a member op delete here.
  2812. * decl2.c (delete_sanity): Not here.
  2813. 2002-03-19 Jason Merrill <jason@redhat.com>
  2814. PR c++/5118
  2815. * class.c (get_vfield_name): Use the constructor_name.
  2816. 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
  2817. * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
  2818. * cp-tree.h (lang_printable_name): Rename.
  2819. * error.c (lang_decl_name): Use new hook.
  2820. * lex.c (cxx_init): Remove old hook.
  2821. * pt.c (tsubst_decl): Use new hook.
  2822. * tree.c (lang_printable_name): Rename.
  2823. 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
  2824. PR c++/3882
  2825. * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
  2826. (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
  2827. only after recording the declaration.
  2828. 2002-03-18 Jason Merrill <jason@redhat.com>
  2829. PR c++/2039
  2830. * init.c (resolve_offset_ref): Hand off to build_component_ref.
  2831. PR c++/4222, c++/5995
  2832. * call.c (build_over_call): Fix empty class logic.
  2833. PR c++/3870
  2834. * cp-tree.h (struct saved_scope): Add last_parms field.
  2835. * decl.c (maybe_push_to_top_level): Save last_function_parms.
  2836. (pop_from_top_level): Restore it.
  2837. PR c++/4377
  2838. * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
  2839. NON_LVALUE_EXPRs.
  2840. PR c++/4003
  2841. * pt.c (tsubst_friend_function): Use decl_namespace_context.
  2842. PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
  2843. * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
  2844. type with a nontrivial destructor.
  2845. 2002-03-17 Jason Merrill <jason@redhat.com>
  2846. PR c++/4460
  2847. * class.c (build_base_path): Virtual base layout is fixed in
  2848. in-charge [cd]tors.
  2849. 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
  2850. * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
  2851. * parse.y (yyparse): Remove macro.
  2852. 2002-03-17 Jason Merrill <jason@redhat.com>
  2853. PR c++/5757
  2854. * init.c (build_new_1): Pass the right pointer to op delete.
  2855. 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
  2856. PR c++/4361
  2857. * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
  2858. conversion operators go.
  2859. (struct lang_decl_flags): Add template_conv_p and unused
  2860. bitfields.
  2861. (DECL_TEMPLATE_CONV_FN_P): New macro.
  2862. * call.c (build_user_type_conversion_1): Don't check second type
  2863. conversion of overload set first.
  2864. * class.c (add_method): Make sure templated conversion operators
  2865. all end up on slot 2.
  2866. * lex.c (do_identifier): A conversion operator token might be
  2867. satisfied by a templated conversion operator.
  2868. * pt.c (check_explicit_specialization): Use
  2869. CLASSTYPE_FIRST_CONVERSION_SLOT.
  2870. (template_parm_this_level_p): New function.
  2871. (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
  2872. * search.c (lookup_fnfields_1): Template conversions will be on
  2873. the first slot.
  2874. * typeck.c (build_component_ref): Preserve the type of an
  2875. conversion operator name on the overload type.
  2876. (build_x_function_call): Retrieve the conversion operator name.
  2877. 2002-03-15 Richard Henderson <rth@redhat.com>
  2878. * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
  2879. 2002-03-15 Mark Mitchell <mark@codesourcery.com>
  2880. * cp-tree.h (CLEANUP_DECL): Remove.
  2881. (CLEANUP_EXPR): Likewise.
  2882. * decl.c (destroy_local_var): Simplify.
  2883. (maybe_build_cleanup): Tidy.
  2884. * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
  2885. * semantics.c (cp_expand_stmt): Likewise.
  2886. * cp/tree.c (cp_statement_code_p): Likewise.
  2887. 2002-03-15 Jason Merrill <jason@redhat.com>
  2888. PR c++/5857
  2889. * decl.c (duplicate_decls): Use merge_types instead of common_type.
  2890. * typeck.c (common_type): Just hand off to
  2891. type_after_usual_arithmetic_conversions and
  2892. composite_pointer_type.
  2893. (merge_types): New fn.
  2894. (commonparms): Use it instead of common_type.
  2895. (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
  2896. (composite_pointer_type): Also handle attributes.
  2897. * cp-tree.h: Declare merge_types.
  2898. * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
  2899. variables.
  2900. * decl2.c (maybe_make_one_only): Also mark the decl as needed.
  2901. 2002-03-14 Richard Henderson <rth@redhat.com>
  2902. * decl.c: Include c-pragma.h.
  2903. (start_decl, start_function): Invoke maybe_apply_pragma_weak.
  2904. * Make-lang.in: Update dependencies.
  2905. 2002-03-14 Jakub Jelinek <jakub@redhat.com>
  2906. PR c++/5908
  2907. * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
  2908. * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
  2909. 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
  2910. * mangle.c (write_builtin_type): Handle 128-bit integers even if
  2911. they are not a standard integer type.
  2912. 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
  2913. * cp-tree.h (init_init_processing): Remove declaration.
  2914. * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
  2915. * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
  2916. 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2917. * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
  2918. Define.
  2919. * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
  2920. tree_code_length.
  2921. * lex.c (cplus_tree_code_type, cplus_tree_code_length,
  2922. cplus_tree_code_name): Delete.
  2923. (cxx_init): Don't call add_c_tree_codes, instead set
  2924. lang_unsafe_for_reeval. Don't try to copy into the various
  2925. tree_code arrays.
  2926. 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
  2927. PR c++/5659
  2928. * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
  2929. * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
  2930. definitions.
  2931. 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
  2932. Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
  2933. DR209 is now not a defect.
  2934. * cp-tree.h (skip_type_access_control): Remove.
  2935. * decl.c (grokdeclarator): Do type access control for friend
  2936. declarations.
  2937. * semantics.c (decl_type_access_control): Don't reset
  2938. current_type_lookups.
  2939. (save_type_access_control): Always save the lookups.
  2940. (skip_type_access_control): Remove.
  2941. (finish_class_definition): Don't change type_lookups.
  2942. 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
  2943. Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
  2944. It is incorrect.
  2945. * typeck.c (build_static_cast): Compare non-qualified types
  2946. with pointer to member conversions.
  2947. 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
  2948. Daniel Berlin <dan@dberlin.org>
  2949. * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
  2950. (cxx_get_alias_set): Use it.
  2951. 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2952. * cp-tree.h (stabilize_expr): Prototype.
  2953. 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
  2954. * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
  2955. conditional return void.
  2956. 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
  2957. * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
  2958. * cp-tree.h (cxx_unsave): New.
  2959. * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
  2960. (init_tree): Update.
  2961. 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2962. * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
  2963. explicit sizeof/sizeof.
  2964. * decl2.c (cxx_decode_option): Likewise.
  2965. * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
  2966. 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
  2967. PR c++/775
  2968. * decl.c (lookup_tag): Only reject enum/class mismatch, not
  2969. class/union mismatch.
  2970. * parse.y (check_class_key): New function.
  2971. (structsp): Call it.
  2972. 2002-03-01 Michael Matz <matz@suse.de>
  2973. * typeck.c (cp_pointer_int_sum): Complete inner type which is
  2974. used later by size_in_bytes().
  2975. 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
  2976. * cp-tree.h: Require __GNUC__ to be #defined.
  2977. (build_init): Add missing prototype.
  2978. 2002-03-01 Jason Merrill <jason@redhat.com>
  2979. * except.c: Don't include decl.h or obstack.h. Do include
  2980. tree-inline.h.
  2981. (build_throw): Destroy temporaries from the thrown
  2982. expression before calling __cxa_throw. Construct a thrown
  2983. temporary directly into the exception object.
  2984. (stabilize_throw_expr): New function.
  2985. (wrap_cleanups_r): New function.
  2986. * tree.c (stabilize_expr): New function.
  2987. * init.c (build_init): New function.
  2988. * Make-lang.in (cp/except.o): Adjust .h deps.
  2989. 2002-02-28 Jason Merrill <jason@redhat.com>
  2990. * search.c (lookup_base_r): Don't clear is_non_public just because
  2991. we found a friendly scope.
  2992. * decl.c (finish_function): Only warn about missing return
  2993. statement with -Wreturn-type.
  2994. 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
  2995. * class.c (build_clone): Update.
  2996. * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
  2997. * cp-tree.h (cxx_dup_lang_specific_decl): New.
  2998. * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
  2999. (copy_decl): Update.
  3000. * method.c (make_thunk): Update.
  3001. 2002-02-27 Zack Weinberg <zack@codesourcery.com>
  3002. * decl2.c: Delete traditional-mode-related code copied from
  3003. the C front end but not used, or used only to permit the
  3004. compiler to link.
  3005. 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
  3006. PR c++/4093
  3007. * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
  3008. to void.
  3009. 2002-02-22 Jakub Jelinek <jakub@redhat.com>
  3010. PR other/5746
  3011. * semantics.c (finish_switch_cond): Don't call get_unwidened
  3012. if error_mark_node.
  3013. 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
  3014. PR c++/2645, DR 295
  3015. * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
  3016. tf_keep_type_decl.
  3017. (make_typename_type): Use tsubst_flags_t.
  3018. * decl.c (make_typename_type): Adjust. Return non-artificial
  3019. TYPE_DECLs, if required.
  3020. (grokdeclarator): Simplify CVR qualification handling. Allow bad
  3021. qualifiers on typedef types.
  3022. * decl2.c (handle_class_head): Adjust make_typename_type call.
  3023. * parse.y (nested_name_specifier): Likewise.
  3024. (typename_sub0): Likewise.
  3025. (typename_sub1): Likewise.
  3026. * pt.c (convert_template_argument): Adjust make_typename_type
  3027. return value.
  3028. (tsubst): Adjust cp_build_qualified_type_real calls.
  3029. (check_cv_quals_for_unify): Cope with allowing bad qualifications
  3030. on template type parms.
  3031. (instantiate_decl): Recheck substitutions to give warnings on bad
  3032. qualifications.
  3033. * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
  3034. 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
  3035. * cp/decl.c (duplicate_decls): Merge always_inline attribute.
  3036. * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
  3037. unless DECL_ALWAYS_INLINE.
  3038. 2002-02-20 Jakub Jelinek <jakub@redhat.com>
  3039. * typeck.c (cp_pointer_int_sum): Renamed from
  3040. pointer_int_sum, call pointer_int_sum.
  3041. 2002-02-20 Jakub Jelinek <jakub@redhat.com>
  3042. * decl.c (duplicate_decls): Return 0 if issued error about
  3043. redeclaration.
  3044. 2002-02-19 Jason Merrill <jason@redhat.com>
  3045. ABI change: Mangle `void (A::*)() const' as
  3046. M1AKFvvE, not MK1AFvvE.
  3047. * mangle.c (write_function_type): Write cv-quals for member
  3048. function type here.
  3049. (write_pointer_to_member_type): Not here.
  3050. 2002-02-18 Jason Merrill <jason@redhat.com>
  3051. * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
  3052. (do_decl_instantiation): Likewise.
  3053. 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
  3054. PR c++/5685
  3055. * decl.c (duplicate_decls): Make warning unconditional
  3056. if duplicate default argument declarations are present.
  3057. 2002-02-17 Jakub Jelinek <jakub@redhat.com>
  3058. * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
  3059. shortening.
  3060. 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
  3061. * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
  3062. remove incorrect comment. Move #if 0'd code to common path. Use
  3063. IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
  3064. 2002-02-13 Jason Merrill <jason@redhat.com>
  3065. * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
  3066. (finish_function): Don't warn if current_function_returns_null.
  3067. * typeck2.c (digest_init): Do handle values of vector type.
  3068. * typeck2.c (digest_init, process_init_constructor): Treat vectors
  3069. like arrays.
  3070. 2002-02-11 Jason Merrill <jason@redhat.com>
  3071. * parse.y (reserved_declspecs): Don't handle attributes.
  3072. (reserved_typespecquals): Handle them here.
  3073. * Make-lang.in (parse.c): Adjust expected conflicts.
  3074. 2002-02-08 Jakub Jelinek <jakub@redhat.com>
  3075. * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
  3076. instead of compstmt.
  3077. (compstmt_or_stmtexpr): Renamed from compstmt.
  3078. (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
  3079. 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
  3080. Rename instantiate_type_flags to tsubst_flags_t & expand use.
  3081. * cp-tree.h (instantiate_type_flags): Rename to ...
  3082. (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
  3083. add tf_warning flag.
  3084. (instantiate_type): Adjust prototype.
  3085. (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
  3086. do_type_instantiation, cp_build_qualified_type_real): Likewise.
  3087. cp_build_qualified_type: Adjust.
  3088. * class.c (instantiate_type): Adjust parameter. Rename itf_* to
  3089. tf_*.
  3090. * call.c (standard_conversion): Rename itf_* to tf_*.
  3091. (reference_binding): Likewise.
  3092. (convert_like_real): Likewise.
  3093. * cvt.c (cp_convert_to_pointer): Likewise.
  3094. (convert_to_reference): Likewise.
  3095. * decl.c (lookup_namespace_name): Use tf_* flags.
  3096. (make_typename_type): Likewise.
  3097. (grokdeclarator): Likewise.
  3098. * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
  3099. (coerce_template_template_parms, convert_template_argument,
  3100. coerce_template_parms, maybe_get_template_decl_from_type_decl,
  3101. lookup_template_class, tsubst_friend_function, tsubst_friend_class,
  3102. instantiate_class_template, tsubst_template_arg_vector,
  3103. tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
  3104. tsubst_decl, tsubst_arg_types, tsubst_function_type,
  3105. tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
  3106. instantiate_template, fn_type_unification,
  3107. resolve_overloaded_unification, verify_class_unification,
  3108. unify, get_bindings_real, do_type_instantiation,
  3109. regenerate_decl_from_template, instantiate_decl,
  3110. tsubst_initializer_list, tsubst_enum,
  3111. get_mostly_instantiated_function_type,
  3112. invalid_nontype_parm_type_p): Likewise.
  3113. * tree.c (cp_build_qualified_type_real): Likewise.
  3114. * typeck.c (build_binary_op): Rename itf_* to tf_*.
  3115. (build_ptrmemfunc): Likewise.
  3116. (convert_for_assignment): Likewise.
  3117. 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
  3118. PR c++/109
  3119. * decl.c (grokdeclarator): Allow friend declarations from
  3120. dependent types.
  3121. * decl2.c (handle_class_head): Don't push into template parm contexts.
  3122. * pt.c (push_template_decl_real): Template parm contexts are never
  3123. being defined.
  3124. 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
  3125. * class.c: Include target.h.
  3126. (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
  3127. BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
  3128. bit-field layout.
  3129. * Make-lang.in: Adjust deps.
  3130. 2002-02-05 Jason Merrill <jason@redhat.com>
  3131. * error.c (dump_type): Be more helpful about VECTOR_TYPE.
  3132. 2002-02-04 Jakub Jelinek <jakub@redhat.com>
  3133. * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
  3134. (finish_switch_cond): Set SWITCH_TYPE.
  3135. 2002-02-04 Richard Henderson <rth@redhat.com>
  3136. * method.c (use_thunk): Always initialize the block tree. Reindent.
  3137. * semantics.c (expand_body): Emit thunks after function, not before.
  3138. 2002-02-04 Jason Merrill <jason@redhat.com>
  3139. * decl.c (start_function): Call cplus_decl_attributes immediately
  3140. after grokdeclarator.
  3141. * decl.c (start_function): Combine DECL_RESULT handling code.
  3142. 2002-02-03 Jason Merrill <jason@redhat.com>
  3143. * xref.c: Remove.
  3144. * Make-lang.in (CXX_OBJS): Remove cp/xref.o
  3145. (cp/xref.o): Remove dependencies.
  3146. * class.c (finish_struct_1, check_methods): Don't call xref fns.
  3147. (finish_struct_1): Likewise.
  3148. * friend.c (make_friend_class): Likewise.
  3149. * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
  3150. * spew.c (read_process_identifier): Likewise.
  3151. 2002-02-01 Jason Merrill <jason@redhat.com>
  3152. PR c++/4872
  3153. * decl.c (finish_function): Warn about a non-void function with
  3154. no return statement and no abnormal exit.
  3155. * cp-tree.h (struct cp_language_function): Add returns_abnormally.
  3156. (current_function_returns_abnormally): New macro.
  3157. * call.c (build_call): Set it.
  3158. * typeck.c (build_component_ref): Always complain about offsetof
  3159. constructs on non-PODs. Only make it an error for members of
  3160. virtual bases.
  3161. * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
  3162. (dump_function_decl): Always dump parms.
  3163. * decl2.c (finish_static_data_member_decl): Complain about a local
  3164. class with a static data member.
  3165. PR c++/4286
  3166. * search.c (lookup_field_1): Don't xref a static data member
  3167. just because we looked it up.
  3168. 2002-01-31 Jason Merrill <jason@redhat.com>
  3169. * Make-lang.in (parse.c): Handle .output file.
  3170. PR c++/3395
  3171. * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
  3172. not TREE_TYPE.
  3173. * semantics.c (finish_class_definition): Adjust.
  3174. Allow attributes in parms and casts.
  3175. * parse.y (named_parm): Don't strip attrs.
  3176. (declmods): Remove 'attributes' production.
  3177. (nonempty_cv_qualifiers): Accept attributes.
  3178. (ATTRIBUTE): Give precedence.
  3179. * decl.c (groktypename): Handle attributes.
  3180. (grokparms): Likewise.
  3181. 2002-01-29 Jakub Jelinek <jakub@redhat.com>
  3182. * decl2.c (cxx_decode_option): Pass 0 as last argument to
  3183. cpp_handle_option.
  3184. * lang-specs.h: Use cpp_unique_options instead of cpp_options
  3185. when used together with cc1_options.
  3186. 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
  3187. PR c++/5132
  3188. * typeck2.c (digest_init): Make sure non-array core type is
  3189. instantiated.
  3190. * decl2.c (reparse_absdcl_as_casts): Just store the type in the
  3191. constructor, rather than build a new one.
  3192. (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
  3193. PURPOSE of constructor elts.
  3194. 2002-01-23 Zack Weinberg <zack@codesourcery.com>
  3195. * Make-lang.in (parse.c): Adjust expected number of
  3196. shift-reduce conflicts.
  3197. (decl.o): Depend on diagnostic.h.
  3198. * decl.c: Include diagnostic.h.
  3199. (grokdeclarator): Check for null pointer.
  3200. (finish_function): Don't abort when
  3201. current_binding_level->parm_flag != 1, if errors have
  3202. occurred; throw away the statement tree and extra binding
  3203. levels, and continue.
  3204. * lex.c (note_list_got_semicolon): Check for null pointer.
  3205. * method.c (hack_identifier): Just return error_mark_node if
  3206. value is error_mark_node.
  3207. * parse.y (primary: TYPEID(type_id)): No need to use
  3208. TYPE_MAIN_VARIANT here.
  3209. (handler_seq): Accept an empty list of catch clauses and
  3210. generate a fake handler block to avoid later crashes.
  3211. (ansi_raise_identifier): Accept the error token too.
  3212. * semantics.c (begin_class_definition,
  3213. finish_class_definition): Check for error_mark_node.
  3214. 2002-01-23 Zack Weinberg <zack@codesourcery.com>
  3215. * typeck2.c (friendly_abort): Delete definition.
  3216. * cp-tree.h (friendly_abort): Don't prototype.
  3217. (my_friendly_assert): Use fancy_abort.
  3218. 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
  3219. * cp-tree.h (my_friendly_abort): Remove.
  3220. 2002-01-23 Jakub Jelinek <jakub@redhat.com>
  3221. * spew.c (pending_inlines, pending_inlines_tail,
  3222. processing_these_inlines): Make static.
  3223. (mark_pending_inlines): Remove static.
  3224. (begin_parsing_inclass_inline): If in function, save pi
  3225. for GC to cp_function_chain->unparsed_inlines instead.
  3226. (process_next_inline): Likewise.
  3227. * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
  3228. (mark_pending_inlines): Add prototype.
  3229. * decl.c (spew_debug): Remove unused extern.
  3230. (mark_lang_function): Call mark_pending_inlines.
  3231. 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
  3232. * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
  3233. init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
  3234. semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
  3235. Change my_fancy_abort() to abort().
  3236. 2002-01-23 Jason Merrill <jason@redhat.com>
  3237. PR c++/5453
  3238. * class.c (fixed_type_or_null): Fix thinko.
  3239. PR c++/3331
  3240. * init.c (resolve_offset_ref): Use build_indirect_ref.
  3241. * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
  3242. 2002-01-22 Jason Merrill <jason@redhat.com>
  3243. * parse.y (function_body): Suppress the block for the outermost
  3244. curly braces.
  3245. * decl.c (pushdecl): Don't try to skip it.
  3246. (begin_function_body): Keep the block we create, not the next one.
  3247. * init.c (emit_base_init): Don't mess with keep_next_level.
  3248. * class.c (build_base_path): Tweak formatting.
  3249. 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
  3250. Fix regression introduced with patch for c++/775
  3251. * parse.y (class_head_defn): Check for template specializations
  3252. with a different class-key.
  3253. 2002-01-17 Jason Merrill <jason@redhat.com>
  3254. * decl.c (begin_constructor_body, begin_destructor_body): New fns.
  3255. (begin_function_body): Call them and keep_next_level.
  3256. * init.c (emit_base_init): Call keep_next_level.
  3257. * semantics.c (setup_vtbl_ptr): Lose.
  3258. * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
  3259. (vtbls_set_up_p): Lose.
  3260. * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
  3261. * method.c (do_build_copy_constructor): Likewise.
  3262. (synthesize_method): Call finish_mem_initializers.
  3263. * parse.y (nodecls): Likewise.
  3264. * error.c (dump_type_suffix): Print the exception specs before
  3265. recursing.
  3266. (dump_function_decl): Here, too.
  3267. * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
  3268. 2002-01-10 Ira Ruben <ira@apple.com>
  3269. PR c++/907
  3270. * decl.c (start_method): Handle attrlist.
  3271. 2002-01-10 Jakub Jelinek <jakub@redhat.com>
  3272. * decl2.c (max_tinst_depth): Increase default limit to 500.
  3273. 2002-01-10 Graham Stott <grahams@redhat.com>
  3274. * spew.c (YYCHAR): Uppercase macro parameter and add
  3275. parenthesis.
  3276. (YYCODE): Likewise.
  3277. (NAME): Uppercase macro parameter.
  3278. 2002-01-09 Graham Stott <grahams@redhat.com>
  3279. * decl.h (grokdeclarator): Wrap long line.
  3280. * semantics.c (FINISH_COND): Uppercase macro paramaters and
  3281. add parenthesis.
  3282. 2002-01-08 Graham Stott <grahams@redhat.com>
  3283. * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
  3284. (PALLOC): Uppercase macro parameter and whitespace.
  3285. (SALLOC): Uppercase macro parameter.
  3286. (SFREE): Uppercase macros parameter, add parenthese and
  3287. whitespace.
  3288. (STREQL): Uppercase macro parameter and whitespace.
  3289. (STRNEQ): Likewise.
  3290. (STRLSS): Likewise.
  3291. (STRLEQ): Likewise.
  3292. (STRGTR): Likewise.
  3293. (STRGEQ): Likewise.
  3294. * call.c (convert_like): Add parenthesis and wrap.
  3295. (convert_like_with_context): Likewise.
  3296. (ICS_RANK): Whitespace.
  3297. (NEED_TEMPORARY_P): Remove parenthesis.
  3298. * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
  3299. whitespace.
  3300. (VTT_MARKED_BINFO_P): Likewise.
  3301. * decl.c (BINDING_LEVEL): Add parenthesis.
  3302. (DEF_OPERATOR): Likewise.
  3303. * mangle.c (MANGLE_TRACE): Add parenthesis.
  3304. (MANGLE_TRACE_TREE): Likewise.
  3305. (write_signed_number): Likewise.
  3306. (write_unsigned_number): Likewise.
  3307. * pt.c (ccat): Uppercase macro parameter.
  3308. (cat): Likewise
  3309. * search.c (SET_BINFO_ACCESS): Add parenthesis.
  3310. 2002-01-07 Jason Merrill <jason@redhat.com>
  3311. * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
  3312. to pedwarn.
  3313. PR c++/3536
  3314. * method.c (make_thunk): If !flag_weak, give the thunk the
  3315. function's linkage.
  3316. (use_thunk): Here, too.
  3317. 2002-01-07 Graham Stott <grahams@redhat.com>
  3318. * error.c: Update copyright date.
  3319. (print_scope_operator): Add parenthesis.
  3320. (print_left_paren): Likewise.
  3321. (print_right_paren): Likewise.
  3322. (print_left_bracket): Likewise.
  3323. (print_right_bracket): Likewise.
  3324. (print_template_argument_list_start): Likewise.
  3325. (print_template_argument_list_end): Likewise.
  3326. (print_non_consecutive_character): Likewise.
  3327. (print_tree_identifier): Likewise.
  3328. (print_identifier): Likewise.
  3329. (NEXT_CODE): Uppercase macro parameter.
  3330. (ident_fndecl): Delete unused.
  3331. (GLOBAL_THING): Likewise.
  3332. 2002-01-06 Graham Stott <grahams@redhat.com>
  3333. * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
  3334. (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
  3335. (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
  3336. (RECORD_OR_UNION_TYPE_CHECK): Likewise.
  3337. (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
  3338. (C_IS_RESERVED_WORD): Uppercase macro parameter.
  3339. (C_RID_YYCODE) Likewise.
  3340. (ptrmem_cst): Use rtx.
  3341. (LOCAL_BINDING_P): Add whitespace.
  3342. (INHERITED_VALUE_BINDING_P): Likewise.
  3343. (BINDING_SCOPE): Wrap long line.
  3344. (BINDING_HAS_LEVEL_P): Remove parenthesis.
  3345. (BINDING_VALUE): Wrap long line.
  3346. (BINDING_TYPE): Whitespace.
  3347. (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
  3348. (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
  3349. (IDENTIFIER_NAMESPACE_VALUE): Likewise.
  3350. (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
  3351. (same_type_p): Uppercase macro parameters.
  3352. (same_type_ignoring_top_level_qualifiers_p): Likewise.
  3353. (OVL_FUNCTION): Wrap long line.
  3354. (OVL_CHAIN): Whitespace.
  3355. (OVL_CURRENT): Add parenthesis and whitespace.
  3356. (OVL_NEXT): Whitespace.
  3357. (OVL_USED): Likewise.
  3358. (IDENTIFIER_TYPE_VALUE): Likewise.
  3359. (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
  3360. (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
  3361. (LANG_ID_FIELD): Whitespace.
  3362. (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
  3363. (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
  3364. (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
  3365. (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
  3366. (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
  3367. (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
  3368. (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
  3369. (IDENTIFIER_VIRTUAL_P): Likewise.
  3370. (IDENTIFIER_OPNAME_P): Likewise.
  3371. (IDENTIFIER_TYPENAME_P): Remove parenthesis.
  3372. (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
  3373. (C_SET_EXP_ORIGINAL_CODE): Likewise.
  3374. (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
  3375. (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
  3376. (IS_AGGR_TYPE): Uppercase macro parameter.
  3377. (CLASS_TYPE_P): Likewise.
  3378. (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
  3379. (IS_AGGR_TYPE_2): Whitespace.
  3380. (TAGGED_TYPE_P): Uppercase macro parameter.
  3381. (TYPE_BUILT_IN): Whitespace.
  3382. (TYPE_FOR_JAVA): Likewise.
  3383. (FUNCTION_ARG_CHAIN): Remove parenthesis.
  3384. (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
  3385. (FUNCTION_FIRST_USER_PARAM): Likewise.
  3386. (PROMOTES_TO_AGGR_TYPE): Whitespace.
  3387. (DERIVED_FROM_P): Add parenthesis and wrap.
  3388. (UNIQUELY_DERIVED_FROM_P): Likewise.
  3389. (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
  3390. (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
  3391. (CLASSTYPE_USE_TEMPLATE): Whitespace.
  3392. (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
  3393. (TYPE_GETS_DELETE): Add parenthesis.
  3394. (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
  3395. (TYPE_HAS_ASSIGN_REF): Likewise,
  3396. (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
  3397. (TYPE_HAS_INIT_REF): Likewise.
  3398. (TYPE_HAS_CONST_INIT_REF): Likewise.
  3399. (TYPE_BEING_DEFINED): Likewise.
  3400. (TYPE_LANG_SPECIFIC): Likewise.
  3401. (CLASSTYPE_RTTI): Likewise.
  3402. (TYPE_OVERLOADS_CALL_EXPR): Likewise.
  3403. (TYPE_OVERLOADS_ARRAY_REF): Likewise.
  3404. (TYPE_OVERLOADS_ARROW): Likewise.
  3405. (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
  3406. (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
  3407. (CLASSTYPE_METHOD_VEC): Likewise.
  3408. (CLASSTYPE_MARKED_N): Likewise.
  3409. (CLASSTYPE_MARKED): Likewise.
  3410. (CLASSTYPE_MARKED2): Likewise.
  3411. (CLASSTYPE_MARKED3): Likewise.
  3412. (CLASSTYPE_MARKED4): Likewise.
  3413. (CLASSTYPE_MARKED5): Likewise.
  3414. (CLASSTYPE_MARKED6): Likewise.
  3415. (SET_CLASSTYPE_MARKED): Whitespace.
  3416. (CLEAR_CLASSTYPE_MARKED): Likewise.
  3417. (SET_CLASSTYPE_MARKED2): Likewise.
  3418. (CLEAR_CLASSTYPE_MARKED2): Likewise.
  3419. (SET_CLASSTYPE_MARKED3): Likewise.
  3420. (CLEAR_CLASSTYPE_MARKED3): Likewise.
  3421. (SET_CLASSTYPE_MARKED4): Likewise.
  3422. (CLEAR_CLASSTYPE_MARKED4): Likewise.
  3423. (SET_CLASSTYPE_MARKED5): Likewise.
  3424. (CLEAR_CLASSTYPE_MARKED5): Likewise.
  3425. (SET_CLASSTYPE_MARKED6): Likewise.
  3426. (CLEAR_CLASSTYPE_MARKED6): Likewise.
  3427. (CLASSTYPE_TAGS): Likewise.
  3428. (CLASSTYPE_VSIZE): Likewise.
  3429. (CLASSTYPE_VBASECLASSES): Likewise.
  3430. (CANONICAL_BINFO): Add parenthesis.
  3431. (CLASSTYPE_SIZE(NODE): Likewise.
  3432. (CLASSTYPE_SIZE_UNIT): Likewise.
  3433. (CLASSTYPE_ALIGN(NODE): Likewise.
  3434. (CLASSTYPE_USER_ALIGN): Likewise.
  3435. (TYPE_JAVA_INTERFACE): Likewise.
  3436. (CLASSTYPE_PURE_VIRTUALS): Likewise.
  3437. (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
  3438. (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
  3439. (CLASSTYPE_HAS_MUTABLE): Likewise.
  3440. (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
  3441. (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
  3442. (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
  3443. (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
  3444. (CLASSTYPE_INTERFACE_ONLY): Likewise.
  3445. (CLASSTYPE_INTERFACE_KNOWN): Likewise.
  3446. (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
  3447. (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
  3448. (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
  3449. (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
  3450. (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
  3451. (BINFO_UNSHARED_MARKED): Whitespace.
  3452. (BINFO_MARKED): Whitespace and wrap.
  3453. (SET_BINFO_MARKED): Likewise.
  3454. (CLEAR_BINFO_MARKED): Likewise.
  3455. (BINFO_VTABLE_PATH_MARKED): Likewise.
  3456. (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
  3457. (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
  3458. (BINFO_SUBVTT_INDEX): Remove parenthesis.
  3459. (BINFO_VPTR_INDEX): Likewise.
  3460. (BINFO_PRIMARY_BASE_OF): Likewise,
  3461. (CLASSTYPE_VFIELDS): Whitespace.
  3462. (VF_DERIVED_VALUE): Wrap long line.
  3463. (NAMESPACE_LEVEL): Whitespace.
  3464. (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
  3465. (DEFARG_POINTER): Whitespace.
  3466. (DECL_NEEDED_P): Remove parenthesis.
  3467. (DECL_LANGUAGE): Whitespace.
  3468. (SET_DECL_LANGUAGE): Add parenthesis.
  3469. (DECL_CONSTRUCTOR_P): Whitespace and wrap.
  3470. (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
  3471. (DECL_IN_AGGR_P): Whitespace.
  3472. (DECL_FRIEND_P): Likewise.
  3473. (DECL_BEFRIENDING_CLASSES): Likewise.
  3474. (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
  3475. (DECL_NONCONVERTING_P): Whitespace.
  3476. (DECL_PURE_VIRTUAL_P): Likewise.
  3477. (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
  3478. (DECL_PENDING_INLINE_INFO): Whitespace.
  3479. (DECL_SORTED_FIELDS): Likewise.
  3480. (DECL_DEFERRED_FN): Likewise.
  3481. (DECL_TEMPLATE_INFO): Likewise.
  3482. (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
  3483. (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
  3484. (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
  3485. (TMPL_ARGS_LEVEL): Likewise.
  3486. (SET_TMPL_ARGS_LEVEL): Likewise.
  3487. (INNERMOST_TEMPLATE_PARMS): Whitespace.
  3488. (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
  3489. (INTEGRAL_CODE_P(CODE): Add parenthesis.
  3490. (CP_INTEGRAL_TYPE_P): Remove parenthesis.
  3491. (TYPE_HAS_CONSTRUCTOR): Whitespace.
  3492. (TREE_HAS_CONSTRUCTOR): Likewise.
  3493. (TYPE_HAS_DESTRUCTOR): Likewise.
  3494. (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
  3495. (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
  3496. (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
  3497. (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
  3498. (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
  3499. (TYPE_PTRMEMFUNC_P): Likewise.
  3500. (TYPE_PTRMEMFUNC_FLAG): Likewise.
  3501. (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
  3502. (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
  3503. (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
  3504. (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
  3505. (DECL_ACCESS): Whitespace.
  3506. (DECL_GLOBAL_CTOR_P): Remove parenthesis.
  3507. (DECL_GLOBAL_DTOR_P): Likewise.
  3508. (GLOBAL_INIT_PRIORITY): Likewise.
  3509. (DECL_TEMPLATE_PARMS): Likewise.
  3510. (DECL_TEMPLATE_RESULT): Likewise.
  3511. (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
  3512. (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
  3513. (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
  3514. (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
  3515. (PRIMARY_TEMPLATE_P): Add parenthesis.
  3516. (DECL_USE_TEMPLATE): Whitespace.
  3517. (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
  3518. (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
  3519. (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
  3520. (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
  3521. (CALL_DECLARATOR_PARMS): Remove parenthesis.
  3522. (CALL_DECLARATOR_QUALS): Likewise.
  3523. (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
  3524. (TEMP_NAME_P): Wrap.
  3525. (VFIELD_NAME_P): Likewise.
  3526. (B_SET): Uppercase macro parameters and add parenthesis.
  3527. (B_CLR): Likewise.
  3528. (B_TST): Likewise.
  3529. (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
  3530. (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
  3531. (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
  3532. (same_or_base_type_p): Likewise.
  3533. (cp_deprecated): Likewise.
  3534. 2002-01-05 Richard Henderson <rth@redhat.com>
  3535. * semantics.c (expand_body): Revert last change.
  3536. 2002-01-04 Jason Merrill <jason@redhat.com>
  3537. PR c++/4122
  3538. * class.c (update_vtable_entry_for_fn): Set delta to zero for a
  3539. lost primary.
  3540. * class.c (build_vtbl_initializer): Check for a lost primary
  3541. before calculating the vtable entry to throw away.
  3542. 2002-01-02 Jason Merrill <jason@redhat.com>
  3543. * semantics.c (expand_body): Call outlining_inline_function when
  3544. emitting an inline function out of line.
  3545. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3546. PR c++/5116, c++/764 reversion
  3547. * call.c (build_new_op): Revert the instantiations. They are
  3548. incorrect.
  3549. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3550. PR c++/5089
  3551. * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
  3552. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3553. PR c++/3716
  3554. * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
  3555. (tsubst, case POINTER_TYPE): Handle pmfs here.
  3556. (tsubst, case OFFSET_TYPE): Check it is not an offset to
  3557. reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
  3558. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3559. PR c++/35
  3560. * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
  3561. (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
  3562. * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
  3563. PARM_DECL.
  3564. (tsubst_template_parms): Break up loop statements.
  3565. (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
  3566. parm PARM_DECLs don't get promoted.
  3567. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3568. PR c++/5123
  3569. * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
  3570. (build_x_function_call): Cope with a COMPONENT_REF containing a
  3571. TEMPLATE_ID_EXPR.
  3572. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3573. PR c++/5213
  3574. * pt.c (convert_template_argument): Be more careful determining
  3575. when RECORD_TYPE templates are or are not templates.
  3576. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3577. PR c++/775
  3578. * cp-tree.h (handle_class_head): Adjust prototype.
  3579. * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
  3580. parameters. Use for all class heads.
  3581. * parse.y (named_class_head_sans_basetype, named_class_head,
  3582. named_complex_class_head_sans_basetype,
  3583. named_class_head_sans_basetype_defn,
  3584. unnamed_class_head): Remove.
  3585. (class_head, class_head_apparent_template): Recognize class heads
  3586. (class_head_decl, class_head_defn): New reductions. Process class
  3587. heads.
  3588. (structsp): Adjust class definition and class declaration
  3589. reductions.
  3590. (maybe_base_class_list): Give diagnostic on empty list.
  3591. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3592. PR c++/4379
  3593. * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
  3594. single non-static member.
  3595. (unary_complex_lvalue): If it cannot be a pointer to member, don't
  3596. make it so. Check it is not pointer to reference.
  3597. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3598. PR c++/5132
  3599. * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
  3600. are processing a template decl.
  3601. 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
  3602. PR c++/5116, c++/764
  3603. * call.c (build_new_op): Make sure template class operands are
  3604. instantiated. Simplify arglist construction.
  3605. Copyright (C) 2002 Free Software Foundation, Inc.
  3606. Copying and distribution of this file, with or without modification,
  3607. are permitted in any medium without royalty provided the copyright
  3608. notice and this notice are preserved.