ChangeLog-1999 244 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795
  1. 1999-12-31 Mark Mitchell <mark@codesourcery.com>
  2. * cp-tree.h (VF_NORMAL_VALUE): Remove.
  3. * class.c (struct base_info): Remove vfield, vfields, and rtti.
  4. (set_primary_base): New function, split out from ...
  5. (finish_base_struct): ... here. Rename to ...
  6. (determine_primary_base): ... this. Simplify.
  7. (create_vtable_ptr): Tweak accordingly.
  8. (finish_struct_1): Simplify.
  9. * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
  10. (CLASSTYPE_N_BASECLASSES): Likewise.
  11. (BINFO_FOR_VBASE): New macro.
  12. (get_vbase_types): Change prototype.
  13. * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
  14. (prepare_fresh_vtable): Likewise.
  15. (finish_vtbls): Likewise.
  16. (get_class_offset_1): Likewise.
  17. (modify_all_indirect_vtables): Likewise.
  18. (build_vbase_pointer_fields): Likewise.
  19. * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
  20. * init.c (sort_base_init): Use BINFO_FOR_VBASE.
  21. (expand_member_init): Likewise.
  22. * search.c (get_base_distance): Likewise.
  23. (lookup_field_queue_p): Likewise.
  24. (virtual_context): Likewise.
  25. (get_vbase_types): Don't return a value. Set
  26. CLASSTYPE_VBASECLASSES here.
  27. * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
  28. 1999-12-30 Mark Mitchell <mark@codesourcery.com>
  29. * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
  30. 1999-12-29 Mark Mitchell <mark@codesourcery.com>
  31. * class.c (create_vtable_ptr): Put the vtable at the beginning of
  32. the class, not the end, in the new ABI.
  33. * tree.c (propagate_binfo_offsets): Do the right thing for the new
  34. ABI.
  35. 1999-12-29 Mark Mitchell <mark@codesourcery.com>
  36. * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
  37. (CLASSTYPE_NEARLY_EMPTY_P): New macro.
  38. * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
  39. (check_field_decls): Likewise.
  40. (check_bases_and_members): Likewise.
  41. 1999-12-28 Mark Mitchell <mark@codesourcery.com>
  42. * cp-tree.h (do_inline_function_hair): Remove.
  43. * class.c (layout_class_type): New function, split out from
  44. finish_struct_1.
  45. (fixup_pending_inline): Likewise.
  46. (fixup_inline_methods): New function.
  47. * method.c (fixup_pending_inline): Remove.
  48. (do_inline_function_hair): Likewise.
  49. * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
  50. new ABI.
  51. * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
  52. (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
  53. (CLASSTYPE_PURE_VIRTUALS): ... this.
  54. (lang_decl_flags): Replace abstract_virtual with pure_virtual.
  55. (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
  56. (DECL_PURE_VIRTUAL_P): ... this.
  57. (get_abstract_virtuals): Rename to ...
  58. (get_pure_virtuals): ... this.
  59. * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
  60. DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
  61. CLASSTYPE_PURE_VIRTUALS.
  62. * class.c (build_vtable_entry): Likewise.
  63. (finish_struct_bits): Likewise. Call get_pure_virtuals, not
  64. get_abstract_virtuals.
  65. (build_vtbl_initializer): Likewise.
  66. (override_one_vtable): Likewise.
  67. (check_methods): Likewise.
  68. * decl.c (duplicate_decls): Likewise.
  69. (redeclaration_error_message): Likewise.
  70. (lang_mark_tree): Likewise.
  71. * decl2.c (grok_function_init): Likewise.
  72. (import_export_vtable): Likewise.
  73. (import_expor_class): Likewise.
  74. * typeck2.c (abstract_virtuals_error): Likewise.
  75. * xref.c (GNU_xref_member): Likewise.
  76. * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
  77. 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
  78. * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
  79. throughout.
  80. 1999-12-26 Mark Mitchell <mark@codesourcery.com>
  81. * decl.c (store_return_init): Use mode of old RTL generated for
  82. DECL_RESULT, not the mode of DECL_RESULT itself.
  83. * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
  84. for functions that used named return values.
  85. 1999-12-24 Mark Mitchell <mark@codesourcery.com>
  86. * semantics.c (expand_body): Use
  87. note_deferral_of_defined_inline_function.
  88. 1999-12-22 Mark Mitchell <mark@codesourcery.com>
  89. * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
  90. 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
  91. * error.c (dump_decl): Support named return values.
  92. 1999-12-20 Mark Mitchell <mark@codesourcery.com>
  93. * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
  94. (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
  95. (CLASSTYPE_PRIMARY_BINFO): Likewise.
  96. * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
  97. TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
  98. (check_bases_and_members): Set them here instead.
  99. (create_vtable_ptr): New function, split out from ...
  100. (finish_struct_1): ... here. Use it. Tidy. Use
  101. CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
  102. * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
  103. the first field in the class.
  104. * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
  105. seeing TYPE_VFIELD as the first field in the class.
  106. * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
  107. (TYPE_POLYMORPHIC_P): ... this.
  108. (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
  109. (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
  110. (TREE_CALLS_NEW): Remove.
  111. (TREE_MANGLED): Likewise.
  112. * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
  113. and TYPE_POLYMORPHIC_P.
  114. * class.c (check_bases): Likewise.
  115. (finish_base_struct): Likewise.
  116. (finish_struct_bits): Likewise.
  117. (check_for_override): Likewise.
  118. (finish_struct_1): Likewise.
  119. (get_vfield_name): Likewise.
  120. * decl.c (xref_basetypes): Likewise.
  121. * decl2.c (import_export_class): Likewise.
  122. (import_export_decl): Likewise.
  123. * error.c (dump_function_decl): Likewise.
  124. * pt.c (instantiate_class_template): Likewise.
  125. * repo.c (repo_inline_used): Likewise.
  126. * rtti.c (build_headof): Likewise.
  127. (get_tinfo_fn_dynamic): Likewise.
  128. (build_x_typeid): Likewise.
  129. (get_tinfo_var): Likewise.
  130. (build_dynamic_cast_1): Likewise.
  131. (synthesize_tinfo_fn): Likewise.
  132. * search.c (lookup_field_1): Likewise.
  133. (dfs_debug_mark): Likewise.
  134. (maybe_suppress_debug_info): Likewise.
  135. * typeck.c (build_component_ref): Likewise.
  136. (build_component_addr): Likewise.
  137. * typeck2.c (process_init_constructor): Likewise.
  138. 1999-12-20 Nathan Sidwell <nathan@acm.org>
  139. * typeck.c (strip_all_pointer_quals): New static function.
  140. (build_static_cast): Use it. Don't use at_least_as_qualified_p.
  141. 1999-12-16 Mark Mitchell <mark@codesourcery.com>
  142. * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
  143. (dso_handle_node): New macro.
  144. (flag_use_cxa_atexit): New variable.
  145. (declare_global_var): New function.
  146. (start_anon_func): Remove declaration.
  147. (end_anon_func): Likewise.
  148. * decl.c (get_atexit_node): New function, split out from
  149. destroy_local_static. Handle flag_use_cxa_atexit.
  150. (get_dso_handle_node): Likewise.
  151. (start_cleanup_fn): Renamed from start_anon_func. Moved here from
  152. except.c. Handle flag_use_cxa_atexit.
  153. (end_cleanup_fn): Renamed from end_anon_func. Moved here from
  154. except.c.
  155. (declare_global_var): New variable.
  156. (destroy_local_static): Handle flag_use_cxa_atexit.
  157. * decl2.c (flag_use_cxa_atexit): New variable.
  158. (lang_f_options): Likewise.
  159. * except.c (start_anon_func): Remove.
  160. (end_anon_func): Liekwise.
  161. * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
  162. * rtti.c (get_tinfo_var): Use declare_global_var.
  163. 1999-12-16 Mark Mitchell <mark@codesourcery.com>
  164. * class.c (check_field_decls): Don't return a value.
  165. (avoid_overlap): Moved here from tree.c.
  166. (build_base_fields): Likewise.
  167. (check_bases): New function, split out from finish_base_struct.
  168. (check_bases_and_members): New function, split out from
  169. finish_struct_1.
  170. (struct base_info): Remove cant_have_default_ctor,
  171. cant_have_const_ctor, cant_have_asn_ref.
  172. (finish_base_struct): Split semantic analysis into check_bases.
  173. (finish_struct_methods): Fix bogus assertion.
  174. (check_field_decls): Call finish_struct_anon here.
  175. (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
  176. (finish_struct_1): Use check_bases_and_members. Reorganize.
  177. * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
  178. (build_base_fields): Don't declare.
  179. * tree.c (avoid_overlap): Remove.
  180. (build_base_fields): Likewise.
  181. * optimize.c (struct inline_data): Remove scope_stmt.
  182. (remap_block): Don't use insert_block_after_note. Don't update
  183. scope_stmt.
  184. (expand_call_inline): Don't update scope_stmt.
  185. (optimize_function): Don't initialize scope_stmt.
  186. * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
  187. NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
  188. 1999-12-15 Mark Mitchell <mark@codesourcery.com>
  189. * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
  190. out of the class, rather than taking them as parameters.
  191. (build_vbase_pointer_fields): Move here from tree.c.
  192. (build_vtbl_or_vbase_field): New function.
  193. (check_methods): Likewise.
  194. (remove_zero_width_bitfields): Likewise.
  195. (add_virtual_function): Use tree_cons instead of temp_tree_cons.
  196. (delete_duplicate_fields_1): Tidy. Don't delete duplicate
  197. USING_DECLs here.
  198. (finish_struct_methods): Handle the case where there are no
  199. methods here.
  200. (get_basefndecls): Use tree_cons instead of temp_tree_cons.
  201. (check_field_decls): Call delete_duplicate_fields here.
  202. (finish_struct_1): Tidy. Use check_methods and
  203. remove_zero_width_bitfields.
  204. * cp-tree.h (build_vbase_pointer_fields): Remove.
  205. * decl.c (grokdeclarator): Use tree_cons instead of
  206. temp_tree_cons.
  207. * decl2.c (qualified_lookup_using_namespace): Use tree_cons
  208. instead of temp_tree_cons.
  209. * lex.c (cons_up_default_function): Remove dead code.
  210. * method.c (fixup_pending_inline): New function, split out from ...
  211. (do_inline_function_hair): ... here.
  212. * tree.c (build_vbase_pointer_fields): Remove.
  213. 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
  214. * tree.c (walk_tree): Walk operand subtrees in forward order.
  215. * optimize.c (expand_call_inline): Likewise.
  216. (optimize_function): Initialize id->scope_stmt to something useful.
  217. (remap_block): Assume id->scope_stmt has a useful value.
  218. 1999-12-15 Nathan Sidwell <nathan@acm.org>
  219. * typeck.c (build_c_cast): Expand warning message. Move pointer
  220. alignment warning to after the cast. Don't warn about pointer
  221. alignment when given a pointer to incomplete.
  222. 1999-12-15 Richard Henderson <rth@cygnus.com>
  223. * cp-tree.h (make_aggr_type): Declare.
  224. * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
  225. (make_aggr_type): New.
  226. * decl.c (build_typename_type, init_decl_processing): Use it.
  227. (build_ptrmemfunc_type, xref_tag): Likewise.
  228. * except.c (call_eh_info): Likewise.
  229. * init.c (init_init_processing): Likewise.
  230. * pt.c (process_template_parm, lookup_template_class): Likewise.
  231. * rtti.c (expand_class_desc): Likewise.
  232. * semantics.c (begin_class_definition, finish_typeof): Likewise.
  233. * tree.c (copy_template_template_parm): Likewise.
  234. 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
  235. * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
  236. sizeof (struct tree_common).
  237. 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
  238. * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
  239. outermost block to point to the inlined function decl.
  240. * error.c (dump_decl): operator==, not operator ==.
  241. (op_to_string): Likewise.
  242. * decl.c (compute_array_index_type): Handle null name.
  243. * decl2.c (ambiguous_decl): Fix to match comment.
  244. (lookup_using_namespace): Adjust.
  245. * decl2.c (import_export_class): Don't ignore dllimport.
  246. 1999-12-14 Mark Mitchell <mark@codesourcery.com>
  247. * class.c (check_field_decls): Split out from ...
  248. (finish_struct_1): ... here. Use it. Tidy.
  249. * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
  250. * optimize.c (copy_body_r): Pass it.
  251. * tree.c (remap_save_expr): Clear walk_subtrees for an
  252. already-handled SAVE_EXPR.
  253. (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
  254. * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
  255. * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
  256. * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
  257. 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
  258. * class.c (finish_base_struct): Allow multiple COM base classes
  259. as well as non-COM bases as long as it's not the leftmost.
  260. 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
  261. * lex.c (saving_parse_to_obstack): New global.
  262. (reinit_parse_for_block): Use.
  263. (reinit_parse_for_expr): Use.
  264. (check_newline): Use.
  265. 1999-12-13 Mark Mitchell <mark@codesourcery.com>
  266. * optimize.c (initialize_inlined_parameters): Take FN to which the
  267. parameters belong as an argument.
  268. (expand_call_inline): Expand calls into the parameter
  269. initializations before pushing the function onto the list of
  270. functions we are presently expanding.
  271. 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  272. * class.c (get_vtable_name): Use a literal format string and
  273. VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
  274. (prepare_fresh_vtable): Likewise.
  275. * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
  276. VTABLE_NAME_FORMAT.
  277. * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
  278. * init.c (build_vec_init): Initialize variable `try_body'.
  279. * lex.c (yyerror): Don't call a variadic function with a
  280. non-literal format string.
  281. * optimize.c (optimize_function): Call memset, not bzero.
  282. * pt.c (for_each_template_parm_r): Add static prototype.
  283. 1999-12-09 Andreas Jaeger <aj@suse.de>
  284. * except.c (expand_throw): Add static attribute to match
  285. prototype.
  286. * Makefile.in (semantics.o): Add dependency on output.h.
  287. * semantics.c: Include output.h for declaration of
  288. make_function_rtl.
  289. 1999-12-09 Mark Mitchell <mark@codesourcery.com>
  290. * decl.c (init_decl_processing): Reenable inlining on trees.
  291. (finish_function): Likewise.
  292. * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
  293. * semantics.c (simplify_aggr_init_exprs): New function.
  294. (expand_body): Use it.
  295. * tree.c (walk_tree): Special-case TARGET_EXPRs since they
  296. sometimes present the same sub-tree twice.
  297. * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
  298. `csl'.
  299. * semantics.c (finish_switch_cond): Do conversions here, not ...
  300. * typeck.c (c_expand_start_case): Here.
  301. * semantics.c (do_poplevel): Remove unused variable.
  302. 1999-12-06 Mark Mitchell <mark@codesourcery.com>
  303. * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
  304. unless we're declaring the variable in question.
  305. 1999-12-06 Mark Mitchell <mark@codesourcery.com>
  306. * decl.c (init_decl_processing): #if 0 last patch.
  307. (finish_function): Likewise.
  308. 1999-12-05 Mark Mitchell <mark@codesourcery.com>
  309. * decl.c (init_decl_processing): Set flag_inline_trees if
  310. !flag_no_inline.
  311. * cp-tree.h (calls_setjmp_p): Declare.
  312. * decl.c (finish_function): Mark functions that call setjmp as
  313. uninlinable.
  314. * optimize.c (calls_setjmp_r): New function.
  315. (calls_setjmp_p): Likewise.
  316. 1999-12-04 Mark Mitchell <mark@codesourcery.com>
  317. * optimize.c (expand_call_inline): Wrap the expanded call in an
  318. EXPR_WITH_FILE_LOCATION node to get correct line numbers for
  319. inlined functions.
  320. * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
  321. in_target_cleanup_p.
  322. (remap_decl): New function.
  323. (remap_block): Likewise.
  324. (copy_scope_stmt): Likewise.
  325. (copy_body_r): Use remap_decl and copy_scope_stmt.
  326. (copy_body): Use VARRAY_TOP_TREE.
  327. (initialize_inlined_parameters): Likewise.
  328. (declare_return_variable): Likewise.
  329. (inlinable_function_p): Check flag_inline_trees.
  330. (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
  331. specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
  332. parameters of the inlined function.
  333. (optimize_function): Prevent recursion into partially complete
  334. functions.
  335. * cp-tree.def (SCOPE_STMT): Take one operand.
  336. * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
  337. (SCOPE_NULLIFIED_P): Redefine.
  338. (SCOPE_NO_CLEANUPS_P): New macro.
  339. (add_scope_stmt): Change prototype.
  340. * decl.c (poplevel): Tidy. Warn about unused variables here.
  341. Record SCOPE_STMT_BLOCKs.
  342. (finish_function): Keep DECL_INITIAL for functions that might be
  343. inlined.
  344. * ir.texi: Document SCOPE_NO_CLEANUPS_P.
  345. * semantics.c: Include rtl.h.
  346. (add_scope_stmt): Return the new scope statement and, for an
  347. end-of-scope statement, its matching begin statement. Don't set
  348. SCOPE_NULLIFIED_P.
  349. (do_pushlevel): Simplify, now that we are always
  350. function-at-a-time.
  351. (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
  352. (expand_stmt): Don't call expand_start_bindings or
  353. expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
  354. * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
  355. SCOPE_NULLIFIED_P.
  356. * Makefile.in (semantics.o): Depend on RTL_H.
  357. * decl2.c (pending_statics_used): Make it a macro.
  358. (saved_inlines_used): Likewise.
  359. (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
  360. (mark_inline_for_output): Likewise.
  361. (ssdf_decls_used): Remove.
  362. (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
  363. (generate_ctor_or_dtor_function): Adjust accordingly.
  364. 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
  365. Greg McGary <gkm@gnu.org>
  366. * decl.c (duplicate_decls): Merge
  367. DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
  368. DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
  369. 1999-12-02 Mike Stump <mrs@wrs.com>
  370. * init.c (perform_member_init): Handle parse errors better.
  371. 1999-12-01 Mark Mitchell <mark@codesourcery.com>
  372. * cp-tree.h (min_tree_cons): Remove.
  373. (scratch_ovl_cons): Likewise.
  374. * decl.c (saveable_obstack): Don't declare.
  375. (duplicate_decls): Tweak error-message.
  376. (initialize_local_var): Explicitly mark the definition as static.
  377. (finish_function): Call permanent_allocation, just so
  378. that the middle-end sees the obstacks it expects.
  379. (mark_cp_function_context): Likewise.
  380. * init.c (build_new): Don't use min_tree_cons.
  381. * lex.c (permanent_obstack): Don't declare.
  382. (current_obstack, saveable_obstack): Likewise.
  383. * spew.c (current_obstack, saveable_obstack): Likewise.
  384. * tree.c (current_obstack, saveable_obstack): Likewise.
  385. (scratch_ovl_cons): Remove.
  386. (build_min_nt): Don't mess with obstacks.
  387. (build_min): Likewise.
  388. (min_tree_cons): Remove
  389. * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
  390. (build_x_function_call): Likewise.
  391. (build_c_cast): Don't use min_tree_cons.
  392. 1999-11-29 Mark Mitchell <mark@codesourcery.com>
  393. * pt.c (tsubst_decl): Robustify.
  394. 1999-11-27 Mark Mitchell <mark@codesourcery.com>
  395. * decl2.c (finish_file): Call expand_body for inline functions
  396. that will be written out but that do not yet have RTL.
  397. * semantics.c (expand_body): Do not generate RTL For inline
  398. functions that do not yet need to be written out.
  399. 1999-11-25 Mark Mitchell <mark@codesourcery.com>
  400. * Make-lang.in (CXX_SRCS): Add optimize.c.
  401. * Makefile.in (CXX_OBJS): Add optimize.o.
  402. (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
  403. (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
  404. (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
  405. (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
  406. (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
  407. (dump.o): Likewise.
  408. (optimize.o): New target.
  409. * class.c: Don't include splay-tree.h.
  410. * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
  411. * cp-tree.h: Include splay-tree.h.
  412. (DECL_UNINLINABLE): New macro.
  413. (CTOR_BEGIN_P, CTOR_END_P): New macros.
  414. (flag_inline_trees): New variable.
  415. (local_variable_p): New function.
  416. (nonstatic_local_decl_p): Likewise.
  417. (optimize_function): Likewise.
  418. (cplus_unsave_expr_now): Remove.
  419. (copy_tree_r): Declare.
  420. (remap_save_expr): Likewise.
  421. * decl.c (local_variable_p): Don't
  422. make it static.
  423. (local_variable_p_walkfn): New function.
  424. (make_rtl_for_local_static): Remove code to try to avoid writing
  425. out static constants.
  426. (emit_local_var): Fix indentation.
  427. (nonstatic_local_decl_p): New function.
  428. (check_default_argument): Use local_variable_p_walkfn, not
  429. local_variable_p, when walking the tree.
  430. (start_function): Set the DECL_CONTEXT for automatically generated
  431. labels.
  432. (finish_constructor_body): Use CTOR_STMT to mark the end of a
  433. constructor.
  434. * decl2.c: Don't include splay-tree.h.
  435. (flag_inline_trees): Define.
  436. * dump.c: Don't include
  437. splay-tree.h.
  438. * except.c (expand_end_catch_block): Fix comment formatting.
  439. (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
  440. (expand_throw): Tidy comment.
  441. * init.c (build_vec_delete_1): Use create_temporary_var.
  442. * lex.c (cplus_tree_code_type): Make it static.
  443. (cplus_tree_code_length): Likewise.
  444. (cplus_tree_code_name): Likewise.
  445. * optimize.c: New file.
  446. * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
  447. with computed gotos.
  448. (setup_vtbl_ptr): Mark the beginnings of constructors with
  449. CTOR_STMT.
  450. (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
  451. (expand_body): Call optimize_function. Save bodies if we're doing
  452. inlining on trees.
  453. * tree.c: Don't include splay-tree.h. Include insn-config.h and
  454. integrate.h.
  455. (copy_tree_r): Make it public.
  456. (statement_code_p): New function.
  457. (mark_local_for_remap_r): Likewise.
  458. (cp_usave_r): Likewise.
  459. (cp_unsave): Likewise.
  460. (build_cplus_new): Set DECL_CONTEXT for temporary variables.
  461. (walk_tree): Walk into `s' class nodes. Walk statement chains.
  462. (copy_tree_r): Handle 's' class nodes. Restore chains for
  463. statements. Nullify scopes. Don't copy types.
  464. (init_tree): Set lang_unsave to cp_unsave.
  465. (remap_save_expr): Define.
  466. * ir.texi: Document CTOR_STMT.
  467. 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
  468. * search.c (note_debug_info_needed): Do perform this optimization
  469. for dwarf2.
  470. (maybe_suppress_debug_info): Likewise. Start by clearing
  471. TYPE_DECL_SUPPRESS_DEBUG.
  472. 1999-11-24 Mark Mitchell <mark@codesourcery.com>
  473. * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
  474. * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
  475. 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  476. * decl.c (pushdecl, grokdeclarator): Don't call a variadic
  477. function with a non-literal format string.
  478. * lex.c (do_identifier): Likewise.
  479. * typeck.c (build_unary_op): Likewise.
  480. 1999-11-23 Mark Mitchell <mark@codesourcery.com>
  481. * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
  482. 1999-11-22 Mark Mitchell <mark@codesourcery.com>
  483. * cp-tree.def (CTOR_COMPLETE): New tree node.
  484. * decl.c (finish_constructor_body): Add it, to mark the end of the
  485. constructor.
  486. (finish_function): Don't call end_protect_partials here.
  487. * ir.texi (CTOR_COMPLETE): Document it.
  488. * semantics.c (expand_stmt): Handle it.
  489. * cp-tree.def (FUNCTION_NAME): New tree node.
  490. * cp-tree.h (current_function_name_declared): Tweak documentation.
  491. (lang_decl_flags): Add pretty_function_p, adjust dummy.
  492. (DECL_PRETTY_FUNCTION_P): New macro.
  493. * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
  494. etc., in a template function. Use at_function_scope_p instead of
  495. expanding it inline.
  496. * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
  497. specially.
  498. (tsubst): Handle FUNCTION_NAME.
  499. (tsubst_copy): Likewise.
  500. (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
  501. etc. in instantiation.
  502. * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
  503. even in template functions.
  504. (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
  505. conditional scope at the top of a destructor.
  506. * error.c (dump_function_decl): Use `[ with ... ]' syntax for
  507. specializations too.
  508. 1999-11-22 Nathan Sidwell <nathan@acm.org>
  509. * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
  510. when actually negative.
  511. * typeck.c (convert_for_assignment): Expand comment about
  512. strange NULL check, moved from ...
  513. (convert_for_initialization): ... here. Remove unneeded
  514. code.
  515. 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
  516. * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
  517. * init.c (build_vec_delete, build_vec_delete_1): Likewise.
  518. Always destruct virtual bases of array components, but never
  519. delete them.
  520. (build_vec_init): Adjust invocations.
  521. (build_delete): Likewise.
  522. * decl2.c (delete_sanity): Likewise.
  523. 1999-11-19 Nathan Sidwell <nathan@acm.org>
  524. * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
  525. * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
  526. * decl2.c (grok_method_quals): Accept `restrict' as applying to
  527. the object pointer. Return such qualifiers.
  528. (grokclassfn): Apply this pointer qualifiers. Cleanup unused
  529. variables.
  530. 1999-11-18 Mark Mitchell <mark@codesourcery.com>
  531. * except.c (expand_end_catch_block): Fix typo.
  532. (expand_exception_blocks): Simplify. Don't call
  533. expand_leftover_cleanups.
  534. 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
  535. * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
  536. * pt.c (tsubst, case INTEGER_TYPE): Call it.
  537. Check uses_template_parms.
  538. * class.c (finish_struct): If we're a local class in a template
  539. function, add a TAG_DEFN.
  540. * pt.c (lookup_template_class): If this is a local class in a
  541. template function, call pushtag.
  542. (tsubst_expr, case TAG_DEFN): Handle classes, too.
  543. Emit debug info with the vtable.
  544. * search.c (maybe_suppress_debug_info): New function...
  545. * class.c (finish_struct_1): ...split out from here.
  546. * cp-tree.h: Declare it.
  547. * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
  548. if we're writing out the vtable.
  549. * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
  550. note_debug_info_needed): #if 0 out.
  551. 1999-11-14 Mark Mitchell <mark@codesourcery.com>
  552. * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
  553. * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
  554. TREE_PERMANENT.
  555. * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
  556. * decl2.c (lookup_arg_dependent): Use it.
  557. * cp-tree.h (cp_finish_decl): Change prototype.
  558. (finish_static_data_member_decl): Likewise.
  559. (push_permanent_obstack): Remove declaration.
  560. (push_expression_obstack): Likewise.
  561. (push_scratch_obstack): Likewise.
  562. (DECL_TEMPLATE_PARM_P): Robustify.
  563. (SET_DECL_TEMPLATE_PARM_P): New macro.
  564. * class.c (add_method): Don't manipulate obstacks.
  565. (finish_vtbls): Likewise.
  566. * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
  567. * decl.c (binding_for_name): Don't manipulate obstacks.
  568. (maybe_push_to_top_level): Likewise.
  569. (pop_from_top_level): Likewise.
  570. (duplicate_decls): Likewise.
  571. (pushdecl): Likewise.
  572. (implicitly_declare): Likewise.
  573. (build_typename_type): Likewise.
  574. (start_decl): Likewise.
  575. (cp_finish_decl): Likewise.
  576. (finish_decl): Likewise.
  577. (destroy_local_static): Likewise.
  578. (expand_static_init): Likewise.
  579. (complete_array_type): Likewise.
  580. (grokvardecl): Likewise.
  581. (build_ptrmemfnc_type): Likewise.
  582. (grokdeclarator): Likewise.
  583. (xref_tag): Likewise.
  584. (xref_basetypes): Likewise.
  585. (start_enum): Likewise.
  586. (finish_enum): Likewise.
  587. (start_function): Likewise.
  588. (finish_function): Likewise.
  589. (start_method): Adjust call to cp_finish_decl.
  590. * decl2.c (finish_static_data_member_decl): Don't manipulate
  591. obstacks.
  592. (grokfield): Likewise.
  593. (grokbitfield): Likewise.
  594. (get_temp_name): Likewise.
  595. (get_sentry): Likewise.
  596. (fnish_file): Likewise.
  597. (lookup_arg_dependent): Likewise.
  598. * except.c (call_eh_info): Likewise.
  599. (push_eh_info): Likewise.
  600. (do_pop_exception): Likewise.
  601. (initialize_handler_parm): Likewise.
  602. (expand_end_eh_spec): Likewise.
  603. (alloc_eh_object): Likewise.
  604. (expand_throw): Likewise.
  605. * expr.c (extract_scalar_init): Likewise.
  606. * init.c (build_java_class_ref): Likewise.
  607. * lex.c (get_time_identifier): Likewise.
  608. (snarf_defarg): Likewise.
  609. (add_defarg_fn): Likewise.
  610. (is_global): Simplify.
  611. (do_identifier): Don't check TREE_PERMANENT.
  612. * method.c (emit_thunk): Don't manipulate obstacks.
  613. * parse.y (condition): Adjust call to cp_finish_decl.
  614. (primary): Likewise.
  615. (initdcl): Likewise.
  616. (initdcl0_innards): Likewise.
  617. (nomods_initdcl0): Likewise.
  618. * pt.c (push_inline_template_parms_recursive): Use
  619. SET_DECL_TEMPLATE_PARM_P.
  620. (process_template_parm): Likewise.
  621. (lookup_template_class): Don't manipulate obstacks.
  622. (instantiate_class_template): Adjust call to
  623. finish_static_data_member_decl.
  624. (tsubst_decl): Don't manipulate obstacks.
  625. (tsubst_expr): Likewise.
  626. (instantiate_template): Likewise.
  627. (instantiate_decl): Adjust calls to cp_finish_decl.
  628. * rtti.c (call_void_fn): Don't manipulate obstacks.
  629. (get_tinfo_var): Likewise.
  630. (get_tinfo_fn_unused): Likewise.
  631. (build_dynamic_cast_1): Likewise.
  632. (expand_si_desc): Likewise.
  633. (expand_class_desc): Likewise.
  634. (expand_ptr_desc): Likewise.
  635. (expand_attr_desc): Likewise.
  636. (expand_generic_desc): Likewise.
  637. (synthesize_tinfo_fn): Likewise.
  638. * search.c (expand_upcast_fixups): Likewise.
  639. * semantics.c (finish_asm_stmt): Likewise.
  640. (finish_named_return_value): Likewise.
  641. (begin_class_definition): Likewise.
  642. (finish_class_definition): Likewise.
  643. (finish_typeof): Likewise.
  644. * tree.c (build_cplus_method_type): Likewise.
  645. (reverse_path): Likewise.
  646. (copy_template_template_parm): Likewise.
  647. (build_expr_ptr_wrapper): Likewise.
  648. (push_expression_obstack): Remove.
  649. (push_permanent_obstack): Likewise.
  650. * typeck.c (mark_addressable): Likewise.
  651. 1999-11-13 Mark Mitchell <mark@codesourcery.com>
  652. * call.c (build_conditional_expr): Use build_target_expr_with_type.
  653. (convert_like): Likewise.
  654. (build_over_call): Likewise.
  655. * cp-tree.h (build_target_expr): Remove.
  656. (build_target_expr_with_type): New function.
  657. * cvt.c (build_up_reference): Use get_target_expr.
  658. * decl.c (build_target_expr): Move to ...
  659. * tree.c (build_target_expr): Here. Make it static.
  660. (build_target_expr_with_type): New function. Set DECL_CONTEXT on
  661. the temporary VAR_DECLs.
  662. (get_target_expr): Use it.
  663. 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
  664. * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
  665. * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
  666. * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
  667. * class.c (set_rtti_entry): Use it.
  668. 1999-11-12 Mark Mitchell <mark@codesourcery.com>
  669. * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
  670. here.
  671. * semantics.c (finish_expr_stmt): Call it here instead. Move
  672. default_conversion logic to semantic-analysis time.
  673. 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
  674. * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
  675. Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
  676. * init.c (init_init_processing): Re-instated Nov 11 patch after
  677. approval.
  678. Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
  679. * init.c (init_init_processing): Undo patch from Nov 11, 1999.
  680. Patch had not been approved yet.
  681. 1999-11-12 Mark Mitchell <mark@codesourcery.com>
  682. * decl.c (compute_array_index_type): New function, split out from
  683. grokdeclarator.
  684. (create_array_type_for_decl): Likewise.
  685. (grokdeclarator): Use them.
  686. * semantics.c (expand_stmt): Don't suspend_momentary or
  687. resume_momentary.
  688. Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
  689. * init.c (init_init_processing): Header information for
  690. arrays allocated via `new' should have the same alignment used by
  691. malloc.
  692. 1999-11-10 Mark Mitchell <mark@codesourcery.com>
  693. * error.c (dump_function_name): Don't crash if given a friend
  694. pseudo-instantiation.
  695. * cp-tree.h (build_enumerator): Change prototype.
  696. * decl.c (enum_next_value): Remove.
  697. (enum_overflow): Likewise.
  698. (init_decl_processing): Don't register enum_next_value as a root.
  699. (start_enum): Clear TYPE_VALUES for a redefined enum.
  700. (finish_enum): Reset the type of enumeration constants.
  701. (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
  702. we don't need to. Maintain the TYPE_VALUES list and look there
  703. for the previously defined enumeration constant. Let enumeration
  704. constants have the type of their values until the enumeration type
  705. is complete.
  706. * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
  707. (structsp): Adjust.
  708. * parse.c: Regenerated.
  709. * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
  710. Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
  711. Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  712. * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
  713. 1999-11-09 Mark Mitchell <mark@codesourcery.com>
  714. * cp-tree.h (language_function): Remove x_last_dtor_insn and
  715. x_last_parm_cleanup_insn.
  716. * decl.c (last_dtor_insn): Remove.
  717. (last_parm_cleanup_insn): Likewise.
  718. (expand_start_early_try_stmts): Don't set them.
  719. (store_parm_decls): Likewise.
  720. (save_function_data): Or save them.
  721. (mark_lang_function): Or mark them.
  722. 1999-11-08 Mark Mitchell <mark@codesourcery.com>
  723. * decl.c (store_parm_decls): Generate cleanup code at
  724. semantic-analysis time. Destroy objects in the correct order.
  725. 1999-11-07 Mark Mitchell <mark@codesourcery.com>
  726. * cp-tree.h (begin_new_placement): Remove.
  727. (finish_new_placement): Likewise.
  728. * class.c (finish_struct_1): Don't suspend_momentary or
  729. resume_momentary.
  730. * decl.c (grokdeclarator): Likewise.
  731. (maybe_build_cleanup_1): Likewise.
  732. * except.c (push_eh_cleanup): Likewise.
  733. (build_terminate_handler): Likewise.
  734. * init.c (build_new_1): Likewise.
  735. * parse.y (parse_decl): Change prototype.
  736. (initdecls, notype_initdecls, initdcl): Don't return int.
  737. (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
  738. (.begin_new_placement): Remove.
  739. (.finish_new_placement): Likewise.
  740. (nonmomentary_expr): Likewise.
  741. (suspend_mom): Likewise.
  742. (condition): Don't suspend_momentary, resume_momentary, or keep
  743. track of need to resume.
  744. (unary_expr): Likewise.
  745. (new_placement): Likewise.
  746. (decl): Likewise.
  747. (structsp): Likewise.
  748. (new_type_id): Likewise.
  749. (maybe_parmlist): Likewise.
  750. (direct_after_type_declaration): Likewise.
  751. (direct_new_declarator): Likewise.
  752. (direct_abstract_declaration): Likewise.
  753. * parse.c: Regenerated.
  754. * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
  755. * semantics.c (begin_new_placement): Remove.
  756. (finish_new_placement): Likewise.
  757. 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
  758. * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
  759. (DECL_TEMPLATE_INFO): Use it.
  760. * decl.c (warn_extern_redeclared_static): Do nothing for
  761. TEMPLATE_DECLs.
  762. * decl2.c (mark_used): Explicitly check for function or variable.
  763. * semantics.c (finish_unary_op_expr): Check whether result is also
  764. an INTEGER_CST.
  765. 1999-11-05 Mark Mitchell <mark@codesourcery.com>
  766. * Makefile.in (typeck2.o): Depend on output.h.
  767. * typeck2.c: Include output.h.
  768. * decl.c (flag_ansi): Remove declaration.
  769. * pt.c (tinst_level_tick): Make it static.
  770. (last_template_error_tick): Likewise.
  771. * cp-tree.h (mapcar): Remove declaration.
  772. (search_tree): Likewise.
  773. (walk_tree_fn): New typedef.
  774. (walk_tree): New function.
  775. * tree.c (bot_manip): Change prototype. Adjust to be called via
  776. walk_tree.
  777. (bot_replace): Likewise.
  778. (no_linkage_helper): Likewise.
  779. (copy_tree_r): New function.
  780. (search_tree): Rename, and adjust, to become ...
  781. (walk_tree): New function.
  782. (mapcar): Remove.
  783. (target_remap): Remove.
  784. (target_remap_count): Likewise.
  785. (break_out_target_exprs): Use walk_tree.
  786. * decl.c (local_variable_p): Change prototype.
  787. (check_default_argument): Use walk_tree.
  788. * pt.c (for_each_template_parm_r): New function, split out from ...
  789. (for_each_template_parm): Here. Use it, via walk_tree.
  790. 1999-11-03 Mark Mitchell <mark@codesourcery.com>
  791. * class.c (check_bitfield_decl): New function, split out from
  792. finish_stuct_1.
  793. (check_field_decl): Likewise. Recursively examine members of
  794. anonymous structs.
  795. (finish_struct_1): Use them.
  796. * cp-tree.h (ANON_UNION_TYPE_P): New macro.
  797. 1999-11-02 Mark Mitchell <mark@codesourcery.com>
  798. * decl.c (grokfndecl): Remove dead code.
  799. * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
  800. 1999-11-02 Scott Snyder <snyder@fnal.gov>
  801. * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
  802. IMAGPART_EXPR.
  803. * pt.c (tsubst_copy): Likewise.
  804. 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
  805. * decl2.c (maybe_make_one_only): Always make things comdat on
  806. ELF targets, too.
  807. 1999-10-31 Mark Mitchell <mark@codesourcery.com>
  808. * decl.c (finish_function): Call free_after_parsing for functions
  809. we are not immediately turning into RTL.
  810. 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
  811. * cp-tree.h (flag_dump_translation_unit): Add decl.
  812. Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
  813. * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
  814. 1999-10-30 Mark Mitchell <mark@codesourcery.com>
  815. * decl.c (pop_cp_function_context): Don't call free on a NULL
  816. pointer.
  817. * semantics.c: Include ggc.h.
  818. (expand_body): Do garbage-collection after processing a template
  819. function. Clear DECL_SAVED_TREE after generating RTL for a
  820. function.
  821. * Makefile.in (semantics.o): Depend on ggc.h.
  822. 1999-10-29 Mark Mitchell <mark@codesourcery.com>
  823. * cp-tree.h (make_typename_type): Change prototype.
  824. * decl.c (make_typename_type): Only complain if so requested.
  825. * parse.y (nested_name_specifier): Adjust calls.
  826. (typename_sub0): Likewise.
  827. (typename_sub1): Likewise.
  828. * parse.c: Regenerated.
  829. * pt.c (convert_template_argument): Pass complain to
  830. make_typename_type.
  831. (tsubst): Likewise.
  832. 1999-10-28 Mark Mitchell <mark@codesourcery.com>
  833. * semantics.c (finish_handler): End the scope of the handler
  834. before attaching it to the statement-tree.
  835. 1999-10-28 Ian Lance Taylor <ian@zembu.com>
  836. * rtti.c (build_dynamic_cast_1): Give a better error message for
  837. an attempt to dynamic_cast from a non-polymorphic type.
  838. 1999-10-27 Mark Mitchell <mark@codesourcery.com>
  839. * cp-tree.h (make_temp_vec): Remove.
  840. (make_scratch_vec): Likewise.
  841. * call.c (add_function_candidate): Use make_tree_vec.
  842. (add_conv_candidate): Likewise.
  843. (build_builtin_candidate): Likewise.
  844. (add_template_candidate_real): Likewise.
  845. * class.c (resolve_address_of_overloaded_function): Likewise.
  846. * decl.c (start_function): Don't fool with the momentary obstack.
  847. (finish_function): Likewise.
  848. * init.c (expand_direct_vtbls_init): Likewise.
  849. (begin_init_stmts): Likewise.
  850. (finish_init_stmts): Likewise.
  851. * pt.c (add_to_template_args): Use make_tree_vec.
  852. (check_explicit_specialization): Likewise.
  853. (coerce_template_parms): Likewise.
  854. (lookup_template_class): Don't fool with the momentary obstack.
  855. (instantiate_class_template): Likewise.
  856. (tsubst_template_arg_vector): Use make_tree_vec.
  857. (tsubst_aggr_type): Don't fool with the momentary obstack.
  858. (tsubst_decl): Likewise. Use make_tree_vec.
  859. (try_one_overload): Likewise.
  860. (try_class_unification): Don't fool with the momentary obstack.
  861. (get_bindings_real): Use make_tree_vec.
  862. (set_mangled_name_for_template_decl): Likewise.
  863. * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
  864. * semantics.c (finish_expr_stmt): Likewise.
  865. (finish_do_stmt): Likewise.
  866. (finish_for_expr): Likewise.
  867. (finish_switch_cond): Likewise.
  868. (do_pushlevel): Likewise.
  869. (do_poplevel): Likewise.
  870. * tree.c (make_temp_vec): Remove.
  871. * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
  872. CLEANUP_P for a TRY_BLOCK.
  873. * ir.texi: Document SAVE_EXPR.
  874. Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
  875. * call.c (build_over_call): Check that the built-in function is
  876. of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
  877. * typeck.c (build_function_call_real): Similarly.
  878. 1999-10-26 Mark Mitchell <mark@codesourcery.com>
  879. * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
  880. remember_end_note.
  881. 1999-10-24 Mark Mitchell <mark@codesourcery.com>
  882. * decl.c (push_overloaded_decl_1): Use pushdecl.
  883. * decl.c (auto_function): Replace #ifdef'd __inline with just
  884. plain inline.
  885. * lex.c (my_get_run_time): Likeise.
  886. (yyprint): Likewise.
  887. (identifier_type): Likewise.
  888. * method.c (start_squangling): Likewise.
  889. (end_squangling): Likewise.
  890. (icat): Likewise.
  891. (old_backref_index): Likewise.
  892. (flush_repeats): Likewise.
  893. (issue_ktype): Likewise.
  894. * parse.y (empty_parms): Likewise.
  895. * parse.c: Regenerated.
  896. 1999-10-21 Mark Mitchell <mark@codesourcery.com>
  897. * dump.c (dequeue_and_dump): Replace several uses of
  898. queue_and_dump_index with dump_child.
  899. 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  900. * expr.c: Include tm_p.h.
  901. 1999-10-21 Mark Mitchell <mark@codesourcery.com>
  902. * cp-tree.h (SCOPE_PARTIAL_P): New macro.
  903. (pushlevel_temporary): Remove.
  904. (add_scope_stmt): New function.
  905. * decl.c (pushlevel_temporary): Remove.
  906. (poplevel): Use add_scope_stmt.
  907. (start_decl_1): Likewise.
  908. * semantics.c (add_scope_stmt): New function.
  909. (do_pushlevel): Use it.
  910. (do_poplevel): Use it.
  911. (expand_stmt): Check SCOPE_PARTIAL_P.
  912. * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
  913. * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
  914. * expr.c (cplus_expand_expr): Expand it.
  915. * ir.texi: Document EMPTY_CLASS_EXPR.
  916. 1999-10-20 Mark Mitchell <mark@codesourcery.com>
  917. * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
  918. parameters as having namespace scope.
  919. 1999-10-19 Mark Mitchell <mark@codesourcery.com>
  920. * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
  921. (mangling_flags): New type.
  922. (build_overload_int): Change prototype.
  923. (build_overload_value): Likewise.
  924. (numeric_output_need_bar): Improve comment.
  925. (mangle_expression): New function, broken out from ...
  926. (build_overload_int): Here.
  927. (build_overload_value): Adjust for use of mangling flags. Don't
  928. warn about real-valued template parameters here. Do handle
  929. complex expressions involving real-valued template parameters.
  930. (build_template_parm_names): Encase non-type template parameters
  931. in underscores, if necessary.
  932. (process_overload_item): Remove conditional on
  933. PARM_CAN_BE_ARRAY_TYPE.
  934. 1999-10-17 Mark Mitchell <mark@codesourcery.com>
  935. * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
  936. * ir.texi: Clean up documentation of RETURN_INIT.
  937. 1999-10-15 Greg McGary <gkm@gnu.org>
  938. * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
  939. (lang_init): Set default for flag_bounds_check if still "unspecified".
  940. 1999-10-13 Andrew Haley <aph@cygnus.com>
  941. * class.c (finish_struct_1): Force alignment of non-bitfields to
  942. BITS_PER_UNIT.
  943. Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
  944. * typeck2.c (process_init_constructor): Handle empty constructors.
  945. 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
  946. * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
  947. * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
  948. array error.
  949. 1999-10-13 Mark Mitchell <mark@codesourcery.com>
  950. * decl.c (make_rtl_for_local_static): Don't create register RTL
  951. for addressable constants.
  952. 1999-10-13 Nathan Sidwell <nathan@acm.org>
  953. * cp-tree.h (build_x_va_arg): Prototype new function.
  954. * call.c (build_x_va_arg): Define it.
  955. * parse.y (unary_expr): Call build_x_va_arg.
  956. * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
  957. * call.c (convert_type_from_ellipsis): Define it.
  958. * decl.c (init_decl_processing): Set lang_type_promotes_to.
  959. * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
  960. 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
  961. * class.c (fixed_type_or_null): Always set *nonnull.
  962. 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  963. * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
  964. __GNUC__ and __GNUC_MINOR__.
  965. 1999-10-09 Mark Mitchell <mark@codesourcery.com>
  966. * cp-tree.h (make_rtl_for_local_static): New function.
  967. * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
  968. local statics ...
  969. (make_rtl_for_local_static): Here.
  970. * semantics.c (expand_stmt): Use make_rtl_for_local_static.
  971. 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  972. * method.c: Include tm_p.h.
  973. 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
  974. * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
  975. * lex.c (cp_make_lake_type): Likewise.
  976. * tree.c (init_tree): Init make_lang_type_fn.
  977. 1999-10-07 Mark Mitchell <mark@codesourcery.com>
  978. * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
  979. parameter.
  980. * semantics.c (expand_stmt): Don't pretend to have asmspecs for
  981. local statics if we don't really have them.
  982. * ir.texi: Improve documentation for STMT_EXPR. Describe
  983. CLEANUP_POINT_EXPR.
  984. 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
  985. * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
  986. 1999-10-07 Greg McGary <gkm@gnu.org>
  987. * class.c (finish_struct_1): Use simpler method of
  988. removing elements of a singly-linked list which doesn't
  989. lose for classes without data members.
  990. 1999-10-07 Mark Mitchell <mark@codesourcery.com>
  991. * friend.c (make_friend_class): Robustify.
  992. * semantics.c (finish_object_call_expr): Reject calls to template
  993. types.
  994. 1999-10-06 Mark Mitchell <mark@codesourcery.com>
  995. * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
  996. * cp-tree.h (CLASSTYPE_VFIELD): Remove.
  997. * call.c (build_vfield_ref): Use TYPE_VFIELD, not
  998. CLASSTYPE_VFIELD.
  999. * class.c (get_vfield_offset): Likewise.
  1000. (finish_base_struct): Likewise.
  1001. (modify_one_vtable): Likewise.
  1002. (fixup_vtable_deltas): Likewise.
  1003. (finish_struct_1): Likewise.
  1004. * init.c (expand_virtual_init): Likewise.
  1005. * search.c (lookup_field_1): Likewise.
  1006. (expand_upcast_fixups): Likewise.
  1007. * typeck.c (build_component_ref): Likewise.
  1008. (build_binary_op_nodefault): Likewise.
  1009. * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
  1010. * ir.texi: Document TYPE_VFIELD.
  1011. 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
  1012. * decl.c (grokdeclarator): Only warn about nonzero arrays if
  1013. !in_system_header (linux socketbits.h can give this for
  1014. __cmsg_data, which is using a GNU extension).
  1015. 1999-10-05 Mark Mitchell <mark@codesourcery.com>
  1016. * decl2.c (start_static_storage_duration_function): Push the
  1017. function declaration so it ends up in namespace scope.
  1018. * dump.c (DUMP_CHILDREN): Remove.
  1019. (DUMP_BINFO): Adjust.
  1020. (struct dump_node_info): Remove dump_children_p.
  1021. (queue_and_dump_type): Remove dump_children_p parameter.
  1022. (queue): Don't set dump_children_p.
  1023. (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
  1024. queue_and_dump_index.
  1025. (dequeue_and_dump): Unconditionally print children. Adjust calls
  1026. to functions mentioned above.
  1027. (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
  1028. * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
  1029. * dump.c (dequeue_and_dump): Dump them.
  1030. * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
  1031. * decl.c (start_function): Set current_in_charge_parm for
  1032. constructors, too, where appropriate.
  1033. * search.c (fixup_all_virtual_upcast_offsets): New function.
  1034. (expand_indirect_vtbls_init): Use it.
  1035. 1999-10-04 Nathan Sidwell <nathan@acm.org>
  1036. * decl2.c (grok_alignof): Don't decay lvalues.
  1037. * init.c (build_new): Remove unused variable.
  1038. 1999-10-04 Mark Mitchell <mark@codesourcery.com>
  1039. * cp-tree.h (struct language_function): Remove static_labelno.
  1040. (static_labelno): Remove macro.
  1041. * method.c (build_overload_nested_name): Make static_labelno
  1042. static here.
  1043. * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
  1044. to decide whether or not a function is defined.
  1045. * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
  1046. situations where make_node will do it automatically.
  1047. * decl.c (grok_reference_init): Likewise.
  1048. (expand_static_init): Likewise.
  1049. (do_static_initialization): Likewise.
  1050. * init.c (perform_member_init): Likewise.
  1051. (expand_aggr_init_1): Likewise.
  1052. (build_new_1): Likewise.
  1053. * method.c (do_build_copy_constructor): Likewise.
  1054. (do_build_assign_ref): Likewise.
  1055. * search.c (expand_upcast_fixups): Likewise.
  1056. * semantics.c (finish_stmt_expr): Likewise.
  1057. * typeck.c (build_unary_op): Likewise.
  1058. (check_return_expr): Likewise.
  1059. 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
  1060. * init.c (build_vec_delete_1): Fold COND_EXPRs.
  1061. 1999-10-03 Mark Mitchell <mark@codesourcery.com>
  1062. * cp-tree.def (VEC_INIT_EXPR): Remove.
  1063. * cp-tree.h (struct stmt_tree): New type.
  1064. (struct saved_scope): Remove firstobj. Add x_saved_tree,
  1065. x_stmt_tree.
  1066. (class_cache_firstobj): Remove.
  1067. (struct language_function): Remove stmts_are_full_exprs_p,
  1068. x_last_tree, and x_last_expr_type. Add x_stmt_tree.
  1069. (current_stmt_tree): New macro.
  1070. (last_tree): Adjust.
  1071. (last_expr_type): Likewise.
  1072. (doing_semantic_analysis_p): Simplify.
  1073. (stmts_are_full_exprs_p): Adjust.
  1074. (begin_tree): Remove prototype.
  1075. (end_tree): Likewise.
  1076. (begin_stmt_tree): Change prototype.
  1077. (finish_stmt_tree): Likewise.
  1078. (building_stmt_tree): Simplify.
  1079. * decl.c (mark_stmt_tree): New function.
  1080. (mark_saved_scope): Use it.
  1081. (start_function): Rearrange slightly to call begin_stmt_tree
  1082. earlier.
  1083. (save_function_data): Tweak.
  1084. (finish_function): Adjust call to finish_stmt_tree.
  1085. (mark_lang_function): Use mark_stmt_tree.
  1086. * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
  1087. * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
  1088. (build_vec_init): Remove creation of stand-in initializer.
  1089. * pt.c (begin_tree): Remove.
  1090. (end_tree): Likewise.
  1091. * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
  1092. (begin_compound_stmt): Handle a compound-statement outside of a
  1093. function.
  1094. (begin_stmt_expr): Handle a statement-expression outsidef of a
  1095. function.
  1096. (finish_stmt_expr): Likewise.
  1097. (begin_class_definition): Don't call begin_tree.
  1098. (finish_inline_definitions): Don't call end_tree.
  1099. (begin_stmt_tree): Take a pointer to tree, not a function as input.
  1100. (finish_stmt_tree): Likewise.
  1101. * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
  1102. (mapcar): Likewise.
  1103. * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
  1104. * parse.c: Regenerated.
  1105. * dump.c (dqueue_and_dump): Dump bitfieldness.
  1106. * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
  1107. bitfields, rather than DECL_BIT_FIELD.
  1108. * ir.texi: Document how to tell whether or not a field is a
  1109. bitfield.
  1110. * lex.c (make_lang_type): Fix typo in comment.
  1111. 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
  1112. * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
  1113. 1999-10-01 Mark Mitchell <mark@codesourcery.com>
  1114. * pt.c (tsubst_decl): If the type of a template instantiation is
  1115. bogus, so is the whole instantiation.
  1116. 1999-09-30 Mark Mitchell <mark@codesourcery.com>
  1117. * decl.c (initialize_local_var): Handle static variables here.
  1118. (cp_finish_decl): Tweak handling of function-scope static
  1119. variables.
  1120. * semantics.c (expand_stmt): Handle DECL_STMTs for static
  1121. variables.
  1122. * method.c (emit_thunk): Don't crash when -fsyntax-only.
  1123. * cp-tree.h (lang_decl_flags): Add global_ctor_p and
  1124. global_dtor_p. Add init_priority.
  1125. (DECL_ACCESS): Adjust accordingly.
  1126. (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
  1127. (GLOBAL_INIT_PRIORITY): Likewise.
  1128. * decl.c (lang_mark_tree): Adjust accordingly.
  1129. (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
  1130. and GLOBAL_INIT_PRIORITY.
  1131. * dump.c (dequeue_and_dump): Print them.
  1132. * ir.texi: Document them.
  1133. * decl2.c (struct priority_info_s): Remove initialization_sequence
  1134. and destruction_sequence.
  1135. (start_static_storage_duration_function): Return the body of the
  1136. function. Convert for function-at-a-time mode.
  1137. (generate_inits_for_priority): Remove.
  1138. (finish_static_storage_duration_function): Change prototype.
  1139. Adjust for function-at-a-time mode.
  1140. (do_static_initialization): Likewise.
  1141. (do_static_destruction): Likewise.
  1142. (do_static_initialization_and_destruction): Remove.
  1143. (start_static_initialization_or_destruction): New function.
  1144. (finish_static_initialization_or_destruction): Likewise.
  1145. (get_priority_info): Don't manipulation initialization_sequence or
  1146. destruction_sequence.
  1147. (prune_vars_needing_no_initialization): New function.
  1148. (write_out_vars): Likewise.
  1149. (finish_file): Use the various new functions instead of the old.
  1150. Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
  1151. * cp-tree.h (warn_float_equal): Declare.
  1152. * decl2.c (warn_float_equal): Define.
  1153. (lang_decode_option): Recognize -W[no-]float-equal.
  1154. * typeck.c (build_binary_op_nodefault): Conditionally warn
  1155. about equality tests of floating point types.
  1156. 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
  1157. Support normal type_info-based EH mechanisms with -fno-rtti.
  1158. * except.c (build_eh_type_type): Remove special -fno-rtti handling.
  1159. (build_eh_type_type_ref): Likewise.
  1160. (build_eh_type): Remove.
  1161. (expand_throw): Call build_eh_type_type, not build_eh_type.
  1162. * decl2.c (import_export_decl): Don't associate the tinfo fn with
  1163. the vtable if -fno-rtti.
  1164. * decl.c (init_decl_processing): Always init_rtti_processing.
  1165. * rtti.c (get_typeid): Don't complain about -fno-rtti.
  1166. * class.c (class_cache_obstack, class_obstack): Remove.
  1167. (init_class_processing): Don't initialize class_obstack.
  1168. (push_cache_obstack): Remove.
  1169. (pushclass): Don't call it.
  1170. * cp-tree.h: Remove prototype for push_cache_obstack.
  1171. * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
  1172. (pushlevel_class): Don't push_decl_level.
  1173. (poplevel_class): Don't pop_stack_level.
  1174. (push_class_level_binding): Don't push_cache_obstack.
  1175. (init_decl_processing): Don't initialize decl_obstack.
  1176. * search.c (push_class_decls): Don't push_cache_obstack.
  1177. * tree.c (list_hash_add): Put hash node on permanent_obstack.
  1178. (hash_tree_cons): Don't mess with obstacks.
  1179. (print_lang_statistics): Don't print stats for class_obstack and
  1180. decl_obstack.
  1181. 1999-09-29 Mark Mitchell <mark@codesourcery.com>
  1182. * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
  1183. * ir.texi: Document DECL_EXTERNAL.
  1184. * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
  1185. * ir.texi: Document THUNK_DECLs.
  1186. * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
  1187. (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
  1188. (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
  1189. * error.c (dump_template_bindings): Remove unused parameter.
  1190. Handle multiple levels of template parameters.
  1191. (dump_template_decl): Use `parms', not `args', for template
  1192. parameters. Fix thinko.
  1193. (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
  1194. flags to dump_template_bindings.
  1195. * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
  1196. (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
  1197. (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
  1198. (tsubst_copy): Clarify variable name.
  1199. (most_general_template): Robustify.
  1200. 1999-09-29 Nathan Sidwell <nathan@acm.org>
  1201. * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
  1202. to change primary template rendering.
  1203. 1999-09-29 Mark Mitchell <mark@codesourcery.com>
  1204. * cp-tree.h (UPT_TEMPLATE): Remove.
  1205. (UPT_PARMS): Likewise.
  1206. (DECL_NEEDED_P): New macro.
  1207. * decl2.c (finish_vtable_vardecl): Use it.
  1208. (finish_objects): Don't crash with -fsyntax-only.
  1209. (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
  1210. -fsyntax-only.
  1211. * pt.c (tsubst_friend_function): Remove FIXME that talks about
  1212. obstacks.
  1213. (tsubst_expr): Correct handling of function try-blocks.
  1214. * semantics.c: Include flags.h.
  1215. (expand_body): Don't do RTL generation if -fsyntax-only.
  1216. * Makefile.in (semantics.o): Depends on flags.h.
  1217. 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
  1218. * pt.c (most_general_template): Adjust declaration.
  1219. * cp-tree.h: (most_general_template): Declare.
  1220. * error.c (dump_template_value): Rename to ...
  1221. (dump_template_argument): This.
  1222. (dump_template_argument_list): New function.
  1223. (dump_type): Use it.
  1224. (dump_template_parameter): New function.
  1225. (dump_template_decl): Use it.
  1226. (dump_template_bindings): New function.
  1227. (dump_function_decl): Use it. Pretty print function template
  1228. instantiations.
  1229. 1999-09-28 Nathan Sidwell <nathan@acm.org>
  1230. * decl.c (grokdeclarator): Distinguish parameter context for
  1231. diagnostics. Tidy up missing type diagnostic.
  1232. Diagnose `explicit' in one place. Diagnose `mutable' in one place.
  1233. 1999-09-28 Mark Mitchell <mark@codesourcery.com>
  1234. * ir.texi: Improve documentation for TARGET_EXPR.
  1235. 1999-09-27 Nathan Sidwell <nathan@acm.org>
  1236. Augment stringification of trees.
  1237. * cp-tree.h (tree_string_flags): New error stringifying enumeration.
  1238. (fndecl_as_string, type_as_string_real, args_as_string,
  1239. code_as_string, language_as_string, parm_as_string,
  1240. op_as_string, assop_as_string, cv_as_string): Remove.
  1241. (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
  1242. (context_as_string): Declare new function.
  1243. * error.c (cp_printers): Move definition.
  1244. (OB_UNPUT): Remove.
  1245. (OB_END_TEMPLATE_ID): Adjust.
  1246. (interesting_scope_p): Remove.
  1247. (dump_scope): New static function.
  1248. (dump_qualifiers): Adjust prototype, reimplement.
  1249. (dump_template_value): Use tree_string_flags.
  1250. (dump_type_real): Move back to dump_type.
  1251. (dump_type): Adjust prototype. Use tree_string_flags.
  1252. (dump_aggr_type): Likewise. Use dump_template_parms.
  1253. (dump_type_prefix): Adjust prototype. Use tree_string_flags.
  1254. Return pad flag.
  1255. (dump_type_suffix): Adjust prototype. Use tree_string_flags.
  1256. (dump_simple_decl): Likewise.
  1257. (dump_decl): Likewise. Use dump_template_decl.
  1258. (dump_template_decl): New static function broken out of dump_decl.
  1259. (dump_function_decl): Adjust prototype. Use tree_string_flags.
  1260. (dump_parameters): Likewise. Prefix space.
  1261. (dump_exception_spec): Adjust prototype. Use tree_string_flags.
  1262. (dump_function_name): Likewise. Use dump_template_parms.
  1263. (dump_template_parms): New static function broken out of
  1264. dump_function_name.
  1265. (dump_expr_list): Adjust prototype. Use tree_string_flags.
  1266. (dump_expr): Likewise.
  1267. (fndecl_as_string): Removed
  1268. (type_as_string_real): Removed
  1269. (dump_binary_op): Adjust prototype. Use tree_string_flags.
  1270. (dump_unary_op): Likewise.
  1271. (type_as_string): Likewise.
  1272. (expr_as_string): Likewise.
  1273. (decl_as_string): Likewise.
  1274. (context_as_string): New function.
  1275. (lang_decl_name): Adjust.
  1276. (decl_to_string): New static print callback.
  1277. (expr_to_string): Likewise.
  1278. (fndecl_to_string): Likewise.
  1279. (code_as_string): Renamed to ...
  1280. (code_to_string): ... here. Adjust.
  1281. (language_as_string): Renamed to ...
  1282. (language_to_string): ... here. Adjust.
  1283. (parm_as_string): Renamed to ...
  1284. (parm_to_string): ... here.
  1285. (op_as_string): Renamed to ...
  1286. (op_to_string): ... here.
  1287. (assop_as_string): Renamed to ...
  1288. (assop_to_string): ... here.
  1289. (type_to_string): New static print callback.
  1290. (args_as_string): Renamed to ...
  1291. (args_to_string): ... here. Adjust.
  1292. (cv_as_string): Renamed to ...
  1293. (cv_to_string): ... here. Adjust.
  1294. * pt.c (mangle_class_name_for_template): Use tree_string_flags.
  1295. (print_template_context): Likewise.
  1296. 1999-09-26 Mark Mitchell <mark@codesourcery.com>
  1297. * cp-tree.h (expand_throw): Remove prototype.
  1298. * except.c (expand_throw): Make it static. Use tree-generation
  1299. functions, rather than RTL-generation functions.
  1300. (build_throw): Use it.
  1301. * expr.c: Include except.h.
  1302. (cplus_expand_expr): Don't call expand_throw here.
  1303. * Makefile.in (expr.o): Depend on except.h.
  1304. * ir.texi: Update documentation for THROW_EXPR.
  1305. * decl.c (start_function): Set x_dont_save_pending_sizes rather
  1306. than calling get_pending_sizes.
  1307. * init.c (build_new): Don't save and restore
  1308. immediate_size_expand; instead, assert that it has the expected
  1309. value already.
  1310. 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1311. * lex.c (compiler_error): Add missing call to va_end().
  1312. 1999-09-25 Mark Mitchell <mark@codesourcery.com>
  1313. * dump.c (dequeue_and_dump): Handle RESULT_DECL.
  1314. * ir.texi: Document RESULT_DECL and DECL_RESULT.
  1315. * cp-tree.h (check_return_expr): New function.
  1316. * decl.c (finish_constructor_body): New function.
  1317. (pushdecl): Put global friend functions in namespace binding
  1318. level, not the class binding level.
  1319. (finish_destructor_body): Make sure the dtor_label is always
  1320. defined. Fix typo in comment.
  1321. (finish_function): Move generation of constructor-termination code
  1322. to semantic-analysis time. Move generation of implicit `main'
  1323. return value to semantic-analysis time.
  1324. * semantics.c (finish_return_stmt): Generate goto's to
  1325. ctor_label/dtor_label here. Use check_return_expr to do semantic
  1326. analysis on the returned expression.
  1327. * typeck.c (maybe_warn_about_returning_address_of_local): New
  1328. function split out from c_expand_return.
  1329. (check_return_expr): Likewise.
  1330. (c_expand_return): Just generate the RTL for the return.
  1331. 1999-09-24 Mark Mitchell <mark@codesourcery.com>
  1332. * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
  1333. (cleanup_type): Likewise.
  1334. (search_tree): Change prototype.
  1335. * decl.c (local_variable_p): Adjust for new interface to
  1336. search_tree.
  1337. (check_default_argument): Likewise.
  1338. * error.c (dump_expr): Handle INIT_EXPR.
  1339. * except.c (expand_throw): Don't make cleanup_type a local static.
  1340. * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
  1341. * init.c (build_new): Call build_new_1 directly, rather than
  1342. building a NEW_EXPR.
  1343. (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
  1344. processing file-scope initializers.
  1345. * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
  1346. * tree.c: Include splay-tree.h
  1347. (no_linkage_helper): Adjust for new interface to search_tree.
  1348. (search_tree): Pass around pointers to tree nodes, rather than the
  1349. nodes themselves. Handle VEC_INIT_EXPR.
  1350. (no_linkage_check): Adjust for new interface to search_tree.
  1351. (mapcar): Handle VEC_INIT_EXPR.
  1352. (target_remap): New variable.
  1353. (bot_manip): Use it.
  1354. (bot_replace): New function.
  1355. (break_out_target_exprs): Use it to remap all variables used in a
  1356. default argument expression.
  1357. * typeck.c (build_modify_expr): Don't crash when outside a
  1358. function and presented with an INIT_EXPR assignment
  1359. * Makefile.in (tree.o): Depend on splay-tree.h.
  1360. Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
  1361. * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
  1362. DECL_BUILT_IN.
  1363. (builtin_function): New arg CLASS. Arg CODE now of type int. All
  1364. callers changed.
  1365. Set the builtin's DECL_BUILT_IN_CLASS.
  1366. 1999-09-24 Mark Mitchell <mark@codesourcery.com>
  1367. * decl.c (pushdecl): Don't make local declarations of extern
  1368. variables give the variable a DECL_CONTEXT for the function.
  1369. (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
  1370. Don't accidentally make RTL for local declarations.
  1371. (emit_local_var): Handle declarations with asm-specifiers here.
  1372. 1999-09-23 Mark Mitchell <mark@codesourcery.com>
  1373. * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
  1374. STMT_IS_FULL_EXPR_P.
  1375. * cp-tree.h (language_function): Add cannot_inline.
  1376. * decl.c (start_function): Restore current_function_cannot_inline
  1377. from the saved value.
  1378. (save_function_data): Save current_function_cannot_inline.
  1379. * decl2.c (start_objects): Change prototype. Build the function
  1380. in function-at-a-time mode.
  1381. (finish_objects): Likewise.
  1382. (generate_ctor_or_dtor_function): Adjust accordingly.
  1383. * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
  1384. * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
  1385. Don't call expand_anon_union_decl here
  1386. * semantics.c (exapnd_stmt): Call it here, instead.
  1387. * typeck.c (mark_addressable): Addressed variables are implicitly
  1388. used.
  1389. 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
  1390. * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
  1391. (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
  1392. (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
  1393. * cp-tree.h: Add tree checking macros to various tree access
  1394. macros.
  1395. * ptree.c (print_lang_decl): Test for function or variable
  1396. before accessing template info.
  1397. 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
  1398. * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
  1399. * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
  1400. * decl2.c (lang_f_options): Add -fshort-wchar.
  1401. * cp-tree.h: Declare flag_short_wchar.
  1402. * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
  1403. int' for wchar_t.
  1404. 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
  1405. * ir.texi: Fix formatting errors and typos.
  1406. 1999-09-22 Mark Mitchell <mark@codesourcery.com>
  1407. * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
  1408. * decl.c (pushdecl): Do create a binding for extern "C" functions,
  1409. but not for their DECL_ASSEMBLER_NAMEs.
  1410. (lookup_name_current_level): Fix formatting.
  1411. (xref_tag): Likewise.
  1412. * decl2.c (start_objects): Mark static constructors and
  1413. destructors as used.
  1414. 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
  1415. * decl.c (define_case_label): Don't crash if we're not in a switch.
  1416. * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
  1417. * lang-options.h: Restore -fthis-is-variable. Remove help strings
  1418. for unsupported flags.
  1419. 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
  1420. * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
  1421. Accept and warn about -fthis-is-variable.
  1422. 1999-09-21 Mark Mitchell <mark@codesourcery.com>
  1423. * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
  1424. CLEANUP_STMT, and SCOPE_STMT.
  1425. * decl2.c (lang_decode_option): Adjust, in the wake of recent
  1426. changes to option processing.
  1427. 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
  1428. * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
  1429. function pointer from pmfs with no object given.
  1430. (convert_for_assignment): Do not return error when converting
  1431. pmfs.
  1432. 1999-09-21 Alex Samuel <samuel@codesourcery.com>
  1433. * lex.c (internal_filename): New variable.
  1434. (INTERNAL_FILENAME): New macro.
  1435. (init_parse): Allocate internal_filename and mark as root. Use it
  1436. instead of a string constant.
  1437. 1999-09-21 Nathan Sidwell <nathan@acm.org>
  1438. Reimplement dynamic cast and catch matching.
  1439. * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
  1440. * search.c (dynamic_cast_base_recurse): New function.
  1441. (get_dynamic_cast_base_type): New function for dynamic cast.
  1442. * rtti.c (build_dynamic_cast_1): Determine source and target
  1443. class relationship. Call __dynamic_cast_2.
  1444. * tinfo.h (__user_type_info::upcast): New catch dispatcher.
  1445. (__user_type_info::dyncast): New dynamic cast dispatcher.
  1446. (__user_type_info::sub_kind): New nested enumeration.
  1447. (__user_type_info::contained_p): sub_kind predicate.
  1448. (__user_type_info::contained_public_p): Likewise.
  1449. (__user_type_info::contained_nonpublic_p): Likewise.
  1450. (__user_type_info::contained_nonvirtual_p: Likewise.
  1451. (__user_type_info::upcast_result): New nested struct.
  1452. (__user_type_info::dyncast_result): New nested struct.
  1453. (*::do_upcast): New catch function.
  1454. (*::do_dyncast): New dynamic cast function.
  1455. (__user_type_info::find_public_subobj): New dynamic cast
  1456. helper dispatcher.
  1457. (*::do_find_public_subobj): New dynamic cast helper function.
  1458. * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
  1459. (__user_type_info::dyncast): Define dynamic cast dispatcher.
  1460. (*::do_upcast): Define catch function.
  1461. (*::do_dyncast): Define dynamic cast function.
  1462. (*::do_find_public_subobj): Define dynamic cast helper function.
  1463. * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
  1464. (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
  1465. (__dynamic_cast_2): New dynamic cast runtime.
  1466. 1999-09-20 Mark Mitchell <mark@codesourcery.com>
  1467. * cp-tree.h (finish_stmt_expr): Change prototype.
  1468. * expr.c (cplus_expand_expr): Adjust call accordingly.
  1469. * init.c (finish_init_stmts): Likewise.
  1470. * parse.y (primary): Likewise.
  1471. * pt.c (tsubst_copy): Likewise.
  1472. * semantics.c (finish_stmt_expr): Don't take two parameters.
  1473. Don't remove generated BLOCKs from the block-tree.
  1474. Remove support for assigning to `this'.
  1475. * NEWS: Note that fact.
  1476. * class.c (build_vbase_path): Don't check flag_this_is_variable.
  1477. * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
  1478. (language_function): Remove assigns_this, just_assigned_this, and
  1479. x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
  1480. (base_init_expr): Remove.
  1481. (current_vcalls_possible_p): New macro.
  1482. (vtbls_set_up_p): Likewise.
  1483. (emit_base_init): Change prototype.
  1484. * decl.c (finish_destructor_body): New function, split out from
  1485. finish_function.
  1486. (current_function_assigns_this): Remove.
  1487. (current_function_just_assigned_this): Likewise.
  1488. (start_function): Don't set them.
  1489. (finish_function): Don't check them. Don't emit
  1490. base-initialization code here. Generate code for destructors when
  1491. doing semantic analysis.
  1492. (finish_stmt): Don't check current_function_just_assigned_this.
  1493. * decl2.c (lang_f_options): Remove this-is-variable.
  1494. (lang_decode_option): Likewise.
  1495. (grokclassfn): Don't check flag_this_is_variable.
  1496. * init.c (emit_base_init): Return the expression generated.
  1497. (construct_virtual_bases): Don't push/pop obstacks. Fix
  1498. typo.
  1499. (build_new_1): Don't check flag_this_is_variable.
  1500. (get_temp_regvar): Don't set DECL_REGISTER.
  1501. (build_vec_init): Don't call use_variable.
  1502. * lang-options.h: Remove "-fthis-is-variable" and
  1503. "-fno-this-is-variable".
  1504. * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
  1505. * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
  1506. expand_expr_stmt.
  1507. * semantics.c (finish_expr_stmt_real): Rename to ...
  1508. (finish_expr_stmt): This. Remove assigned_this parameter.
  1509. (begin_if_stmt): Call do_pushlevel before starting the statement.
  1510. (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
  1511. blocks.
  1512. (setup_vtbl_ptr): Emit initialization code for bases and members
  1513. at semantic-analysis time. Emit code to initialize vtables in
  1514. destructors here.
  1515. (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
  1516. Don't handle CTOR_INITIALIZER any more.
  1517. * typeck.c (build_modify_expr): Don't check for assignments to
  1518. this.
  1519. (c_expand_return): Don't suggest assigning to `this'.
  1520. * Makefile.in (decl.o): Depend on RTL_H.
  1521. (decl2.o): Likewise.
  1522. (class.o): Likewise.
  1523. (call.o): Likewise.
  1524. (method.o): Likewise.
  1525. (search.o): Likewise.
  1526. (tree.o): Likewise.
  1527. (pt.o): Likewise.
  1528. * decl.c (duplicate_decls): When a builtin function is redeclared
  1529. as static, make sure it is mangled correctly.
  1530. * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
  1531. detail about the statement-tree.
  1532. 1999-09-20 Nathan Sidwell <nathan@acm.org>
  1533. * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
  1534. 1999-09-20 Nick Clifton <nickc@cygnus.com>
  1535. * decl2.c (lang_decode_option): Extend comment.
  1536. Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
  1537. * typeck.c: Include "tm_p.h".
  1538. 1999-09-19 Mark Mitchell <mark@codesourcery.com>
  1539. * ir.texi: New file.
  1540. 1999-09-19 Paul Burchard <burchard@pobox.com>
  1541. * semantics.c (expand_stmt): Initialize return value.
  1542. 1999-09-18 Paul Burchard <burchard@pobox.com>
  1543. * gxxint.texi: G++ now implements namespaces.
  1544. 1999-09-18 Mark Mitchell <mark@codesourcery.com>
  1545. * decl.c (pop_label): Don't warn about unused labels more than
  1546. once.
  1547. * semantics.c (finish_goto_stmt): Always marked used labels as
  1548. used.
  1549. * decl.c (layout_var_decl): Change prototype. Call layout_decl
  1550. even when the declaration is external.
  1551. (cp_finish_decl): Adjust call to layout_var_decl.
  1552. * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
  1553. 1999-09-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
  1554. * typeck.c (get_member_function_from_ptrfunc): Always consider
  1555. virtuality inside member pointer.
  1556. 1999-09-17 Mark Mitchell <mark@codesourcery.com>
  1557. Turn on function-at-a-time processing.
  1558. * cp-tree.h (doing_semantic_analysis_p): New macro.
  1559. (SF_DEFAULT): Define to zero, not SF_EXPAND.
  1560. (start_handler_parms): Change prototype.
  1561. (expand_start_catch_block): Likewise.
  1562. (expand_end_catch_block): Likewise.
  1563. (expand_start_eh_spec): Likewise.
  1564. (expand_end_eh_spec): Declare.
  1565. (finish_handler_parms): Change prototype.
  1566. (begin_catch_block): Declare.
  1567. (finish_handler): Change prototype.
  1568. (do_pushlevel): Declare.
  1569. (do_poplevel): Likewise.
  1570. * decl.c (pushlevel): Don't create
  1571. binding levels when not doing semantic analysis.
  1572. (poplevel): Don't pop them.
  1573. (pushdecl): Assert that we are never called when not doing
  1574. semantic analysis.
  1575. (pushdecl_top_level): Use push_to_top_level.
  1576. (make_label_decl): Don't fiddle with obstacks. Make RTL For the
  1577. label when expanding.
  1578. (cp_finish_decl): Only inject for-scope variables when doing
  1579. semantic analysis. Add comments.
  1580. (start_handler_parms): Return the handler parm.
  1581. (start_function): Reorganize. Don't clear DECL_INITIAL if it is
  1582. already set. Reinitialize from saved function data if available.
  1583. Don't pushlevel when not doing semantic analysis.
  1584. (store_parm_decls): Only generate RTL when expanding. Only
  1585. pushdecl when doing semantic analysis. Set
  1586. current_eh_spec_try_block if appropriate.
  1587. (finish_function): Simplify. Use do_pushlevel and do_poplevel.
  1588. Combine common code. Don't poplevel when not doing semantic
  1589. analysis.
  1590. (push_cp_function_context): Don't expand functions without an
  1591. explicit call to expand_body.
  1592. (mark_lang_function): Make eh_spec_try_block and
  1593. x_scope_stmt_stack.
  1594. * except.c (expand_end_eh_spec): Don't
  1595. declare.
  1596. (process_start_catch_block): Likewise.
  1597. (push_eh_cleanup): Use finish_decl_cleanup.
  1598. (initialize_handler_parm): New function.
  1599. (expand_start_catch_block): Use it.
  1600. (expand_end_catch_block): Use tree-generation functions, not
  1601. RTL-generation functions.
  1602. (expand_start_eh_spec): Likewise.
  1603. (expand_end_eh_spec): Likewise.
  1604. (expand_exception_blocks): Simplify.
  1605. (start_anon_func): Use do_pushlevel.
  1606. (end_anon_func): Use do_poplvel. Call expand_body for the
  1607. function.
  1608. * expr.c (do_case): Don't call define_case_label.
  1609. * init.c (create_temporary_var): Set DECL_CONTEXT for local
  1610. variables.
  1611. * method.c (emit_thunk): Call expand_body for the
  1612. thunk.
  1613. (sythesize_method): Likewise.
  1614. * parse.y (handler_args): Give it ttype.
  1615. (eat_saved_input): Call expand_body.
  1616. (base_init): Use do_pushlevel.
  1617. (pending_inline): Call expand_body.
  1618. (handler): Adjust calls to finish_handler_parms and
  1619. finish_handler.
  1620. (handler_args): Don't call expand_start_catch_block. Return the
  1621. catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
  1622. * parse.c: Regenerated.
  1623. * rtti.c (synthesize_tinfo_fn): Call finish_function.
  1624. * semantics.c (do_pushlevel): Give it external linkage. Build
  1625. SCOPE_STMTs.
  1626. (do_poplevel): Likewise.
  1627. (finish_case_label): Call define_case_label when doing semantic
  1628. analysis.
  1629. (finish_goto_stmt): Create RTL for labels.
  1630. (finish_function_try_block): Set in_function_try_handler
  1631. unconditionally.
  1632. (finish_function_handler_sequence): Unset it.
  1633. (finish_handler_parms): Use expand_start_catch_block even when
  1634. building a statement-tree.
  1635. (begin_catch_block): New function.
  1636. (finish_handler): Move a little RTL-generation logic here.
  1637. (finish_decl_cleanup): Allow cleanups for empty declarations.
  1638. (finish_named_return_value): Don't pushdecl when not doing
  1639. semantic analysis.
  1640. (expand_stmt): Don't do semantic analysis for variable
  1641. declarations. Handle START_CATCH_STMT. Call expand_label
  1642. directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
  1643. HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
  1644. (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
  1645. RETURN_INIT and function try blocks.
  1646. * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
  1647. x_scope_stmt_stack. Add x_in_charge_parm.
  1648. (current_eh_spec_try_block): New macro.
  1649. (current_scope_stmt_stack): Likewise.
  1650. (current_in_charge_parm): Likewise.
  1651. * decl.c (start_function): Initialize current_in_charge_parm.
  1652. (finish_function): Use current_in_charge_parm rather than looking
  1653. up __in_chrg.
  1654. * search.c (expand_indirect_vtbls_init): Likewise.
  1655. * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
  1656. (TRY_BLOCK): Likewise.
  1657. (HANDLER): Likewise.
  1658. (START_CATCH_STMT): New tree node.
  1659. (SCOPE_STMT): Likewise.
  1660. * cp-tree.h (SCOPE_BEGIN_P): New macro.
  1661. (SCOPE_NULLIFIED_P): Likewise.
  1662. (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
  1663. (struct lang_decl): Add saved_language_function.
  1664. (DECL_PENDING_INLINE_INFO): Adjust documentation.
  1665. (DECL_PENDING_INLINE_P): New macro.
  1666. (TYPE_TI_ARGS): Fix typo in comment.
  1667. (DECL_SAVED_TREE): Add to documentation.
  1668. (DECL_SAVED_FUNCTION_DATA): New macro.
  1669. (START_CATCH_TYPE): Likewise.
  1670. (SCOPE_END_P): New macro.
  1671. (declare_parm_level): Don't declare.
  1672. * decl.c (mark_lang_function): New function, split out from
  1673. mark_cp_function_context.
  1674. (save_function_data): New function.
  1675. (declare_parm_level): Remove.
  1676. (finish_function): Use save_function_data to squirrel away
  1677. important stuff for later use.
  1678. (mark_cp_function_context): Use mark_function_data.
  1679. (lang_mark_tree): Likewise.
  1680. * lex.c (begin_definition_of_inclass_inline): Set
  1681. DECL_PENDING_INLINE_P.
  1682. (store_pending_inline): Clear it.
  1683. * pt.c (tsubst_decl): Likewise.
  1684. 1999-09-17 Nathan Sidwell <nathan@acm.org>
  1685. * call.c (perform_implicit_conversion): Deal with error_mark_node.
  1686. 1999-09-17 Mark Mitchell <mark@codesourcery.com>
  1687. * decl.c (warn_extern_redeclared_static): Don't get confused by
  1688. static member functions.
  1689. (duplicate_decls): Merge DECL_THIS_STATIC.
  1690. * decl.c (expand_static_init): Make sure assignments to local
  1691. statics actually occur.
  1692. 1999-09-17 Mark Mitchell <mark@codesourcery.com>
  1693. * cp-tree.h (poplevel_class): Declare.
  1694. * class.c (popclass): Use poplevel_class, not poplevel.
  1695. * decl.c (poplevel_class): Don't make it static. Don't return a
  1696. value.
  1697. (poplevel): Don't call poplevel_class; abort in a class
  1698. binding level is seen.
  1699. * semantics.c (finish_translation_unit): Use pop_everything.
  1700. * parse.y (member_init): Allow errors.
  1701. (pending_inline): Call finish_function.
  1702. * parse.c: Regenerated.
  1703. * Makefile.in (CONFLICTS): Adjust.
  1704. 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
  1705. * error.c: Reduce code duplication.
  1706. (dump_template_value): New function.
  1707. (dump_type_real): Use it.
  1708. (dump_decl): Likewise.
  1709. (dump_function_name): Likewise.
  1710. (dump_function_decl): Don't be too talkative about function return
  1711. type variety.
  1712. 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1713. * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
  1714. * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
  1715. 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
  1716. * decl2.c (finish_file): Also call check_global_declarations for
  1717. the pending_statics list.
  1718. 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
  1719. * lex.c (cp_pragma_implementation): Allow #pragma implementation
  1720. in header files.
  1721. 1999-09-15 Richard Henderson <rth@cygnus.com>
  1722. * lex.c (mark_impl_file_chain): Follow the next chain.
  1723. 1999-09-15 Mark Mitchell <mark@codesourcery.com>
  1724. * decl.c (warn_extern_redeclared_static): Simplify. Catch
  1725. problems with extern "C" functions redeclared as static.
  1726. (duplicate_decls): When a builtin is redeclared static, make the
  1727. new function have internal linkage.
  1728. 1999-09-15 Mark Mitchell <mark@codesourcery.com>
  1729. * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
  1730. * pt.c (tsubst_copy): Likewise.
  1731. * tree.c (search_tree): Likewise.
  1732. (mapcar): Likewise.
  1733. 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1734. * typeck2.c (ack): Don't declare progname.
  1735. 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
  1736. * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
  1737. filenames with ggc_alloc_string.
  1738. 1999-09-14 Mark Mitchell <mark@codesourcery.com>
  1739. * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
  1740. TARGET_EXPR.
  1741. * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
  1742. the TARGET_EXPR.
  1743. * cvt.c (build_up_reference): Likewise.
  1744. * tree.c (build_cplus_new): Likewise.
  1745. (get_target_expr): Likewise.
  1746. Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
  1747. * Makefile.in: Prepend $(SHELL) to move-if-change calls.
  1748. 1999-09-13 Mark Mitchell <mark@codesourcery.com>
  1749. * cp-tree.h (build_target_expr): New function.
  1750. * call.c (build_conditional_expr): Use build_target_expr.
  1751. (convert_like): Likewise.
  1752. (build_over_call): Likewise.
  1753. * cvt.c (build_up_reference): Likewise.
  1754. * decl.c (build_cleanup_on_safe_obstack): Fold into ...
  1755. (destroy_local_var): Here.
  1756. (build_target_expr): New function.
  1757. * tree.c (build_cplus_new): Use it.
  1758. (get_target_expr): Likewise.
  1759. 1999-09-13 Nathan Sidwell <nathan@acm.org>
  1760. * typeck.c (expr_sizeof): Don't decay arrays and functions.
  1761. Remove misleading comment.
  1762. (build_compound_expr): Don't decay arrays.
  1763. 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
  1764. * call.c (build_conditional_expr): Always use a TARGET_EXPR for
  1765. class rvalues again.
  1766. Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  1767. * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
  1768. * g++spec.c: Include gcc.h.
  1769. (lang_specific_driver): Constify a char*. Call xcalloc, not
  1770. xmalloc/bzero. All calls to the function pointer parameter now
  1771. explicitly call `fatal'.
  1772. 1999-09-12 Mark Mitchell <mark@codesourcery.com>
  1773. * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
  1774. * cvt.c (ocp_convert): Complete the from and destination types.
  1775. Adjust warning about functions always being `true' in conditionals.
  1776. * decl.c (duplicate_decls): Don't play funny games with abort.
  1777. * error.c (dump_expr): Handle OVERLOADs.
  1778. * spew.c (probe_obstack): Remove.
  1779. * typeck.c (condition_conversion): Use perform_implicit_conversion.
  1780. 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
  1781. * cp-tree.h (auto_function, define_function): Adjust prototypes.
  1782. * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
  1783. changed.
  1784. (auto_function): Likewise, for CODE arg.
  1785. Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
  1786. (builtin_function): ... here.
  1787. 1999-09-11 Mark Mitchell <mark@codesourcery.com>
  1788. * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
  1789. (init_decl_processing): Don't set TREE_PERMANENT for the
  1790. error_mark_node.
  1791. (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
  1792. (grokdeclarator): Likewise.
  1793. (grokparms): Don't check TREE_PERMANENT when building up lists.
  1794. * decl2.c (grokfield): Don't assert TREE_PERMANENT.
  1795. (mark_inline_for_output): Likewise.
  1796. * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
  1797. * init.c (build_offset_ref): Don't check TREE_PERMANENT.
  1798. * lex.c (check_newline): Don't check ggc_p; it is always one.
  1799. * pt.c (process_template_parm): Don't check TREE_PERMANENT.
  1800. * spew.c (yylex): Don't copy_node or probe_obstacks for
  1801. non-permanent CONSTANTs and STRINGs.
  1802. * tree.c (build_cplus_array_type_1): Don't fuss with
  1803. TREE_PERMANENT on ARRAY_TYPEs.
  1804. * cp-tree.def (CLEANUP_STMT): New node.
  1805. * cp-tree.h (language_function): Add name_declared.
  1806. (current_function_name_declared): New macro.
  1807. (CLEANUP_DECL): New macro.
  1808. (CLEANUP_EXPR): Likewise.
  1809. (emit_local_var): Likewise.
  1810. (finish_decl_cleanup): New function.
  1811. * cvt.c (build_up_reference): Simplify.
  1812. (ocp_convert): Remove dead code.
  1813. * decl.c (start_decl): Remove call to add_decl_stmt.
  1814. (grok_reference_init): Adjust, to handle bindings temporaries to
  1815. references. Remove dead code.
  1816. (initialize_local_var): Don't generate RTL for
  1817. declarations here, or build cleanups here. Don't fuss with
  1818. obstacks. Replace expand_start_target_temps calls with explicit
  1819. setting of stms_are_full_exprs_p.
  1820. (destroy_local_var): New function.
  1821. (emit_local_var): Likewise.
  1822. (cp_finish_decl): Use them, as appropriate.
  1823. (start_function): Announce template functions.
  1824. (store_parm_decls): Don't call declare_function_name here.
  1825. (finish_stmt): Don't start emit base-initialization code when just
  1826. building the statement-tree.
  1827. * init.c (create_temporary_var): Move add_decl_stmt call ...
  1828. (get_temp_regvar): Here.
  1829. * pt.c (tsubst_expr): Make DECL_INITIAL look like what
  1830. cp_finish_decl would expect. Don't call add_decl_stmt.
  1831. * semantics.c (begin_compound_stmt): Call declare_function_name,
  1832. if appropriate.
  1833. (finish_decl_cleanup): New function.
  1834. (expand_stmt): Use emit_local_var to output variables.
  1835. (expand_body): Set current_function_name_declared.
  1836. 1999-09-10 Mark Mitchell <mark@codesourcery.com>
  1837. * cp-tree.h (finish_cleanup_try_block): New function.
  1838. * semantics.c (finish_cleanup_try_block): Add comment.
  1839. Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
  1840. * cp-tree.h: Delete declarations for all tree nodes now moved to
  1841. global_trees.
  1842. * decl.c: Delete their definitions.
  1843. (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
  1844. FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
  1845. provide defaults.
  1846. (init_decl_processing): Call build_common_tree_nodes and
  1847. build_common_tree_nodes_2 instead of building their nodes here.
  1848. Don't add gc roots for them.
  1849. 1999-09-10 Mark Mitchell <mark@codesourcery.com>
  1850. * cp-tree.h (language_function): Rename expanding_p to
  1851. x_expanding_p. Rename named_label_uses to x_named_label_uses.
  1852. (expanding_p): Adjust accordingly.
  1853. (TREE_VIA_PRIVATE): Fix typo in comment.
  1854. (DECL_REFERENCE_SLOT): Remove.
  1855. (SET_DECL_REFERENCE_SLOT): Likewise.
  1856. * decl.c (named_label_uses): Adjust. Remove chicken comment.
  1857. (push_overloaded_decl): Don't truncate the chain of bindings when
  1858. adding an overloaded function.
  1859. (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
  1860. (initialize_local_var): Fix typo in comment.
  1861. (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
  1862. * decl2.c (start_objects): Make the fact that we are expanding
  1863. the generated function right away explicit.
  1864. (start_static_storage_duration_function): Likewise.
  1865. (finish_file): Fix typo in comment.
  1866. * init.c (build_vec_init): Correct bugs in handling cleanups.
  1867. * semantics.c (maybe_convert_cond): New function.
  1868. (FINISH_COND): Always store the condition, even if there's
  1869. a declaration.
  1870. (finish_if_stmt_cond): Use maybe_convert_cond.
  1871. (finish_while_stmt_cond): Likewise.
  1872. (finish_do_stmt): Likewise.
  1873. (finish_for_cond): Likewise.
  1874. (expand_cond): Adjust.
  1875. * cp-tree.h (FN_TRY_BLOCK_P): New macro.
  1876. * init.c (perform_member_init): Remove obstack machinations.
  1877. (expand_cleanup_for_base): Likewise.
  1878. (finish_init_stmts): Mark the statement-expression as used.
  1879. * method.c (emit_thunk): Use tree-generating functions, not
  1880. RTL.
  1881. (do_build_copy_constructor): Likewise.
  1882. (do_build_assign_ref): Likewise.
  1883. (synthesize_method): Likewise. Keep track of line numbers.
  1884. * pt.c (tsubst_expr): Handle various kinds of try blocks.
  1885. * semantics.c (expand_stmts): Remove.
  1886. (begin_function_try_block): Set FN_TRY_BLOCK_P.
  1887. (finish_function_try_block): Be careful rechaining
  1888. function try blocks.
  1889. (expand_stmt): Loop through all the statements at a given level.
  1890. (exapnd_body): Be careful with line-numbers here too. Prepare for
  1891. being called directly from the parser.
  1892. * cp-tree.h (finish_function): Adjust prototype.
  1893. * decl.c (finish_function): Return the function compiled.
  1894. * pt.c (instantiate_decl): Don't play games with obstacks.
  1895. * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
  1896. (search_tree): Likewise.
  1897. * typeck.c: Fix typo in comment.
  1898. * typeck2.c (store_init_value): Add comment.
  1899. * cp-tree.h (CPTI_ATEXIT): New macro.
  1900. (atexit_node): Likewise.
  1901. * decl.c (destroy_local_static): New function, broken out from ...
  1902. (expand_static_init): Here.
  1903. * rtti.c (get_tinfo_var): These should always be global
  1904. (expand_si_desc): Use tree, not RTL, functions to generate code.
  1905. (expand_class_desc): Likewise.
  1906. (expand_ptr_desc): Likewise.
  1907. (expand_attr_desc): Likewise.
  1908. (expand_generic_desc): Likewise.
  1909. (synthesize_tinfo_fn): Likewise.
  1910. 1999-09-09 Mark Mitchell <mark@codesourcery.com>
  1911. * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
  1912. (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
  1913. RECHAIN_STMTS.
  1914. (RECHAIN_STMST_FROM_CHAIN): Likewise.
  1915. * parse.y (simple_stmt): Fix typo in last change.
  1916. * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
  1917. (STMT_IS_FULL_EXPR_P): Likewise.
  1918. (STMT_LINENO_FOR_FN_P): Likewise.
  1919. (prep_stmt): New function.
  1920. (building_stmt_tree): Tweak for safety.
  1921. * pt.c (tsubst_expr): Use prep_stmt throughout.
  1922. (add_tree): Move it to semantics.c
  1923. * semantics.c (add_tree): Move it here.
  1924. (finish_expr_stmt_real): New function.
  1925. (finish_expr_stmt): Use it.
  1926. (finish_if_stmt_cond): Use FINISH_COND.
  1927. (finish_while_stmt_cond): Likewise.
  1928. (finish_for_cond): Likewise.
  1929. (finish_stmt_tree): Tweak line-number handling.
  1930. (prep_stmt): New function.
  1931. (expand_stmt): Use it.
  1932. * cp-tree.h (begin_switch_stmt): Adjust prototype.
  1933. (finish_switch_cond): Likewise.
  1934. * parse.y (simple_stmt): Adjust accordingly.
  1935. * parse.c: Regenerated.
  1936. * pt.c (tsubst_expr): Adjust accordingly.
  1937. * semantics.c (expand_cond): New function.
  1938. (FINISH_COND): New macro.
  1939. (begin_switch_stmt): Build the SWITCH_STMT here.
  1940. (finish_switch_stmt_cond): Not here.
  1941. (expand_stmt): Adjust calls to begin_switch_stmt and
  1942. finish_switch_cond. Use expand_cond throughout.
  1943. * dump.c (dequeue_and_dump): Dump types for constants.
  1944. Describe DECL_ARG_TYPE more intuitively.
  1945. Handle ARRAY_REF.
  1946. * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
  1947. (lang_cleanup_tree): Remove.
  1948. * lex.c (make_lang_type): Use ggc_alloc to allocate
  1949. TYPE_LANG_SPECIFIC.
  1950. Reorganize per-function data.
  1951. * cp-tree.h (saved_scope): Add function_decl, bindings.
  1952. (language_function): Rename binding_level to bindings.
  1953. (cp_function_chain): Use the current_function, not the
  1954. outer_function_chain.
  1955. (current_class_ptr): Make it work, even when there's no
  1956. current function.
  1957. (current_class_ref): Likewise.
  1958. (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
  1959. macros.
  1960. (clear_temp_name): Remove.
  1961. * decl.c (check_function_type): New function, broken out from
  1962. start_function.
  1963. (current_binding_level): Adjust definition.
  1964. (pushlevel): Simplify.
  1965. (poplevel): Don't use named_label_uses when we're outside
  1966. a function scope.
  1967. (mark_saved_scope): Mark function_decl and bindings.
  1968. (maybe_push_to_top_level): Don't unconditionally push a new
  1969. function context. Save bindings and the current_function_decl.
  1970. Don't clear named_labels.
  1971. (pop_from_top_level): Pop function context if appropriate.
  1972. (init_decl_processing): Set init_lang_status and free_lang_status,
  1973. rather than save_lang_status and restore_lang_status.
  1974. (start_function): Take SF_* flags. Don't clear per-function data.
  1975. Reorder and simplify to use new per-function data code. Add
  1976. asserts.
  1977. (store_parm_decls): Don't call init_function_start here.
  1978. (finish_function): Adjust for new handling of per-function data.
  1979. (push_cp_function_context): Simplify.
  1980. (mark_cp_function_context): Change binding_level to bindings.
  1981. * decl2.c (clear_temp_name): Remove.
  1982. (start_objects): Use SF flags to start_function.
  1983. (start_static_storage_duration_function): Likewise.
  1984. * except.c (start_anon_func): Remove redundant calls to
  1985. push_function_context_to. Use SF flags to start function.
  1986. (end_anon_func): Remove redundant call to pop_function_context
  1987. from.
  1988. * lex.c (reinit_parse_for_function): Don't initialize per-function
  1989. data.
  1990. * method.c (emit_thunk): Clear current_function after calling
  1991. assemble_end_function. Use SF flags for start_function.
  1992. (synthesize_method): Use SF flags for start_function.
  1993. * parse.c: Regenerated.
  1994. * parse.y (fn.defpen): Likewise.
  1995. (pending_inline): Clear current_function, even if something goes
  1996. wrong.
  1997. * pt.c (instantiate_decl): Use SF flags to start_function.
  1998. Don't save and restore expanding_p.
  1999. (add_tree): Handle the case where we are outside any function.
  2000. (end_tree): Likewise.
  2001. * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
  2002. * semantics.c (begin_function_definition): Likewise.
  2003. (expand_body): Likewise.
  2004. 1999-09-09 Nathan Sidwell <nathan@acm.org>
  2005. * cp-tree.h (convert_to_void): Prototype new function.
  2006. (require_complete_type_in_void): Remove prototype.
  2007. * cvt.c (convert_to_void): New function.
  2008. (ocp_convert): Use convert_to_void.
  2009. * decl.c (cplus_expand_expr_stmt): Likewise, for complete
  2010. expressions.
  2011. * typeck.c (require_complete_type_in_void): Remove function.
  2012. (build_compound_expr): Use convert_to_void.
  2013. (build_static_cast): Likewise.
  2014. (build_c_cast): Likewise.
  2015. * semantics.c (finish_expr_stmt): Do not decay full expressions.
  2016. * typeck.c (build_x_compound_expr): Add FIXME.
  2017. 1999-09-08 Mark Mitchell <mark@codesourcery.com>
  2018. * cp-tree.h (scratch_tree_cons): Remove.
  2019. * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
  2020. and perm_tree_cons with plain tree_cons.
  2021. * class.c: Likewise.
  2022. * decl.c: Likewise.
  2023. * decl2.c: Likewise.
  2024. * except.c: Likewise.
  2025. * expr.c: Likewise.
  2026. * init.c: Likewise.
  2027. * lex.c: Likewise.
  2028. * method.c: Likewise.
  2029. * parse.y: Likewise.
  2030. * pt.c: Likewise.
  2031. * repo.c: Likewise.
  2032. * rtti.c: Likewise.
  2033. * search.c: Likewise.
  2034. * typeck.c: Likewise.
  2035. * parse.c: Regenerated.
  2036. * tree.c (build_srcloc): Simplify.
  2037. 1999-09-08 Bruce Korb autogen@linuxbox.com
  2038. * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
  2039. 1999-09-08 Mark Mitchell <mark@codesourcery.com>
  2040. * cp-tree.h (lang_decl_flags): Remove permanent_attr.
  2041. Remove next.
  2042. (LANG_DECL_PERMANENT): Remove.
  2043. * decl.c (duplicate_decls): Don't mess about with obstacks trying
  2044. to free memory.
  2045. (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
  2046. * lex.c (free_lang_decl_chain): Remove.
  2047. (build_lang_decl): Don't use obstacks.
  2048. (retrofit_lang_decl): Likewise.
  2049. (copy_lang_decl): Likewise.
  2050. * cp-tree.h (saved_scope): Remove old_binding_level and
  2051. function_decl. Tidy up.
  2052. * decl.c (mark_saved_scope): Don't set them.
  2053. (maybe_push_to_top_level): Clear memory.
  2054. * decl.c (layout_var_decl): Change prototype. Don't complete
  2055. types for external objects.
  2056. (check_initializer): Likewise. Tidy.
  2057. (initialize_local_var): Complete types here.
  2058. (cp_finish_decl): Not here. Reorganize a little.
  2059. (grokvardecl): Don't complete types here.
  2060. * decl.c (start_function): Clear last_dtor_insn and
  2061. last_parm_cleanup_insn.
  2062. (push_cp_function_context): Just copy over a little of
  2063. the old context, not all of it.
  2064. * cp-tree.h (copy_to_permanent): Remove.
  2065. (permanent_p): Likewise.
  2066. * decl.c (building_typename_type): Don't use copy_to_permanent.
  2067. (start_decl): Likewise.
  2068. (grok_reference_init): Likewise.
  2069. (cp_finish_decl): Likewise.
  2070. * init.c (build_new_1): Don't use mapcar.
  2071. (build_vec_delete_1): Don't use copy_to_permanent.
  2072. (build_vec_init): Likewise.
  2073. * parse.y (primary): Likewise.
  2074. * parse.c: Regenerated.
  2075. * pt.c (push_template_decl_real): Don't use copy_to_permanent.
  2076. (lookup_template_class): Likewise.
  2077. (tsubst_friend_function): Likewise.
  2078. (instantiate_class_template): Likewise.
  2079. (tsubst_decl): Likewise.
  2080. (tsubst): Likewise.
  2081. (instantiate_template): Likewise.
  2082. (unify): Likewise.
  2083. * rtti.c (get_tinfo_fn): Likewise.
  2084. (build_dynamic_cast): Likewise.
  2085. * semantics.c (finish_if_stmt_cond): Likewise.
  2086. (finish_while_stmt_cond): Likewise.
  2087. (finish_do_stmt): Likewise.
  2088. (finish_for_cond): Likewise.
  2089. (finish_for_expr): Likewise.
  2090. (finish_cleanup): Likewise.
  2091. (add_decl_stmt): Likewise.
  2092. (finish_named_return_value): Likewise.
  2093. (finish_qualified_call_expr): Likewise.
  2094. * tree.c (perm_manip): Remove.
  2095. (build_exception_variant): Don't use copy_to_permanent.
  2096. (permanent_p): Remove.
  2097. (copy_to_permament): Remove.
  2098. (build_min_nt): Don't use copy_to_permanent.
  2099. (build_min): Likewise.
  2100. (min_tree_cons): Likewise.
  2101. * typeckc.c (build_static_cast): Likewise.
  2102. (build_reinterpret_cast): Likewise.
  2103. (build_const_cast): Likewise.
  2104. 1999-09-07 Mark Mitchell <mark@codesourcery.com>
  2105. * decl.c (ggc_p): Set it to 1.
  2106. (mark_saved_scope): Add prototype.
  2107. 1999-09-07 Richard Henderson <rth@cygnus.com>
  2108. * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
  2109. * typeck.c (self_promoting_args_p): Delete.
  2110. 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
  2111. * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
  2112. (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
  2113. 1999-09-07 Mark Mitchell <mark@codesourcery.com>
  2114. * Makefile.in (tree.o): Depend on ggc.h.
  2115. * class.c (make_method_vec): Remove.
  2116. (free_method_vec): Likewise.
  2117. (free_method_vecs): Remove.
  2118. (add_method): Don't use them.
  2119. * cp-tree.def (PTRMEM_CST): Make it longer.
  2120. (TEMPLATE_PARM_INDEX): Make it shorter.
  2121. * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
  2122. (template_parm_index): Remove RTL field.
  2123. (ptrmem_cst): Add RTL field.
  2124. (finish_function): Removed parameter.
  2125. (process_next_inline): Change prototype.
  2126. (init_cplus_unsave): Rename to init_tree.
  2127. (binding_init): Remove.
  2128. * decl.c (free_binding_nodes): Remove.
  2129. (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
  2130. (pop_binding): Don't use free_binding_nodes.
  2131. (free_binding_vecs): Remove.
  2132. (store_bindings): Don't use them.
  2133. (pop_from_top_level): Likewise.
  2134. (lookup_namespace_name): Simplify.
  2135. (build_typename_type): Don't use obstack_free.
  2136. (unqualified_namespace_lookup): Simplify.
  2137. (lookup_name_real): Simplify.
  2138. (start_function): Remove comment about leaks.
  2139. (finish_function): Removed nested parameter. Call
  2140. expand_end_bindings even when building_stmt_tree.
  2141. Call ggc_push_context and ggc_pop_context around
  2142. rest_of_compilation, if necessary.
  2143. (mark_cp_function_context): Handle a NULL language-context.
  2144. (lang_mark_false_label_stack): Fix typo.
  2145. (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
  2146. TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
  2147. pointer to method types.
  2148. (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
  2149. * decl2.c (finish_objects): Adjust call to finish_function.
  2150. (finish_static_store_duration_function): Likewise.
  2151. (do_nonmember_using_decl): Remove call to binding_init.
  2152. * except.c (end_anon_func): Adjust call to finish_function.
  2153. * lex.c (mark_impl_file_chain): New function.
  2154. (init_parse): Call init_tree, not init_cplus_unsave.
  2155. Add GC roots.
  2156. (cp_pramga_interface): Use xmalloc, not permalloc.
  2157. (cp_pragma_implementation): Likewise.
  2158. (begin_definition_of_inclass_inline): Simplify.
  2159. (process_next_inline): Adjust prototype.
  2160. (do_scoped_id): Don't call binding_init.
  2161. (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
  2162. * method.c (emit_thunk): Adjust call to finish_function.
  2163. (synthesize_method): Likewise.
  2164. * parse.y (%union): Add a new `pi' variant.
  2165. (PRE_PARSED_FUNCTION_DECL): Use it.
  2166. (fn.defpen): Likewise.
  2167. (fndef): Adjust call to finish_function.
  2168. * pt.c (instantiate_decl): Likewise.
  2169. * rtti.c (syntheisze_tinfo_fn): Likewise.
  2170. * semantics.c (expand_body): Likewise.
  2171. * tree.c: Include ggc.h.
  2172. (mark_list_hash): New function.
  2173. (binding_init): Remove.
  2174. (init_cplus_unsave): Rename to ...
  2175. (init_tree): This. Add GC roots.
  2176. 1999-09-05 Mark Mitchell <mark@codesourcery.com>
  2177. Get ready for garbage collection.
  2178. * Makefile.in (CXX_TREE_H): Add varray.h
  2179. (lex.o): Depend on ggc.h.
  2180. (decl.o): Likewise.
  2181. (decl2.o): Likewise.
  2182. (method.o): Likewise.
  2183. (search.o): Likewise.
  2184. (pt.o): Likewise.
  2185. (repo.o): Likewise.
  2186. * class.c: Include ggc.h.
  2187. (current_class_name): Remove.
  2188. (current_class_type): Likewise.
  2189. (current_access_specifier): Likewise.
  2190. (previous_class_type): Likewise.
  2191. (previous_class_values): Likewise.
  2192. (class_cache_firstobj): Likewise.
  2193. (current_lang_base): Likewise.
  2194. (current_lang_stack): Likewise.
  2195. (current_lang_stacksize): Likewise.
  2196. (lang_name_c): Likewise.
  2197. (lang_name_cplusplus): Likewise.
  2198. (lang_name_java): Likewise.
  2199. (current_lang_name): Likewise.
  2200. (base_layout_decl): Likewise.
  2201. (access_default_node): Likewise.
  2202. (access_public_node): Likewise.
  2203. (access_protected_node): Likewise.
  2204. (access_private_node): Likewise.
  2205. (access_default_virtual_node): Likewise.
  2206. (access_public_virtual_node): Likewise.
  2207. (access_protected_virtual_node): Likewise.
  2208. (access_private_virtual_node): Likewise.
  2209. (signed_zero_node): Likewise.
  2210. (init_class_processing): Don't build base_layout_decl.
  2211. (push_lang_context): Adjust now that current_lang_base is a varray.
  2212. (pop_lang_context): Likewise.
  2213. * cp-tree.h: Include varray.h.
  2214. (cp_global_trees): Add access_default, access_public,
  2215. access_protected, access_private, access_default_virtual,
  2216. access_public_virtual, access_protected_virtual,
  2217. access_private_virtual, ctor_identifier, delta2_identifier,
  2218. delta_identifier, dtor_identifier, in_charge_identifier,
  2219. index_identifier, nelts_identifier, this_identifier,
  2220. pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
  2221. lang_name_c, lang_name_cplusplus, lang_name_java,
  2222. empty_except_spec, null, jclass, minus_one, terminate.
  2223. (saved_scope): Move here from decl.c. Define globals in terms of
  2224. saved_scope: current_namespace, current_class_name,
  2225. current_class_type, current_access_specifier, current_lang_stack,
  2226. current_lang_base, current_lang_name, current_function_parms,
  2227. current_template_parms, processing_template_decl,
  2228. processing_specialization, processing_explicit_instantiation,
  2229. previous_class_type, previous_class_values, class_cache_firstobj.
  2230. (scope_chain): New variable.
  2231. (init_pt): New function.
  2232. * decl.c (current_namespace): Remove.
  2233. (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
  2234. (dtor_identifier, pfn_identifier, index_identifier): Likewise.
  2235. (delta_identifier, delta2_identifier): Likewise.
  2236. (pfn_or_delta2_identifier, tag_identifier): Likewise
  2237. (vt_off_identifier, empty_except_spec, null_node): Likewise.
  2238. (current_function_parms, current_lang_base): Remove.
  2239. (current_lang_stack, previous_class_values): Remove.
  2240. (class_binding_level): Macroize.
  2241. (saved_scope): Remove.
  2242. (current_saved_scope): Rename to scope_chain.
  2243. (mark_saved_scope): Adjust for new scope structure.
  2244. (maybe_push_to_top_level): Likewise.
  2245. (pop_from_top_level): Likewise.
  2246. (duplicate_decls): Adjust now that current_lang_base is a varray.
  2247. (build_typename_type): Call ggc_add_tree_hash_table_root.
  2248. (init_decl_processing): Call init_pt. Call push_to_top_level to
  2249. set up globals. Add GC roots.
  2250. (xref_basetypes): Adjust now that current_lang_base is a varray.
  2251. * decl.h (this_identifier): Remove.
  2252. (in_charge_identifier): Likewise.
  2253. * decl2.c: Don't include varray.h.
  2254. (current_namespace): Remove.
  2255. (init_decl2): Add GC roots.
  2256. * except.c (Terminate): Remove.
  2257. (init_exception_processing): Use terminate_node instead.
  2258. (build_terminate_handler): Likewise.
  2259. * init.c (nc_nelts_field_id): Remove.
  2260. (minus_one): Likewise.
  2261. (init_init_processing): Use minus_one_node and nelts_identifier
  2262. instead. Add GC roots.
  2263. (jclass_node): Remove.
  2264. (build_new_1): Use nelts_identifier.
  2265. (build_vec_init): Likewise.
  2266. (build_vec_delete): Likewise.
  2267. * lex.c: Include ggc.h.
  2268. (defarg_fn): Move declaration early.
  2269. (defarg_parms): Likewise.
  2270. (init_parse): Add GC roots.
  2271. (handle_cp_pragma): Remove redundant declaration of
  2272. pending_vtables.
  2273. * method.c: Include ggc.h.
  2274. (btypelist): Make it a varray. All uses changed.
  2275. (ktypelist): Likewise.
  2276. (init_method): Add GC roots.
  2277. * pt.c: Don't include varray.h. Include ggc.h.
  2278. (current_template_parms): Remove.
  2279. (processing_template_decl): Likewise.
  2280. (processing_specialization): Likewise.
  2281. (processing_explicit_instantiation): Likewise.
  2282. (init_pt): New function.
  2283. * repo.c: Include ggc.h.
  2284. (init_repo): Add GC roots.
  2285. * search.c: Don't include varray.h.
  2286. (_vptr_name): Remove.
  2287. (lookup_field_1): Use vtpr_identifier instead.
  2288. (expand_indirect_vtbls_init): Remove redundant declaration of
  2289. in_charge_identifier.
  2290. (init_search_processing): Use vptr_identifier.
  2291. 1999-09-05 Richard Henderson <rth@cygnus.com>
  2292. Bernd Schmidt <bernds@cygnus.co.uk>
  2293. Mark Mitchell <mark@codesourcery.com>
  2294. * Makefile.in (parse.o): Depend on ggc.h.
  2295. (decl2.o): Depend on ggc.h.
  2296. (init.o): Depend on ggc.h.
  2297. * cp-tree.h (init_decl2): Declare.
  2298. (cp_parse_init): Likewise.
  2299. * decl.c (ggc_p): Define to zero.
  2300. (mark_saved_scope): New function.
  2301. (init_decl_processing): Call cp_parse_init, and cp_decl2.
  2302. Register GC roots.
  2303. (expand_static_init): Add GC roots.
  2304. * decl2.c: Include ggc.h.
  2305. (init_decl2): New function.
  2306. * init.c: Include ggc.h.
  2307. (init_init_processing): Add GC roots.
  2308. * parse.y: Include ggc.h.
  2309. (cp_parse_init): New function.
  2310. 1999-09-04 Mark Mitchell <mark@codesourcery.com>
  2311. * decl.c (init_decl_processing): Set mark_lang_status.
  2312. (lang_mark_false_label_stack): Adjust prototype.
  2313. * decl2.c (grok_function_init): Remove extraneous declaration of
  2314. abort_fndecl.
  2315. * Make-lang.in (cc1plus): Remove dependency on GGC.
  2316. * Makefile.in (OBJS): Don't mention ggc-simple.o.
  2317. (OBJDEPS): Don't mention ggc-simple.o.
  2318. * Make-lang.in (cc1plus): Depend on $(GGC).
  2319. * Makefile.in (OBJS): Add ggc-simple.o.
  2320. (OBJDEPS): Likewise.
  2321. * cp-tree.h (language_function): Rename members to `x_' versions;
  2322. we now have x_named_labels, x_ctor_label, x_dtor_label,
  2323. x_base_init_list, x_member_init_list, x_base_init_expr,
  2324. x_current_class_ptr, x_current_class_ref, x_last_tree,
  2325. x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
  2326. x_result_rtx.
  2327. (dtor_label, ctor_label, current_base_init_list,
  2328. current_member_init_list, base_init_expr, current_class_ptr,
  2329. current_class_ref, last_tree, last_expr_type): Adjust accordingly.
  2330. * decl.c: Include ggc.h.
  2331. (last_dtor_insn): Adjust to use x_ names.
  2332. (last_parm_cleanup_insn): Likewise.
  2333. (original_result_rtx): Likewise.
  2334. (named_labels): Likewise.
  2335. (mark_binding_level): New function.
  2336. (mark_cp_function_context): Likewise.
  2337. (mark_false_label_stack): Likewise.
  2338. (lang_mark_tree): Likewise.
  2339. (lang_cleanup_tree): Likewise.
  2340. 1999-09-03 Mark Mitchell <mark@codesourcery.com>
  2341. * Makefile.in (CXX_TREE_H): Include function.h.
  2342. (decl.o): Don't depend on function.h.
  2343. (decl2.o): Likewise.
  2344. (typeck.o): Likewise.
  2345. (init.o): Likewise.
  2346. (method.o): Likewise.
  2347. * cp-tree.h: Include function.h.
  2348. (cp_function): Rename to language_function. Remove next.
  2349. (cp_function_chain): Make it a macro, not a variable.
  2350. (push_cp_function_context): Don't declare.
  2351. (pop_cp_function_context): Likewise.
  2352. * decl.c: Don't include function.h.
  2353. (push_cp_function_context): Make it static. Make it suitable for
  2354. a save_lang_status callback.
  2355. (pop_cp_function_context): Likewise.
  2356. (maybe_push_to_top_level): Call push_function_context_to, not
  2357. push_cp_function_context.
  2358. (pop_from_top_level): Call pop_function_context_from, not
  2359. pop_cp_function_context.
  2360. (init_decl_processing): Set save_lang_status and
  2361. restore_lang_status. Call push_function_context_to, not
  2362. push_cp_function_context.
  2363. (cp_function_chain): Remove.
  2364. * decl2.c: Don't include function.h.
  2365. * except.c: Don't include function.h.
  2366. (start_anon_func): Call push_function_context_to, not
  2367. push_cp_function_context.
  2368. (end_anon_func): Call pop_function_context_from, not
  2369. pop_cp_function_context.
  2370. * init.c: Don't include function.h.
  2371. * lex.c (begin_definition_of_inclass_inline): Call
  2372. push_function_context_to, not push_cp_function_context.
  2373. (process_next_inline): Call pop_function_context_from, not
  2374. pop_cp_function_context.
  2375. * method.c: Don't include function.h.
  2376. (synthesize_method): Call push_function_context_to, not
  2377. push_cp_function_context. Call pop_function_context_from, not
  2378. pop_cp_function_context.
  2379. * typeck.c: Don't include function.h.
  2380. * decl.c (expand_static_init): Tweak handling of static
  2381. initializations for objects without constructors.
  2382. 1999-09-03 Nathan Sidwell <nathan@acm.org>
  2383. * typeck.c (build_indirect_ref): Reject dereference of pointer to
  2384. void.
  2385. 1999-09-02 Mark Mitchell <mark@codesourcery.com>
  2386. * cp-tree.h (cp_function): Move here, from decl.c.
  2387. (cp_function_chain): Declare.
  2388. (dtor_label): New macro, instead of variable.
  2389. (ctor_label): Likewise.
  2390. (current_base_init_list): Likewise.
  2391. (current_member_init_list): Likewise.
  2392. (base_init_expr): Likewise.
  2393. (current_class_ptr): Likewise.
  2394. (current_class_ref): Likewise.
  2395. (last_tree): Likewise.
  2396. (last_expr_type): Likewise.
  2397. (current_function_returns_value): Likewise.
  2398. (current_function_returns_null): Likewise.
  2399. (current_function_just_assigned_this): Likewise.
  2400. (current_function_parms_stored): Likewise.
  2401. (temp_name_counter): Likewise.
  2402. (static_labelno): Likewise.
  2403. (expanding_p): Likewise.
  2404. (stmts_are_full_exprs_p): Likewise.
  2405. (in_function_try_handler): Likewise.
  2406. (lang_type): Remove nested type_flags. All uses changed.
  2407. * call.c (ctor_label): Remove.
  2408. (dtor_label): Likewise.
  2409. * class.c (current_class_ptr): Remove.
  2410. (current_class_ref): Likewise.
  2411. * decl.c (static_labelno): Remove.
  2412. (dtor_label): Likewise.
  2413. (last_dtor_insn): New macro, instead of variable.
  2414. (last_parm_cleanup_insn): Likewise.
  2415. (original_result_rtx): Likewise.
  2416. (in_function_try_handler): Remove.
  2417. (named_label_uses): New macro, instead of variable.
  2418. (named_labels): Likewise.
  2419. (current_function_returns_value): Remove.
  2420. (current_function_returns_null): Likewise.
  2421. (current_function_assigns_this): New macro, instead of variable.
  2422. (current_function_just_assigned_this): Likewise.
  2423. (current_binding_level): Likewise.
  2424. (init_decl_processing): Call push_cp_function_context.
  2425. (cp_function): Move to cp-tree.h
  2426. (cp_function_chain): Make it global.
  2427. (temp_name_counter): Remove.
  2428. (push_cp_function_context): Simplify.
  2429. (pop_cp_function_context): Likewise.
  2430. * decl2.c (temp_name_counter): Remove.
  2431. * init_c (current_base_init_list): Likewise.
  2432. (current_member_init_list): Likewise.
  2433. (base_init_expr): Likewise.
  2434. * method.c (static_labelno): Likewise.
  2435. * pt.c (last_tree): Likewise.
  2436. * semantics.c (expanding_p): Likewise.
  2437. (stmts_are_full_exprs_p): Likewise.
  2438. (last_expr_type): Likewise.
  2439. * typeck.c (dtor_label): Likewise.
  2440. (ctor_label): Likewise.
  2441. 1999-09-01 Alex Samuel <samuel@codesourcery.com>
  2442. * decl2.c (arg_assoc_template_arg): New prototype. New function.
  2443. (arg_assoc_class): Use arg_assoc_template_arg for template
  2444. arguments.
  2445. (arg_assoc): Likewise.
  2446. * pt.c (mangle_class_name_for_template): Allow member template
  2447. template arguments.
  2448. 1999-09-02 Nathan Sidwell <nathan@acm.org>
  2449. * call.c (build_conditional_expr): Warn on enum mismatches.
  2450. (convert_arg_to_ellipsis): Move non-pod check to after
  2451. conversion.
  2452. 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2453. * gxx.gperf (hash, is_reserved_word): Add prototypes.
  2454. * init.c (build_vec_init): Initialize variable `try_block'.
  2455. * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
  2456. Likewise for bzero/memset.
  2457. (token_getch, token_put_back): Add static prototypes. Remove
  2458. `inline' from the definitions.
  2459. (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
  2460. 1999-09-01 Mark Mitchell <mark@codesourcery.com>
  2461. * cp-tree.h (lang_type): Move align into type_flags.
  2462. (CLASSTYPE_ALIGN): Adjust accordingly.
  2463. * call.c (direct_reference_binding): Remove misleading comment.
  2464. 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2465. * parse.y (language_string): Constify.
  2466. 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2467. * repo.c (getpwd): Don't prototype.
  2468. * xref.c (getpwd): Likewise
  2469. 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2470. * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
  2471. Remove hacks for stuff which now comes from libiberty.
  2472. 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
  2473. * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
  2474. 1999-08-30 Mark Mitchell <mark@codesourcery.com>
  2475. * cp-tree.h (begin_init_stmts): Declare.
  2476. (finish_init_stmts): Likewise.
  2477. * cvt.c (build_up_reference): Wrap the declaration of a temporary
  2478. in a statement-expression so that we will see it when expanding
  2479. tree structure later.
  2480. * init.c (begin_init_stmts): Don't make it static.
  2481. (finish_init_stmts): Likewise.
  2482. * cp-tree.h (start_handler_parms): New function.
  2483. (expand_start_catch_block): Take only one parameter.
  2484. (start_handler_parms): New function.
  2485. * decl.c (start_handler_parms): Define it.
  2486. * except.c (process_start_catch_block): Take only one parameter.
  2487. Don't call grokdeclarator here.
  2488. (expand_start_catch_block): Don't call grokdeclarator here,
  2489. either.
  2490. * parse.y (handler_args): Adjust call to
  2491. expand_start_catch_block. Use start_handler_parms.
  2492. * pt.c (push_template_decl_real): Make permanent lists have
  2493. permanent elements.
  2494. (tsubst_expr): Adjust calls to expand_start_catch_block
  2495. appropriately.
  2496. * semantics.c (expand_stmt): Likewise.
  2497. 1999-08-29 Alex Samuel <samuel@codesourcery.com>
  2498. * pt.c (push_template_decl_real): Use template declaration from
  2499. class type if it exists.
  2500. 1999-08-29 Mark Mitchell <mark@codesourcery.com>
  2501. * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
  2502. (maybe_inject_for_scope_var): Declare it.
  2503. (initialize_local_var): Likewise.
  2504. * decl.c (maybe_inject_for_scope_var): Make it global.
  2505. (initialize_local_var): Likewise. Move cleanup handling here,
  2506. from cp_finish_decl.
  2507. (make_rtl_for_nonlocal_decl): Use
  2508. push_obstacks_nochange/pop_obstacks, rather than
  2509. end_temporary_allocation/resume_temporary_allocation.
  2510. (cp_finish_decl): Try to complete the type of a variable when it
  2511. is declared. Move cleanup-handling to initialize_local_var.
  2512. (expand_static_init): Use tree-building code, rather than
  2513. RTL-building code.
  2514. * decl2.c (get_temp_name): Assert non-initializedness of
  2515. temporaries.
  2516. * init.c (create_temporary_var): Move RTL-assigning code to ...
  2517. (get_temp_regvar): Here.
  2518. * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
  2519. * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
  2520. call initialize_local_var to generate initialization code.
  2521. 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2522. * cp-tree.h (fndecl_as_string, type_as_string,
  2523. type_as_string_real, args_as_string, decl_as_string,
  2524. expr_as_string, code_as_string, language_as_string,
  2525. parm_as_string, op_as_string, assop_as_string, cv_as_string,
  2526. lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
  2527. * errfn.c (cp_printer): Likewise.
  2528. * error.c (cp_printer, fndecl_as_string, type_as_string_real,
  2529. type_as_string, expr_as_string, decl_as_string, lang_decl_name,
  2530. cp_file_of, code_as_string, language_as_string, parm_as_string,
  2531. op_as_string, assop_as_string, args_as_string, cv_as_string):
  2532. Likewise.
  2533. * tree.c (lang_printable_name): Likewise.
  2534. 1999-08-28 Richard Henderson <rth@cygnus.com>
  2535. * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
  2536. 1999-08-28 Mark Mitchell <mark@codesourcery.com>
  2537. * cp-tree.h (strip_array_types): New function.
  2538. * decl.c (maybe_deduce_size_from_array_init): New function, split
  2539. out from cp_finish_decl.
  2540. (layout_var_decl): Likewise.
  2541. (maybe_commonize_var): Likewise.
  2542. (maybe_inject_for_scope_var): Likewise.
  2543. (initialize_local_var): Likewise.
  2544. (build_cleanup_on_safe_obstack): Likewise.
  2545. (check_initializer): Likewise.
  2546. (make_rtl_for_nonlocal_decl): Likewise.
  2547. (cp_finish_decl): Use them.
  2548. * typeck.c (strip_array_types): New function.
  2549. * cp-tree.def (LABEL_STMT): New tree node.
  2550. * cp-tree.h (LABEL_STMT_LABEL): New macro.
  2551. (shadow_label): Remove.
  2552. (declare_local_label): New function.
  2553. (finish_label_decl): Likewise.
  2554. * decl.c (make_label_decl): New function, split out from
  2555. lookup_label.
  2556. (shadowed_labels): Remove.
  2557. (binding_level): Add shadowed_labels.
  2558. (clear_binding_level): Remove.
  2559. (push_binding_level): Just bzero the new binding level.
  2560. (pushlevel): Fix indentation.
  2561. (pop_label): New function.
  2562. (pop_labels): Likewise, split out from poplevel.
  2563. (poplevel): Pop local labels. Use pop_labels.
  2564. (maybe_push_to_top_level): Don't clear shadowed_labels.
  2565. (lookup_label): Use make_label_decl.
  2566. (shadow_label): Remove.
  2567. (declare_local_label): New function.
  2568. (define_label): Simplify.
  2569. (start_function): Don't clear shadowed_labels.
  2570. (cp_function): Remove shadowed_labels.
  2571. (push_cp_function_context): Don't save shadowed_labels.
  2572. (pop_cp_function_context): Don't restore it.
  2573. * dump.c (dequeue_and_dump): Handle LABEL_STMT.
  2574. * parse.y (label_decl): Use finish_label_decl.
  2575. * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
  2576. declarations.
  2577. * semantics.c (finish_label_stmt): Add a LABEL_STMT when
  2578. building_stmt_tree.
  2579. (finish_label_decl): New function.
  2580. (expand_stmt): Handle LABEL_STMTs and local label declarations.
  2581. 1999-08-26 Mark Mitchell <mark@codesourcery.com>
  2582. * decl.c (lookup_label): Build labels on the permanent obstack
  2583. when building statement trees. Don't build RTL for labels when
  2584. building statement trees.
  2585. * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
  2586. building statement trees.
  2587. (finish_label_stmt): Likewise.
  2588. (expand_stmt): Adjust accordingly.
  2589. * pt.c (tsubst_expr); Likewise.
  2590. (do_decl_instantiation): Robustify.
  2591. * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
  2592. * tree.c (build_cplus_new): Set it.
  2593. * expr.c (cplus_expand_expr): Use it.
  2594. * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
  2595. * decl.c (store_parm_decls): Reset immediate_size_expand.
  2596. (finish_function): Likewise.
  2597. * tree.c (cplus_unsave_expr_now): Don't return a value.
  2598. * semantics.c (do_poplevel): Always initialize the return value.
  2599. 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
  2600. * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
  2601. * tree.h (cplus_unsave_expr_now) : Same.
  2602. 1999-08-25 Mark Mitchell <mark@codesourcery.com>
  2603. * decl.c (grokdeclarator): Amend comment.
  2604. * except.c (expand_start_catch_block): Call push_template_decl for
  2605. catch-block parameters.
  2606. * method.c (synthesize_method): Build an empty compound statement
  2607. for the body of a constructor.
  2608. 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
  2609. * tree.c (cp_build_qualified_type_real): If we're asking for the
  2610. same quals we already have, just return.
  2611. 1999-08-25 Mark Mitchell <mark@codesourcery.com>
  2612. * cp-tree.def (SUBOBJECT): New tree node.
  2613. * cp-tree.h (CLEANUP_P): New macro.
  2614. (SUBOBJECT_CLEANUP): Likewise.
  2615. (keep_next_level): Add parameter.
  2616. (get_temp_regvar): Don't declare.
  2617. (emit_base_init): Remove parameter.
  2618. (expand_aggr_init): Rename to build_aggr_init.
  2619. (expand_vec_init): Rename to build_vec_init.
  2620. (do_pushlevel): Remove.
  2621. (do_poplevel): Likewise.
  2622. (finish_cleanup): New function.
  2623. (finish_subobject): Likewise.
  2624. (stmts_are_full_exprs_p): New variable.
  2625. * decl.c (keep_next_level): Add parameter.
  2626. (cp_finish_decl): Use build_aggr_init, not
  2627. expand_aggr_init. Use finish_expr_stmt to expand the code.
  2628. (expand_static_init): Use tree-generating, not RTL-generating,
  2629. functions to handle the initialization.
  2630. (start_function): Remove dead code. Always have a momentary
  2631. obstack inside the function, even before hitting the first curly
  2632. brace.
  2633. (cplus_expand_expr_stmt): Move calls to
  2634. expand_{start,end}_target_temps into semantics.c.
  2635. (cp_function): Add stmts_are_full_exprs_p.
  2636. (push_cp_function_context): Save it.
  2637. (pop_cp_function_context): Restore it.
  2638. * decl2.c (get_temp_regvar): Move to init.c.
  2639. (do_static_initialization): Use build_{aggr,vec}_init.
  2640. (do_static_destruction): Fix typo in comment.
  2641. * dump.c (dequeue_and_dump): Handle INIT_EXPR.
  2642. * except.c (expand_throw): Use create_temporary_var.
  2643. * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
  2644. * init.c (expand_vec_init_try_block): Remove.
  2645. (expand_vec_init_catch_clause): Likewise.
  2646. (get_temp_regvar): New function.
  2647. (begin_init_stmts): Likewise.
  2648. (finish_init_stmts): Likewise.
  2649. (perform_member_init): Use build_{aggr,vec}_init. Build up tree
  2650. structure here.
  2651. (emit_base_init): Likewise. Remove unused parameter.
  2652. (expand_virtual_init): Likewise.
  2653. (expand_cleanup_for_base): Use finish_subobject.
  2654. (expand_aggr_vbase_init_1): Simplify.
  2655. (construct_virtual_bases): Use tree-generating functions to build
  2656. up initialization.
  2657. (expand_aggr_init): Likewise. Rename to build_aggr_init.
  2658. (expand_default_init): Likewise.
  2659. (expand_aggr_init_1): Likewise.
  2660. (expand_vec_init): Rename to build_vec_init.
  2661. * method.c (do_build_copy_constructor): Use tree-generating
  2662. functions. Don't call clear_last_expr.
  2663. (do_build_assign_ref): Likewise.
  2664. (synthesize_method): Call clear_last_expr here.
  2665. * parse.y (base_init): Don't call clear_last_expr here.
  2666. (nodecls): Likewise.
  2667. * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
  2668. * semantics.c (do_pushlevel): Move to here.
  2669. (do_poplevel): Likewise.
  2670. (stmts_are_full_exprs_p): New variable.
  2671. (finish_expr_stmt): Handle logic for temoprary cleanup here.
  2672. (finish_for_stmt): Use finish_expr_stmt.
  2673. (finish_cleanup): New function.
  2674. (finish_function_try_block): Fix indentation.
  2675. (finish_subobject): New function.
  2676. (setup_vtbl_ptr): Call keep_next_level here.
  2677. (finish_stmt_expr): Handle a block with no scope inside the
  2678. statement-expression.
  2679. (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
  2680. SUBOBJECT.
  2681. * tree.c (search_tree): Handle INIT_EXPR.
  2682. (mapcar): Likewise.
  2683. * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
  2684. * typeck2.c (store_init_value): Change expand_aggr_init to
  2685. build_aggr_init in comment.
  2686. 1999-08-25 Mark Mitchell <mark@codesourcery.com>
  2687. * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
  2688. 1999-08-25 Nathan Sidwell <nathan@acm.org>
  2689. * decl2.c (handle_class_head): Be graceful about additional
  2690. scope qualifiers. Adjust comments to reflect reality.
  2691. 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
  2692. * call.c (build_conditional_expr): Fix typo.
  2693. * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
  2694. lvalue before trying to mess with the sides.
  2695. * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
  2696. Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
  2697. * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
  2698. 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
  2699. * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
  2700. Return arbitrary pointer or NULL.
  2701. (check_eh_spec): Call __throw_type_match_rtti_2.
  2702. * tinfo.h (*::dcast): Return int. Add valp parm.
  2703. * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
  2704. * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
  2705. (__throw_type_match_rtti): Now just a wrapper.
  2706. * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
  2707. (init_exception_processing): Don't initialize them.
  2708. 1999-08-23 Paul Burchard <burchard@pobox.com>
  2709. * decl.c (check_default_argument): Fix typo.
  2710. 1999-08-22 Mark Mitchell <mark@codesourcery.com>
  2711. * cp-tree.def (STMT_EXPR): Fix typo in node name.
  2712. * dump.c (dump_next_stmt): New function.
  2713. (dequeue_and_dump): Use it.
  2714. * pt.c (tsubst_copy): Make sure to initialize return value for a
  2715. STMT_EXPR, even when processing_template_decl.
  2716. * semantics.c (finish_stmt_expr): A statement-expression whose
  2717. last statement is not an expression-statement has type `void'.
  2718. 1999-08-20 Mark Mitchell <mark@codesourcery.com>
  2719. * semantics.c (finish_stmt_expr): Fix typo in comment.
  2720. * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
  2721. (mapcar): Likewise.
  2722. * init.c (build_vec_delete_1): Make the children of a permanent
  2723. BIND_EXPR permanent.
  2724. * pt.c (register_specialization): Don't register a specialization
  2725. more than once.
  2726. 1999-08-18 Andrew Haley <aph@cygnus.com>
  2727. * method.c (process_overload_item): Call build_mangled_C9x_name ()
  2728. for all integer parameter types larger than long long.
  2729. 1999-08-19 Mark Mitchell <mark@codesourcery.com>
  2730. * pt.c (redeclare_class_template): Merge default template
  2731. arguments in both directions.
  2732. * typeck.c (common_type): Undo 1999-08-18 change. Remove
  2733. compiler_error message.
  2734. 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
  2735. * cp-tree.h: Declare flag_use_repository.
  2736. * pt.c (do_decl_instantiation): Don't complain about duplicate
  2737. instantiation with -frepo.
  2738. (do_type_instantiation): Likewise.
  2739. * pt.c (push_template_decl_real): Complain about everything
  2740. that isn't a valid template.
  2741. * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
  2742. affect inlines.
  2743. 1999-08-19 Mark Mitchell <mark@codesourcery.com>
  2744. * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
  2745. * decl2.c (build_expr_from_tree): Handle it.
  2746. * error.c (dump_expr): Likewise.
  2747. * pt.c (for_each_template_parm): Likewise.
  2748. (tsubst_copy): Likewise.
  2749. * tree.c (search_tree): Likewise.
  2750. * semantics.c (finish_pseudo_destructor_call): Create it.
  2751. 1999-08-18 Mark Mitchell <mark@codesourcery.com>
  2752. * search.c (setup_class_bindings): Robustify.
  2753. * typeck.c (common_type): Use same_type_p, not pointer equality,
  2754. to compare types.
  2755. * cp-tree.h (build_lang_field_decl): Remove.
  2756. * class.c (build_vtable): Replace calls to build_lang_field_decl
  2757. with build_lang_decl.
  2758. (prepare_fresh_vtable): Likewise.
  2759. (finish_struct_1): Likewise.
  2760. (init_class_processing): Likewise.
  2761. * decl.c (push_using_decl): Likewise.
  2762. (init_decl_processing): Likewise.
  2763. (grokvardecl): Likewise.
  2764. (build_ptrmemfunc_type): Likewise.
  2765. (grokdeclarator): Likewise.
  2766. (build_enumerator): Likewise.
  2767. * decl2.c (grok_x_components): Likewise.
  2768. (do_class_using_decl): Likewise.
  2769. * except.c (call_eh_info): Likewise.
  2770. * init.c (init_init_processing): Likewise.
  2771. * rtti.c (expand_class_decl): Likewise.
  2772. * tree.c (build_base_fields): Likewise.
  2773. (build_vbase_pointer_fields): Likewise.
  2774. * lex.c (build_lang_decl): Build declarations on the permanent
  2775. obstack if we're building statmeent trees.
  2776. (retrofit_lang_decl): Handle both the full lang_decl and also the
  2777. smaller lang_decl_flags here.
  2778. (build_lang_field_decl): Remove.
  2779. * pt.c (push_template_decl_real): Issue errors for variable
  2780. declarations that are not static members.
  2781. 1999-08-18 Richard Henderson <rth@cygnus.com>
  2782. * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
  2783. (mapcar): Likewise.
  2784. 1999-08-17 Mark Mitchell <mark@codesourcery.com>
  2785. * cp-tree.h (back_end_hook): New variable.
  2786. * decl2.c (back_end_hook): Define it.
  2787. (finish_file): If it's non-NULL, call it.
  2788. * decl.c (add_decl_to_level): New function.
  2789. (push_local_binding): Use it.
  2790. (find_binding): Fix typo in comment.
  2791. (pushdecl): Use add_decl_to_level. Put templates on the
  2792. corresponding namespace-scope binding levels.
  2793. * dump.c (dequeue_and_dump): Print the specializations of a
  2794. template.
  2795. * pt.c (push_template_decl_real): Don't push a template multiple
  2796. times.
  2797. 1999-08-17 Mark Mitchell <mark@codesourcery.com>
  2798. * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
  2799. (CALL_DECLARATOR_QUALS): Likewise.
  2800. (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
  2801. * decl.c (grokdeclarator): Adjust to use them.
  2802. * decl2.c (grokfield): Likewise.
  2803. (reparse_absdcl_as_casts): Likewise.
  2804. * lex.c (make_call_declarator): Likewise.
  2805. (set_quals_and_spec): Likewise.
  2806. * pt.c (tsubst): Likewise.
  2807. * tree.c (mapcar): Remove special hack to handle third operand of
  2808. a CALL_EXPR.
  2809. 1999-08-16 Mark Mitchell <mark@codesourcery.com>
  2810. * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
  2811. * class.c (build_vtable): Use build_lang_field_decl to build the
  2812. VAR_DECLs for vtables.
  2813. (prepare_fresh_vtable): Likewise.
  2814. * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
  2815. CAN_HAVE_FULL_LANG_DECL_P.
  2816. (push_using_decl): Use build_lang_decl to build USING_DECLs.
  2817. (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
  2818. * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
  2819. (build_lang_field_decl): Likewise.
  2820. (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
  2821. to copy.
  2822. * cp-tree.def (STMT_EXPR): New tree node.
  2823. * cp-tree.h (STMT_EXPR_STMT): New macro.
  2824. (store_return_init): Change prototype.
  2825. (finish_named_return_value): New function.
  2826. (expand_stmt): Likewise.
  2827. (expand_body): Likewise.
  2828. (begin_stmt_tree): Likewise.
  2829. (finish_stmt_tree): Likewise.
  2830. (expanding_p): New variable.
  2831. (last_expr_type): Likewise.
  2832. (building_stmt_tree): New macro.
  2833. * decl.c (start_function): Use building_stmt_tree, not
  2834. processing_template_decl, where appropriate.
  2835. (store_parm_decls): Likewise.
  2836. (store_return_init): Move most of the body to semantics.c.
  2837. (finish_function): Use building_stmt_tree.
  2838. (finish_stmt): Clear last_expr_type here.
  2839. (cp_function): Add expanding_p, last_tree, last_expr_type.
  2840. (push_cp_function_context): Save them.
  2841. (pop_cp_function_context): Restore them.
  2842. * decl2.c (setup_vtbl_ptr): Move to semantics.c.
  2843. * error.c (dump_expr): Handle STMT_EXPR.
  2844. * except.c (expand_start_catch_block): Use building_stmt_tree.
  2845. Use add_decl_stmt.
  2846. * expr.c (cplus_expand_expr): Handle STMT_EXPR.
  2847. (do_case): Move add_tree call to semantics.c.
  2848. * parse.y (return_init): Use finish_named_return_value.
  2849. (for.init.statement): Use finish_expr_stmt.
  2850. * parse.c: Regenerated.
  2851. * pt.c (do_pushlevel): Move to semantics.c.
  2852. (do_poplevel): Likewise.
  2853. (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
  2854. (tsubst_expr): Don't expand all the way to RTL here. Handle
  2855. RETURN_INIT and CTOR_INITIALIZER.
  2856. (instantiate_decl): Call expand_body after tsubst'ing into
  2857. DECL_SAVED_TREE.
  2858. * semantics.c (expand_stmts): New function.
  2859. (expanding_p): New variable.
  2860. (last_expr_type): Likewise.
  2861. (finish_expr_stmt): Use building_stmt_tree.
  2862. (begin_if_stmt): Likewise.
  2863. (finish_if_stmt_cond): Likewise.
  2864. (finish_then_clause): Likewise.
  2865. (begin_else_clause): Likewise.
  2866. (finish_else_clause): Likewise.
  2867. (begin_while_stmt): Likewise.
  2868. (finish_while_stmt_cond): Likewise.
  2869. (finish_while_stmt): Likewise.
  2870. (finish_do_body): Likewise.
  2871. (finish_do_stmt): Likewise.
  2872. (finish_return_stmt): Likewise.
  2873. (begin_for_stmt): Likewise.
  2874. (fnish_for_init_stmt): Likewise.
  2875. (finish_for_cond): Likewise.
  2876. (finish_for_expr): Likewise.
  2877. (finish_for_stmt): Likewise.
  2878. (finish_break_stmt): Likewise.
  2879. (finish_continue_stmt): Likewise.
  2880. (finish_switch_cond): Likewise.
  2881. (finish_switch_stmt): Likewise.
  2882. (finish_case_label): Call add_tree here if necessary.
  2883. (finish_goto_statement): Use building_stmt_tree.
  2884. (begin_try_block): Likewise.
  2885. (begin_function_try_block): Likewise.
  2886. (finish_try_block): Likewise.
  2887. (finish_function_try_block): Likewise.
  2888. (finish_handler_sequence): Likewise.
  2889. (finish_function_handler_sequence): Likewise.
  2890. (begin_handler): Likewise.
  2891. (finish_handler_parms): Likewise.
  2892. (finish_handler): Likewise.
  2893. (begin_compound_stmt): Likewise.
  2894. (finish_compound_stmt): Likewise.
  2895. (finish_asm_stmt): Likewise.
  2896. (finish_label_stmt): Likewise.
  2897. (finish_named_return_value): New function.
  2898. (setup_vtbl_ptr): Moved here from decl2.c.
  2899. (do_pushlevel): Moved here from pt.c.
  2900. (do_poplevel): Likewise.
  2901. (begin_stmt_expr): Use building_stmt_tree.
  2902. (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
  2903. when building_stmt_tree.
  2904. (begin_stmt_tree): New function.
  2905. (finish_stmt_tree): Likewise.
  2906. (expand_stmt): Likewise.
  2907. (expand_body): Likewise.
  2908. * tree.c (build_cplus_method_type): Make sure the argument types
  2909. end up on the same obstack as the METHOD_TYPE.
  2910. (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
  2911. THROW_EXPR, STMT_EXPR.
  2912. (mapcar): Break out common cases. Handle COMPOUND_EXPR,
  2913. MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
  2914. sorry, if an unsupported node is encountered.
  2915. * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
  2916. (c_expand_return): Don't call add_tree here.
  2917. 1999-08-15 Mark Mitchell <mark@codesourcery.com>
  2918. * pt.c (check_default_tmpl_args): Don't check in local scopes.
  2919. (tsubst_decl): Make sure the declaration is on a saveable
  2920. obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
  2921. variable.
  2922. (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
  2923. 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
  2924. Speed up Koenig lookup.
  2925. * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
  2926. to return namespaces we've looked at.
  2927. * decl2.c (lookup_using_namespace): Likewise.
  2928. (add_function): Don't call ovl_member.
  2929. (lookup_arg_dependent): Initialize k.namespaces to the list of
  2930. namespaces seen in unqualified lookup.
  2931. * call.c (equal_functions): Move here from tree.c.
  2932. (joust): Use it to handle duplicate candidates.
  2933. * tree.c (ovl_member): Use ==.
  2934. 1999-08-13 Mark Mitchell <mark@codesourcery.com>
  2935. * cp-tree.def (DECL_STMT): Make it smaller.
  2936. * cp-tree.h (lang_decl_flags): Move saved_tree to ...
  2937. (lang_decl): ... here. Add next.
  2938. (DECL_SAVED_TREE): Adjust accordingly.
  2939. (DECL_IMPLICIT_TYPEDEF_P): New macro.
  2940. (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
  2941. (DECL_STMT_DECL): Likewise.
  2942. (create_implicit_typedef): New function.
  2943. (maybe_push_decl): Likewise.
  2944. (tsubst_default_argument): New function.
  2945. (at_function_scope_p): Likewise.
  2946. (add_decl_stmt): Likewise.
  2947. (push_permanent_obstack): Likewise.
  2948. * call.c (convert_default_arg): Use tsubst_default_argument.
  2949. * class.c (add_method): Use push_permanent_obstack.
  2950. (build_self_reference): Create a TEMPLATE_DECL for the
  2951. self-reference, if necessary.
  2952. * decl.c (pseudo_global_level_p): Only look at the current binding
  2953. level.
  2954. (push_binding): Use push_permanent_obstack.
  2955. (create_implicit_typedef): New function.
  2956. (pushtag): Use it.
  2957. (duplicate_decls): Use push_permanent_obstack.
  2958. (maybe_push_decl): New function.
  2959. (start_decl): Use it. Remove dead code. Use add_decl_stmt.
  2960. (start_decl_1): Remove dead code.
  2961. (cp_finish_decl): Remove DECL_STMT handling here. Don't use
  2962. pseudo_global_level_p.
  2963. (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
  2964. template.
  2965. (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
  2966. pseudo_global_level_p.
  2967. * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
  2968. a template.
  2969. (get_sentry): Use push_permanent_obstack.
  2970. * dump.c (dequeue_and_dump): Enable DECL_STMT.
  2971. * except.c (call_eh_info): Use push_permanent_obstack.
  2972. (build_eh_type_ref): Likewise.
  2973. (do_pop_exception): Likewise.
  2974. (expand_eh_spec): Likewise.
  2975. (alloc_eh_object): Likewise.
  2976. (expand_throw): Likewise.
  2977. * init.c (build_java_class_ref): Likewise.
  2978. * lex.c (get_time_identifier): Likewise.
  2979. (free_lang_decl_chain): Correct type.
  2980. (retrofit_lang_decl): Adjust accordingly.
  2981. (build_lang_field_decl): Likewise.
  2982. * lex.h (free_lang_decl_chain): Likewise.
  2983. * parse.y (lang_extdef): Don't use pseudo_global_level_p.
  2984. * parse.c: Regenerated.
  2985. * pt.c (tsubst_default_arguments): New function.
  2986. (retrieve_local_specialization): Likewise.
  2987. (register_local_specialization): Likewise.
  2988. (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
  2989. pseudo_global_level_p to determine whether or not a template is
  2990. primary.
  2991. (lookup_template_class): Likewise. Use create_implicit_typedef.
  2992. (instantiate_class_template): Call tsubst_default_arguments for
  2993. member functions, if appropriate.
  2994. (tsubst_default_argument): New function.
  2995. (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
  2996. * search.c (at_function_scope_p): New function.
  2997. * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
  2998. (finish_label_stmt): Likewise.
  2999. (add_decl_stmt): New function.
  3000. (begin_class_definition): Likewise.
  3001. (finish_typeof): Likewise.
  3002. * tree.c (copy_template_template_parm): Likewise.
  3003. (copy_to_permanent): Likewise.
  3004. (push_permanent_obstack): Define.
  3005. (mark_addressable): Use it.
  3006. * typeck.c (mark_addressable): Likewise.
  3007. 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
  3008. * cp-tree.h (init_cplus_unsave): New.
  3009. (cplus_unsave_expr_now): New.
  3010. * lex.c (init_parse): Call init_cplus_unsave.
  3011. * tree.c (init_cplus_unsave): New.
  3012. (cplus_unsave_expr_now): New.
  3013. 1999-08-13 Mark Mitchell <mark@codesourcery.com>
  3014. * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
  3015. decl_constant_value to simplify array bounds.
  3016. 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
  3017. * lang-options.h: Add -fms-extensions.
  3018. * cp-tree.h: Declare flag_ms_extensions.
  3019. * decl2.c: Define it.
  3020. * class.c (instantiate_type): Don't complain about taking the address
  3021. of a bound member function if -fms-extensions.
  3022. * typeck.c (build_unary_op): Likewise.
  3023. * decl.c (grokdeclarator): Or about implicit int.
  3024. * init.c (resolve_offset_ref): Or about implicit '&'.
  3025. 1999-08-11 Mark Mitchell <mark@codesourcery.com>
  3026. * cp-tree.h (minimal_parse_mode): Remove.
  3027. (finish_label_stmt): New function.
  3028. * decl.c (saved_scope): Remove minimal parse mode.
  3029. (maybe_push_to_top_level): Don't save it.
  3030. (pop_from_top_level): Don't restore it.
  3031. (define_label): Split out template-handling code to semantics.c.
  3032. (start_decl): Don't use minimal_parse_mode.
  3033. (cp_finish_decl): Likewise.
  3034. (start_function): Don't increment it.
  3035. (store_return_init): Don't use it.
  3036. (finish_function): Don't decrement it.
  3037. * parse.y (label_colon): Use finish_label_stmt throughout.
  3038. * parse.c: Regenerated.
  3039. * pt.c (minimal_parse_mode): Don't define it.
  3040. (tsubst_expr): Use finish_label_stmt.
  3041. * semantics.c (finish_label_stmt): New function.
  3042. * dump.c (queue): Be careful when computing bitmasks.
  3043. (dequeue_and_dump): Describe binfos as binfos, not as
  3044. vectors.
  3045. * parse.y (pedantic): Give it itype. Adjust usage accordingly
  3046. throughout.
  3047. * parse.c: Regenerated.
  3048. * Make-lang.in (CXX_SRCS): Remove sig.c.
  3049. * Makefile.in (CXX_OBJS): Remove sig.o.
  3050. (sig.o): Remove.
  3051. * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
  3052. (CPTI_SIGNATURE_TYPE): Likewise.
  3053. (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
  3054. (opaque_type_node): Likewise.
  3055. (signature_type_node): Likewise.
  3056. (sigtable_entry_type): Likewise.
  3057. (flag_handle_signatures): Likewise.
  3058. (lang_type): Remove is_signature, is_signature_pointer,
  3059. is_signature_reference, has_opaque_typedecls,
  3060. sigtables_has_been_generated. Adjust dummy. Remove signature,
  3061. signature_pointer_to, signature_reference_to.
  3062. (IS_SIGNATURE): Remove.
  3063. (SET_SIGNATURE): Remove.
  3064. (CLEAR_SIGNATURE): Remove.
  3065. (IS_SIGNATURE_POINTER): Remove.
  3066. (IS_SIGNATURE_REFERENCE): Remove.
  3067. (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
  3068. (SIGTABLE_HAS_BEEN_GENERATED): Remove.
  3069. (CLASSTYPE_SIGNATURE): Remove.
  3070. (SIGNATURE_TYPE): Remove.
  3071. (SIGNATURE_METHOD_VEC): Remove.
  3072. (SIGNATURE_POINTER_TO): Remove.
  3073. (SIGNATURE_REFERENCE_TO): Remove.
  3074. (lang_decl_flags): Remove is_default_implementation. Rename
  3075. memfunc_pointer_to to saved_tree.
  3076. (IS_DEFAULT_IMPLEMENTATION): Remove.
  3077. (DECL_MEMFUNC_POINTER_TO): Remove.
  3078. (DECL_MEMFUNC_POINTING_TO): Remove.
  3079. (DECL_SAVED_TREE): Adjust definition.
  3080. (tag_types): Remove signature_type_node.
  3081. (SIGNATURE_FIELD_NAME): Remove.
  3082. (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
  3083. (SIGNATURE_OPTR_NAME): Likewise.
  3084. (SIGNATURE_SPTR_NAME): Likewise.
  3085. (SIGNATURE_POINTER_NAME): Likewise.
  3086. (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
  3087. (SIGNATURE_REFERENCE_NAME): Likewise.
  3088. (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
  3089. (SIGTABLE_PTR_TYPE): Likewise.
  3090. (SIGTABLE_NAME_FORMAT): Likewise.
  3091. (SIGTABLE_NAME_FORMAT_LONG): Likewise.
  3092. (SIGTABLE_TAG_NAME): Likewise.
  3093. (SIGTABLE_VB_OFF_NAME): Likewise.
  3094. (SIGTABLE_VT_OFF_NAME): Likewise.
  3095. (finish_base_specifiers): Change prototype.
  3096. (build_signature_pointer_type): Remove.
  3097. (build_signature_reference_type): Remove.
  3098. (build_signature_pointer_constructor): Remove.
  3099. (build_signature_method_call): Remove.
  3100. (build_optr_ref): Likewise.
  3101. (append_signature_fields): Likewise.
  3102. (signature_error): Likewise.
  3103. * call.c (build_this): Remove signature support.
  3104. (build_over_call): Likewise.
  3105. (build_new_method_call): Likewise.
  3106. * class.c (add_implicitly_declared_members): Likewise.
  3107. (finish_struct_1): Likewise.
  3108. (finish_struct): Likewise.
  3109. * cvt.c (cp_convert_to_pointer): Likewise.
  3110. (convert_to_pointer_force): Likewise.
  3111. (ocp_convert): Likewise.
  3112. * decl.c (sigtable_decl_p): Remove.
  3113. (init_decl_processing): Remove support for signatures.
  3114. (cp_finish_decl): Likewise.
  3115. (grokdeclarator): Likewise.
  3116. (grokparms): Likewise.
  3117. (xref_tag): Likewise.
  3118. (start_function): Likewise.
  3119. (start_method): Likewise.
  3120. * decl2.c (finish_sigtable_vardecl): Remove.
  3121. (flag_handle_signatures): Remove.
  3122. (lang_f_options): Remove handle-signatures.
  3123. (grokfield): Remove support for signatures.
  3124. (grokbitfield): Likewise.
  3125. (finish_file): Likewise.
  3126. (reparse_absdcl_as_casts): Likewise.
  3127. * error.c (dump_type_real): Likewise.
  3128. (dump_function_decl): Likewise.
  3129. * friend.c (make_friend_class): Likewise.
  3130. * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
  3131. * hash.h: Regenerated.
  3132. * init.c (build_new_1): Remove support for signatures.
  3133. * lang-options.h: Remove -fhandle-signatures,
  3134. -fno-handle-signatures.
  3135. * lex.c (init_parse): Remove support for signatures.
  3136. (yyprint): Likewise.
  3137. * lex.h (rid): Remove RID_SIGNATURE.
  3138. * method.c (build_decl_overload_real): Remove support for
  3139. signatures.
  3140. (hack_identifier): Likewise.
  3141. * parse.y (base_class): Likewise.
  3142. (base_class.1): Likewise.
  3143. (access_specifier): Likewise.
  3144. * search.c (lookup_member): Likewise.
  3145. * semantics.c (finish_qualified_object_call_expr): Likewise.
  3146. (finish_template_type_parm): Likewise.
  3147. (begin_class_definition): Likewise.
  3148. (finish_base_specifier): Likewise.
  3149. * sig.c: Remove.
  3150. * tree.c (build_cplus_method_type): Remove support for signatures.
  3151. * typeck.c (require_complete_type): Likewise.
  3152. (c_sizeof): Likewise.
  3153. (c_alignof): Likewise.
  3154. (build_object_ref): Likewise.
  3155. (build_component_ref): Likewise.
  3156. (build_indirect_ref): Likewise.
  3157. (build_c_cast): Likewise.
  3158. (build_modify_expr): Likewise.
  3159. (convert_for_initialization): Likewise.
  3160. * typeck2.c (signature_error): Remove.
  3161. (store_init_value): Remove support for signatures.
  3162. (digest_init): Likewise.
  3163. (build_x_arrow): Likewise.
  3164. (build_functional_cast): Likewise.
  3165. * xref.c (GNU_xref_decl): Likewise.
  3166. 1999-08-10 Martin v. Löwis <martin@mira.isdn.cs.tu-berlin.de>
  3167. * lex.c (do_identifier): Remove unnecessary lookup of class field.
  3168. 1999-08-09 Martin v. Löwis <martin@mira.isdn.cs.tu-berlin.de>
  3169. * decl2.c (set_decl_namespace): Do not complain about non-matching
  3170. decls if processing a template.
  3171. 1999-08-09 Mark Mitchell <mark@codesourcery.com>
  3172. * decl.c (build_ptrmemfunc_type): Handle qualified
  3173. pointer-to-member types here.
  3174. * tree.c (cp_build_qualified_type_real): Simplify handling here.
  3175. 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3176. * lex.c (lang_identify): Likewise.
  3177. 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
  3178. * Makefile.in: Update dependencies.
  3179. * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
  3180. NULL_RTX.
  3181. * decl.c: Include "function.h"
  3182. (cleanup_label, return_label): Delete declarations.
  3183. (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
  3184. (finish_function): Rename last_parm_insn variable to
  3185. fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
  3186. * decl2.c: Include "function.h".
  3187. (rtl_expr_chain): Delete declaration.
  3188. * method.c: Include "function.h"
  3189. * tree.c (build_vbase_pointer_fields): Don't initialize
  3190. DECL_SAVED_INSNS with NULL_RTX.
  3191. * typeck.c: Include "function.h"
  3192. 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
  3193. * semantics.c (begin_function_try_block, finish_function_try_block,
  3194. finish_function_handler_sequence): New fns.
  3195. * parse.y (function_try_block): Use them.
  3196. * pt.c (instantiate_decl): Likewise.
  3197. * cp-tree.h: Declare in_function_try_handler.
  3198. * decl.c: Define it.
  3199. (start_function): Clear it.
  3200. (struct cp_function, push_cp_function_context): Save it.
  3201. (pop_cp_function_context): Restore it.
  3202. * parse.y (function_try_block): Set and clear it.
  3203. * except.c (expand_end_catch_block): Rethrow if we reach the end
  3204. of a function-try-block handler in a ctor or dtor.
  3205. * typeck.c (c_expand_return): Complain about returning from a
  3206. function-try-block handler of a ctor.
  3207. * parse.y (function_try_block): Call end_protect_partials
  3208. before expand_start_all_catch.
  3209. 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
  3210. * decl.c (struct binding_level): Add eh_region field.
  3211. (push_binding_level): Set it.
  3212. (define_label): Complain about jumping into an EH block.
  3213. * ptree.c (print_lang_type): Print the real type of a PMF.
  3214. Print what exceptions a fn type throws.
  3215. 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3216. * class.c (count_fields, add_fields_to_vec): Add static prototype.
  3217. * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
  3218. get_id_2, composite_pointer_type, dump_node_to_file): Constify a
  3219. char*.
  3220. * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
  3221. Constify a char*.
  3222. * decl2.c (finish_static_data_member_decl, grokfield): Constify a
  3223. char*.
  3224. * dump.c (queue_and_dump_index, dump_int, dump_string,
  3225. dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
  3226. a char*.
  3227. (dump_stmt): Add static prototype.
  3228. * errfn.c (cp_thing): Constify a char*.
  3229. * error.c (dump_unary_op, dump_binary_op, aggr_variety,
  3230. dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
  3231. dump_expr): Constify a char*.
  3232. * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
  3233. read_line_number): Add static prototype.
  3234. (opname_tab, assignop_tab, operator_name_string): Constify a char*.
  3235. (real_yylex): Move label `letter' into the scope where it is used.
  3236. * method.c (build_mangled_template_parm_index, build_overload_int,
  3237. build_decl_overload_real, get_id_2): Constify a char*.
  3238. * search.c (check_final_overrider): Make static.
  3239. * typeck.c (composite_pointer_type): Constify a char*.
  3240. 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
  3241. * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
  3242. we're looking at a class.
  3243. * decl.c (lookup_name_real): Set the complain flag if we're
  3244. looking for a namespace member.
  3245. * lex.c (real_yylex): We can have a number with no digits.
  3246. * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
  3247. * search.c (binfo_from_vbase): New fn.
  3248. * cp-tree.h: Declare it.
  3249. * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
  3250. from pointer to member of virtual base.
  3251. * typeck.c (get_delta_difference): Likewise.
  3252. 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
  3253. * pt.c (tsubst): Use build_index_type to build in-template array
  3254. index type. Fixes g++.oliva/dwarf1.C.
  3255. * decl.c (grokdeclarator): Likewise, just for consistency, as it
  3256. doesn't seem to trigger the bug without it.
  3257. 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
  3258. * typeck2.c (add_exception_specifier): Use complete_type.
  3259. 1999-08-06 Mark Mitchell <mark@codesourcery.com>
  3260. * error.c (dump_expr): Handle EXACT_DIV_EXPR.
  3261. (dump_binary_op): Bulletproof.
  3262. * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
  3263. * tree.c (search_tree): Don't enumerate all the nodes of classes
  3264. `1', `2', and `<'; handle them generically. Don't be sorry about
  3265. "unrecognized tree codes"; just abort.
  3266. (no_linkage_check): Don't do linkage checks for templates.
  3267. * tree.c (cp_build_qualified_type_real): Handle
  3268. pointer-to-member-function types correctly.
  3269. 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
  3270. * decl.c (pushdecl): Only give an error for shadowing a parm
  3271. from *this* function.
  3272. Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
  3273. * typeck2.c: Update URLs and mail addresses.
  3274. 1999-08-04 Nathan Sidwell <nathan@acm.org>
  3275. * cp-tree.h (empty_except_spec): New global var.
  3276. (compexcepttypes): Remove prototype.
  3277. (comp_except_specs): Prototype new global function.
  3278. (add_exception_specifier): Prototype new global function.
  3279. * decl.c (empty_except_spec): Define new global var.
  3280. (duplicate_decls): Use comp_except_specs, reword error message.
  3281. (init_decl_processing): Initialize empty_except_spec.
  3282. Adjust build_exception_variant calls.
  3283. * parse.y (exception_specification_opt): Use empty_except_spec.
  3284. (ansi_raise_identifier): Call check_for_new_type.
  3285. (ansi_raise_identifiers): Use add_exception_specifier.
  3286. * pt.c (tsubst): Use add_exception_specifier to build exception
  3287. specifier.
  3288. * search.c (check_final_overrider): New static function, broken
  3289. out of get_matching_virtual. Check throw specifiers, reword
  3290. diagnostics.
  3291. (get_matching_virtual): Use check_final_overrider.
  3292. * tree.c (build_exception_variant): Use comp_except_specs.
  3293. * typeck.c (compexcepttypes): Remove.
  3294. (comp_except_types): New static function, helper for
  3295. comp_except_specs. Compare two types as exception specifiers.
  3296. (comp_except_specs): New global function, compare two exception
  3297. specifiers.
  3298. (comptypes): Adjust for comp_except_specs.
  3299. * typeck2.c (add_exception_specifier): New global function.
  3300. * class.c (check_for_override): Reword error message.
  3301. 1999-08-03 Nathan Sidwell <nathan@acm.org>
  3302. * call.c (convert_arg_to_ellipsis): Use pod_type_p.
  3303. * cp-tree.h (struct lang_type): Added non_pod_class flag.
  3304. (CLASSTYPE_NON_POD_P): New macro to access it.
  3305. * class.c (finish_struct_1): Determine non-PODness.
  3306. Check for arrays of pointers (-Weffc++).
  3307. Remove array inspection duplicated code.
  3308. * tree.c (pod_type_p): Detect non-pod non-aggregate types.
  3309. Use CLASSTYPE_NON_POD_P.
  3310. 1999-08-03 Nathan Sidwell <nathan@acm.org>
  3311. * class.c (duplicate_tag_error): Preserve template information.
  3312. 1999-08-03 Nathan Sidwell <nathan@acm.org>
  3313. * decl.c (start_enum): Show location of previous definition.
  3314. * parse.y (enumlist_opt): New reduction.
  3315. (structsp): Simplify enum rules to use enumlist_opt.
  3316. 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
  3317. * lex.c (yyprint): Handle PFUNCNAME.
  3318. * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
  3319. build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
  3320. 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
  3321. * decl.c (start_decl): Set attributes before duplicate_decls call.
  3322. 1999-08-02 Mark Mitchell <mark@codesourcery.com>
  3323. * Make-lang.in (CXX_SRCS): Add dump.c.
  3324. * Makefile.in (CXX_OBJS): Add dump.o.
  3325. (dump.o): New target.
  3326. * cp-tree.h (DECL_CONV_FN_P): Document.
  3327. (DECL_OVERLOADED_OPERATOR_P): New function.
  3328. (TYPE_PTRMEM_CLASS_TYPE): New macro.
  3329. (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
  3330. (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
  3331. (ASM_VOLATILE_P): New macro.
  3332. (STMT_LINENO): Likewise.
  3333. (cp_namespace_decls): New function.
  3334. (dump_node_to_file): New function.
  3335. * decl.c (cp_namespace_decls): New function.
  3336. (walk_namespaces_r): Use it.
  3337. (wrapup_globals_for_namespace): Likewise.
  3338. * decl2.c (flag_dump_translation_unit): New variable.
  3339. (lang_decode_option): Handle -fdump-translation-unit.
  3340. (finish_file): If flag_dump_translation_unit is set, dump the
  3341. translation unit.
  3342. * dump.c: New file.
  3343. * lang-options.h: Add -fdump-translation-unit.
  3344. * pt.c (tsubst_template_parms): Robustify.
  3345. (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
  3346. (tsubst_expr): Use STMT_LINENO.
  3347. * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
  3348. for invalid cv-qualifiers even while building templates.
  3349. 1999-08-02 Richard Henderson <rth@cygnus.com>
  3350. * call.c: Include defaults.h instead of expr.h.
  3351. * decl.c: Likewise.
  3352. * pt.c: Likewise.
  3353. * typeck.c: Include defaults.h.
  3354. 1999-08-02 Mark Mitchell <mark@codesourcery.com>
  3355. * lex.c (errorcount, sorrycount): Don't declare.
  3356. * repo.c (errorcount, sorrycount): Likewise.
  3357. * typeck2.c (errorcount, sorrycount): Likewise.
  3358. 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
  3359. * call.c (convert_default_arg, build_over_call): Change all uses of
  3360. PROMOTE_PROTOTYPES, so that it tests it as a C expression.
  3361. Ensure expr.h is included.
  3362. * decl.c (grokparams): Ditto.
  3363. * pt.c (tsubst_decl): Ditto.
  3364. * typeck.c (convert_arguments): Ditto.
  3365. 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
  3366. * class.c (mark_overriders): Fix order of args to overrides.
  3367. (warn_hidden): Likewise. Fix for having virtual and non-virtual
  3368. functions with the same name.
  3369. 1999-08-02 Richard Henderson <rth@cygnus.com>
  3370. * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
  3371. 1999-08-01 Mark Mitchell <mark@codesourcery.com>
  3372. * call.c (build_conditional_expr): Fix typo in comment.
  3373. 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
  3374. * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
  3375. case_stack; use in_control_zone_p.
  3376. * typeck.c (c_expand_return): Likewise.
  3377. 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
  3378. * except.c (catch_clauses): Delete declaration.
  3379. 1999-07-30 Mark Mitchell <mark@codesourcery.com>
  3380. * call.c (build_conditional_expr): Call convert_from_reference to
  3381. avoid reference/non-reference type confusion. Fix typo.
  3382. 1999-07-30 Richard Henderson <rth@cygnus.com>
  3383. * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
  3384. * cp-tree.h (initializer_constant_valid_p): Remove.
  3385. 1999-07-28 Mark Mitchell <mark@codesourcery.com>
  3386. * call.c (conditional_conversion): Don't build BASE_CONVs for
  3387. conversions between things that have the same type.
  3388. (build_conditional_expr): Tweak.
  3389. (convert_like): Some BASE_CONVs really do require the generation
  3390. of code.
  3391. * init.c (perform_member_init): Don't go through build_modify_expr
  3392. for simple initializations.
  3393. 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
  3394. * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
  3395. * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
  3396. virtual functions and MI. Simplify.
  3397. * method.c: Remove prototype for largest_union_member.
  3398. * pt.c (determine_specialization): Fix uninitialized warning.
  3399. * lex.c (real_yylex): Likewise.
  3400. 1999-07-27 Mark Mitchell <mark@codesourcery.com>
  3401. * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
  3402. here too.
  3403. * cp-tree.h (BINFO_VIRTUALS): Document new format.
  3404. * class.c (modify_one_vtable): Change prototype accordingly.
  3405. (modify_all_vtables): Likewise.
  3406. (modify_all_direct_vtables): Likewise.
  3407. (modify_all_indirect_vtables): Likewise.
  3408. (build_vtable_entry_for_fn): New function.
  3409. (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
  3410. (modify_vtable_entry): Likewise.
  3411. (add_virtual_function): Likewise.
  3412. (build_vtbl_initializer): New function.
  3413. (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
  3414. (fixup_vtable_deltas1): Likewise.
  3415. (fixup_vtable_deltas): Likewise.
  3416. (override_one_vtable): Likewise.
  3417. (finish_struct_1): Likewise.
  3418. * error.c (dump_expr): Likewise.
  3419. * search.c (get_abstract_virtuals_1): Likewise.
  3420. (get_abstract_virtuals): Likewise.
  3421. (expand_upcast_fixups): Likewise.
  3422. * tree.c (debug_binfo): Likewise.
  3423. * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
  3424. __pure_virtual here.
  3425. 1999-07-26 Mark Mitchell <mark@codesourcery.com>
  3426. * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
  3427. as per 1999-07-26 change.
  3428. * typeck.c (c_sizeof): Don't allow non-static data members.
  3429. (expr_sizeof): Likewise.
  3430. 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
  3431. * input.c (feed_input): Only touch lineno and input_filename
  3432. if !USE_CPPLIB. Save the old values before setting the new ones.
  3433. * input.c (feed_input): Add file, line parms.
  3434. * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
  3435. (real_yylex): Check linemode before input_redirected().
  3436. * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
  3437. from op new to warning.
  3438. 1999-07-26 Mark Mitchell <mark@codesourcery.com>
  3439. * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
  3440. * call.c: All uses changed.
  3441. * typeck.c: Likewise.
  3442. 1999-07-26 Nathan Sidwell <nathan@acm.org>
  3443. * exception.cc (__cplus_type_matcher): Match __eh_matcher
  3444. prototype.
  3445. 1999-07-26 Mark Mitchell <mark@codesourcery.com>
  3446. * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
  3447. (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
  3448. (strip_top_quals): Declare.
  3449. (ncp_convert): Likewise.
  3450. (type_after_usual_arithmetic_conversions): Likewise.
  3451. (composite_pointer_type): Likewise.
  3452. * call.c (strip_top_quals): Don't make it static.
  3453. (promoted_arithmetic_type_p): New function.
  3454. (conditional_conversion): Likewise.
  3455. (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
  3456. (standard_conversion): Use same_type_p. Don't build BASE_CONVs
  3457. for converting a type to itself.
  3458. (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
  3459. (implicit_conversion): Make sure the from and to types are
  3460. complete.
  3461. (add_builtin_candidate): Correct handling of ?: operator.
  3462. (add_builtin_candidates): Improve documentation.
  3463. (build_conditional_expr): New function.
  3464. (can_convert): Implement in terms of can_convert_arg.
  3465. (ncp_convert): New function.
  3466. * typeck.c (type_after_usual_arithmetic_conversions): New
  3467. function, split out from common_type.
  3468. (composite_pointer_type): New function, split out from
  3469. build_conditional_expr.
  3470. (common_type): Use type_after_usual_arithmetic_conversions.
  3471. Remove redundant attribute merging.
  3472. (comptypes): Tidy. Handle COMPLEX_TYPE.
  3473. (build_binary_op_nodefault): Use null_ptr_cst_p.
  3474. (build_conditional_expr): Remove.
  3475. (convert_for_assignment): Use new conversion functions.
  3476. * cp-tree.h (abstract_virtuals_error): Change declaration.
  3477. * typeck2.c (abstract_virtuals_error): Check to see if an error
  3478. occurred, and return a boolean value accordingly.
  3479. (build_functional_cast): Adjust accordingly.
  3480. * class.c (finish_struct_1): Likewise.
  3481. * cvt.c (ocp_convert): Likewise.
  3482. * decl.c (cp_finish_decl): Likewise.
  3483. (grokparams): Likewise.
  3484. (grok_op_properties): Likewise.
  3485. (start_function): Likewise.
  3486. * init.c (build_new_1): Likewise.
  3487. * pt.c (unify): Don't get confused by pointers-to-member functions.
  3488. * search.c (build_cplus_new): Robustify.
  3489. 1999-07-24 Richard Henderson <rth@cygnus.com>
  3490. * gxx.gperf (__builtin_va_arg): New.
  3491. * parse.y (VA_ARG): New token.
  3492. (unary_expr): Recognize it.
  3493. Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
  3494. * g++FAQ.texi: Deleted per Joe Buck's request.
  3495. * Makefile.in: Corresponding changes.
  3496. 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
  3497. * lex.c: Sync with C frontend.
  3498. (whitespace_cr): New fn.
  3499. (skip_white_space): Use it.
  3500. (init_parse): Reorder.
  3501. (yyprint): Support CONSTANT.
  3502. (pragma_getc, pragma_ungetc): Bring back.
  3503. (read_line_number): Change in_system_header directly.
  3504. (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
  3505. (parse_float): Update to C version.
  3506. (yylex): Handle '$' under the letter case.
  3507. Remove looking_for_typename handling.
  3508. Support hex floating point constants.
  3509. Follow C's lead for choosing type of integer constants.
  3510. Rearrange stuff to match C frontend.
  3511. (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
  3512. * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
  3513. 1999-07-23 Mark Mitchell <mark@codesourcery.com>
  3514. * call.c (reference_binding): Tweak.
  3515. (mayble_handle_implicit_object): Use direct_reference_binding to
  3516. create the right implicit conversion sequence.
  3517. 1999-07-22 Mark Mitchell <mark@codesourcery.com>
  3518. * pt.c (convert_nontype_argument): Don't call decl_constant_value
  3519. if we're converting to a reference type.
  3520. * call.c (NEED_TEMPORARY_P): New macro.
  3521. (standard_conversion): Set it, for derived-to-base conversions.
  3522. (reference_related_p): New function.
  3523. (reference_compatible_p): Likewise.
  3524. (convert_class_to_reference): Likewise.
  3525. (direct_reference_binding): Likewise.
  3526. (reference_binding): Rework for standards-compliance.
  3527. (convert_like): Adjust accordingly.
  3528. (maybe_handle_ref_bind): Simplify; the right conversion sequences
  3529. are now built up in reference_binding.
  3530. (initialize_reference): New function.
  3531. * cp-tree.h (ICS_USER_FLAG): Document.
  3532. (ICS_THIS_FLAG): Likewise.
  3533. (ICS_BAD_FLAG): Likewise.
  3534. (NEED_TEMPORARY_P): Likewise.
  3535. (cp_lvalue_kind): New type.
  3536. (real_lvalue_p): Return it.
  3537. * error.c (dump_expr): Provide more accurate representation for
  3538. AGGR_INIT_EXPRs.
  3539. * init.c (expand_default_init): Do not try to perform implicit
  3540. conversions for a brace-enclosed initializer.
  3541. * search.c (lookup_conversions): Document.
  3542. * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
  3543. appropriately.
  3544. (real_lvalue_p): Adjust accordingly.
  3545. (lvalue_p): Likewise.
  3546. (build_cplus_new): Don't allow the creation of an abstract class.
  3547. * typeck.c (convert_for_initialization): Use initialize_reference.
  3548. 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
  3549. * lex.c (real_yylex) : Correct the test for overflow when lexing
  3550. integer literals.
  3551. 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
  3552. * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
  3553. not DECL_BUILT_IN, to determine if a function is internally declared.
  3554. (duplicate_decls): Likewise. Improve handling of builtins.
  3555. (push_overloaded_decl): Remove special handling of builtins.
  3556. * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
  3557. * decl.c (grokdeclarator): Pull out decl_constant_value in
  3558. templates, too.
  3559. * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
  3560. * cp-tree.h, pt.c, semantics.c: Adjust.
  3561. * method.c (largest_union_member): Remove.
  3562. * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
  3563. * lex.c (token_getch, token_put_back): New fns.
  3564. (real_yylex): Use them.
  3565. * lex.c (lang_init): Generalize.
  3566. (lang_init_options): Tell cpplib this is C++.
  3567. (nextchar): Remove. Replace uses with put_back.
  3568. (skip_white_space): Handle linemode here. Optimize for cpplib.
  3569. (extend_token_buffer_to): New fn.
  3570. (extend_token_buffer): Use it.
  3571. (read_line_number, check_newline): Just deal with tokens.
  3572. (real_yylex): More cpplib optimizations. Simplify. Don't produce
  3573. EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
  3574. * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
  3575. * parse.y (PAREN_STAR_PAREN): Remove.
  3576. * input.c: Don't use the putback machinery with cpplib.
  3577. (sub_getch): Fold back into getch.
  3578. (getch): Don't handle linemode here.
  3579. (feed_input): Unget any text in the token buffer.
  3580. * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
  3581. nextyychar, nextyylval): Remove.
  3582. 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
  3583. Jason Merrill <jason@yorick.cygnus.com>
  3584. * lex.c (indent_level): New variable.
  3585. (init_parse): Set cpp_token to CPP_DIRECTIVE.
  3586. (consume_string): Make this smart about USE_CPPLIB.
  3587. (yyungetc): Use put_back function.
  3588. (pragma_getc, pragma_ungetc): Functions deleted.
  3589. (check_newline): Rewrite to be intelligent about USE_CPPLIB.
  3590. Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
  3591. pragma_ungetc.
  3592. (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
  3593. Also, clean up cases where we redundantly set token_buffer[0].
  3594. (read_line_number): New fn.
  3595. * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
  3596. (end_input): Call cpp_pop_buffer if USE_CPPLIB.
  3597. (sub_getch): Conditionalize out code that's not appropriate if
  3598. USE_CPPLIB.
  3599. (put_back): Rewrite in case USE_CPPLIB is defined.
  3600. (input_redirected): Ditto.
  3601. Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
  3602. * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
  3603. c_global_trees and accessor macros defined in c-common.h.
  3604. (cp_tree_index): New enumeration.
  3605. (cp_global_trees): Declare new array. Add accessor macros for it, and
  3606. delete declarations of tree nodes replaced by it.
  3607. (builtin_function): Delete macro, add declaration for new function.
  3608. Include c-common.h.
  3609. * decl.c: Delete definitions for tree nodes that were replaced by
  3610. cp_global_trees and c_global_trees.
  3611. (init_decl_processing): Call c_common_nodes_and_builtins; delete code
  3612. to generate the common builtins here.
  3613. (builtin_function): New function.
  3614. * decl2.c (abort_fndecl): Delete declaration.
  3615. * except.c (expand_builtin_return_address): Delete declaration.
  3616. (builtin_return_address_fndecl): Delete variable.
  3617. (const_ptr_type_node): Delete declaration.
  3618. * lex.c (cons_up_default_function): Delete declaration of
  3619. void_list_node.
  3620. * parse.y (void_list_node): Delete declaration.
  3621. * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
  3622. Delete variables.
  3623. (const_string_type_node): Delete declaration.
  3624. * search.c (abort_fndecl): Delete declaration.
  3625. * Makefile.in: Update dependencies.
  3626. 1999-07-19 Mark Mitchell <mark@codesourcery.com>
  3627. * pt.c (check_default_tmpl_args): Move test for missing default
  3628. arguments here, from ...
  3629. (end_template_parm_list): Here.
  3630. 1999-07-18 Mark Mitchell <mark@codesourcery.com>
  3631. * decl.c (lookup_nested_type): Remove.
  3632. (pushtag): Don't call it.
  3633. Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
  3634. * Makefile.in (INTERFACE): Bump to 2.
  3635. 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
  3636. * typeck2.c (my_friendly_abort): Updated URL with bug reporting
  3637. instructions to gcc.gnu.org. Removed e-mail address.
  3638. 1999-07-17 Mark Mitchell <mark@codesourcery.com>
  3639. * pt.c (determine_specialization): Tighten error-checking.
  3640. (end_template_parm_list): Likewise.
  3641. 1999-07-14 Mark Mitchell <mark@codesourcery.com>
  3642. * pt.c (check_default_tmpl_args): Handle friends defined in the
  3643. class just like member functions defined in the class.
  3644. 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
  3645. Jason Merrill <jason@yorick.cygnus.com>
  3646. * cp-tree.h (struct lang_decl): Added field for storing sorted
  3647. FIELD_DECLs (used in TYPE_DECLs).
  3648. (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
  3649. (DECL_SORTED_FIELDS): New macro.
  3650. * class.c (method_name_cmp): New function.
  3651. (finish_struct_methods): Modified to support sorting and searching
  3652. methods.
  3653. (finish_struct_anon): Changed code in inner loop to use ELT rather
  3654. than UELT (which required an extra indirection for every reference).
  3655. (field_decl_cmp): New function to support sorting FIELD_DECLs.
  3656. (finish_struct_1): Sort fields.
  3657. * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
  3658. (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
  3659. Also, switch to using array indexing rather than a changing pointer.
  3660. * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
  3661. DECL_SORTED_FIELDS.
  3662. 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
  3663. * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
  3664. casts in system headers or extern "C" blocks.
  3665. * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
  3666. errors to pedwarn.
  3667. 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
  3668. * decl2.c (write_virtuals): Deleted declaration.
  3669. * cp-tree.h (write_virtuals): Deleted extern declaration.
  3670. * class.c (finish_struct_1): Removed #if 0'd code that mentions
  3671. write_virtuals.
  3672. * semantics.c (begin_class_definition): Rewrite code to not depend
  3673. on write_virtuals.
  3674. * lex.c (cp_pragma_interface): New function.
  3675. (cp_pragma_implementation): Likewise.
  3676. (handle_cp_pragma): Call them.
  3677. * typeck.c (comptypes): Simplify C code in look_hard.
  3678. * xref.c (PALLOC): Use xcalloc, not calloc.
  3679. (SALLOC): Use xmalloc, not malloc.
  3680. * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
  3681. * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
  3682. is NO_DEBUG.
  3683. * decl.c (duplicate_decls): If a redeclaration doesn't match the
  3684. initial declaration, then don't save the inline info and by all
  3685. means don't mark the function as a builtin function.
  3686. * decl.c (lookup_name_real): Set NONCLASS to 1 if
  3687. CURRENT_CLASS_TYPE is 0.
  3688. * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
  3689. NULL_TREE.
  3690. * ptree.c (print_lang_type): Added vtable-needs-writing.
  3691. Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
  3692. * decl2.c (mark_vtable_entries): Fix check for rtti offset.
  3693. 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
  3694. * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
  3695. Merged into c-common.
  3696. 1999-07-05 Dave Brolley <brolley@cygnus.com>
  3697. * lex.c (errorcount): Declare it.
  3698. (finish_parse): Update errorcount for when using CPPLIB.
  3699. 1999-07-05 Mark Mitchell <mark@codesourcery.com>
  3700. * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
  3701. parameters.
  3702. (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
  3703. * decl.c (push_class_binding): Use it.
  3704. (lookup_name_real): Likewise.
  3705. 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
  3706. * cp-tree.h (widest_integer_literal_type_node,
  3707. widest_unsigned_literal_type) : New.
  3708. * decl.c (widest_integer_literal_type_node,
  3709. widest_unsigned_literal_type) : New.
  3710. (init_decl_processing): Handle/use the two new types.
  3711. * lex.c (real_yylex): Same.
  3712. * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
  3713. Same.
  3714. 1999-07-01 Mark Mitchell <mark@codesourcery.com>
  3715. * decl.c (grokdeclarator): Don't give names "for linkage purposes"
  3716. to anonymous cv-qualified types.
  3717. 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
  3718. * lex.c (real_yylex) : Change integer literal overflow handling to
  3719. be like c-lex.c.
  3720. * lex.c (real_yylex): Improve 'integer constant out of range' messages.
  3721. 1999-06-28 Richard Henderson <rth@cygnus.com>
  3722. * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
  3723. 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
  3724. * error.c (dump_type_real): Handle TREE_LIST again.
  3725. * typeck.c (comp_target_parms): Don't complain about
  3726. converting from () to (...) if !flag_strict_prototype.
  3727. * decl.c (grokdeclarator): Update the names of all variants when
  3728. de-anonymizing.
  3729. 1999-06-21 Mark Mitchell <mark@codesourcery.com>
  3730. * init.c (expand_aggr_vbase_init): Rename to
  3731. construct_virtual_bases. Conditionalize construction here,
  3732. rather than ...
  3733. (emit_base_init): Here.
  3734. 1999-06-19 Mark Mitchell <mark@codesourcery.com>
  3735. * semantics.c (finish_asm_stmt): Apply decay conversions to
  3736. input operands.
  3737. * decl.c (expand_static_init): When building an anonymous function
  3738. for use with atexit, compute its body before and after entering
  3739. the function.
  3740. * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
  3741. EXIT_EXPR.
  3742. 1999-06-18 Mark Mitchell <mark@codesourcery.com>
  3743. * init.c (expand_aggr_vbase_init): Add flag parameter.
  3744. (build_partial_cleanup_for): Remove, inlining into ..
  3745. (expand_cleanup_for_base): ... here. Take flag parameter.
  3746. (emit_base_init): Pass the in_chrg parameter to
  3747. emit_aggr_vbase_init.
  3748. (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
  3749. 1999-06-16 Mark Mitchell <mark@codesourcery.com>
  3750. * decl2.c (import_export_decl): Use same_type_p, rather than
  3751. relying on pointer-equality for types.
  3752. * method.c (do_build_copy_constructor): Simplify.
  3753. * call.c (build_method_call): Remove bogus code for two-argument
  3754. delete.
  3755. * init.c (build_new_1): Expand on comment, and remove dead code.
  3756. * init.c (expand_cleanup_for_base): New function, split out
  3757. from ...
  3758. (emit_base_init): Here.
  3759. (expand_aggr_vbase_init): Use it.
  3760. 1999-06-15 Mark Mitchell <mark@codesourcery.com>
  3761. * cp-tree.h (class_cache_firstobj): Declare.
  3762. (maybe_push_cache_obstack): Rename to push_cache_obstack.
  3763. * class.c (permanent_obstack): Remove declaration.
  3764. (class_cache_firstobj): Make it global.
  3765. (add_method): Don't use permanent_obstack directly.
  3766. (pushclass): Only free the class_cache_obstack if we know how far
  3767. back to free it.
  3768. (maybe_push_cache_obstack): Rename to push_cache_obstack.
  3769. * decl.c: Remove dead comment.
  3770. (saved_scope): Add class_cache_firstobj.
  3771. (push_to_top_level): Save it.
  3772. (pop_from_top_level): Restore it.
  3773. (push_class_level_binding): Use push_cache_obstack, not
  3774. maybe_push_cache_obstack.
  3775. * search.c (push_class_decls): Likewise.
  3776. 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
  3777. * pt.c (tsubst_friend_function): Push into namespace of friend
  3778. function before pushdecl'ing it.
  3779. 1999-06-14 Nathan Sidwell <nathan@acm.org>
  3780. * call.c (build_new_op): Remove REF_BIND from all operands.
  3781. 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
  3782. * init.c (build_new_1): Look up operator delete even if there was
  3783. no explicit new placement.
  3784. 1999-06-08 Nathan Sidwell <nathan@acm.org>
  3785. * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
  3786. of ...
  3787. (build_throw): ... here. Call it.
  3788. (process_start_catch_block): Call it.
  3789. 1999-06-07 Mark Mitchell <mark@codesourcery.com>
  3790. * search.c (convert_pointer_to_single_level): Reimplement without
  3791. using get_binfo.
  3792. 1999-06-06 Mark Mitchell <mark@codesourcery.com>
  3793. * method.c (is_back_referenceable_type): Back-reference bools when
  3794. not squangling.
  3795. 1999-06-07 Dave Brolley <brolley@cygnus.com>
  3796. * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
  3797. * input.c (putback_buffer): New structure type.
  3798. (putback): Replaces putback_char member.
  3799. (putback): Replaces putback_char static variable.
  3800. (feed_input): Use putback.
  3801. (end_input): Use putback.
  3802. (sub_getch): Use putback.
  3803. (put_back): Use putback.
  3804. 1999-06-05 Mark Mitchell <mark@codesourcery.com>
  3805. * decl.c (grokdeclarator): Fix typo in last change.
  3806. 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
  3807. * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
  3808. (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
  3809. 1999-06-04 Nathan Sidwell <nathan@acm.org>
  3810. * except.c (build_throw): Check throw expression validity.
  3811. 1999-06-03 Mark Mitchell <mark@codesourcery.com>
  3812. * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
  3813. just because flag_signed_bitfields is false.
  3814. 1999-06-03 Nathan Sidwell <nathan@acm.org>
  3815. * semantics.c (begin_class_definition): Update the struct's
  3816. location here ...
  3817. * class.c (finish_struct): ... rather than here.
  3818. * decl.c (make_typename_type): Don't rely on uninitialized
  3819. variable.
  3820. 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3821. * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
  3822. 1999-05-31 Mark Mitchell <mark@codesourcery.com>
  3823. * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
  3824. and friends rather than messing with current_obstack directly.
  3825. (cp_build_qualified_type_real): Rework ARRAY_TYPE
  3826. allocation to match practice throughout the rest of the
  3827. compiler.
  3828. 1999-05-30 Mark Mitchell <mark@codesourcery.com>
  3829. * lex.c (make_lang_type): Create TYPE_BINFO for
  3830. TEMPLATE_TYPE_PARMs just like for non-template types.
  3831. * decl.c (start_decl): Move checks on initialization to ...
  3832. (cp_finish_decl): Here. Tidy formatting slightly.
  3833. 1999-05-28 Mark Mitchell <mark@codesourcery.com>
  3834. * decl.c (add_binding): Don't complain about a redeclaration of a
  3835. semantically identical typedef in a local scope.
  3836. 1999-05-28 Nathan Sidwell <nathan@acm.org>
  3837. * decl.c (complete_array_type): Allocate off same obstack. Fix
  3838. DO_DEFAULT comment to match reality.
  3839. * friend.c (make_friend_class): Fix diagnostic typo.
  3840. 1999-05-28 Mark Mitchell <mark@codesourcery.com>
  3841. * decl.c (lookup_namespace_name): Handle getting a
  3842. TEMPLATE_ID_EXPR.
  3843. (expand_static_init): Don't call pushdecl for implicitly declared
  3844. `atexit' used to register destructors.
  3845. 1999-05-25 Mark Mitchell <mark@codesourcery.com>
  3846. * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
  3847. initialize a vtable.
  3848. * cp-tree.h (NAMESPACE_LEVEL): Reformat.
  3849. (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
  3850. by combining TEMPLATE_INFO and LEVEL into a single union.
  3851. (DECL_TEMPLATE_INFO): Reformat.
  3852. (DECL_SAVED_TREE): Document.
  3853. (DECL_TEMPLATE_INJECT): Remove.
  3854. * class.c (finish_struct): Remove code to deal with
  3855. DECL_TEMPLATE_INJECT.
  3856. * decl.c (maybe_process_template_type_declaration): Handle all new
  3857. types in templates uniformly.
  3858. * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
  3859. DECL_CONTEXT.
  3860. * pt.c (lookup_template_class): Inject template instantiations of
  3861. forward-declarations.
  3862. (instantiate_class_template): Remove code processing
  3863. DECL_TEMPLATE_INJECT.
  3864. * pt.c (lookup_template_class): Tweak lookup to find member
  3865. templates.
  3866. * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
  3867. ASM_CV_QUAL.
  3868. * semantics.c (finish_asm_stmt): Make strings permanent if they're
  3869. used in a template.
  3870. 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
  3871. * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
  3872. parts of pointer to data member types.
  3873. 1999-05-24 Mark Mitchell <mark@codesourcery.com>
  3874. * decl2.c (mark_vtable_entries): Don't make a copy of a function,
  3875. and then make it look like `abort'. Just use `abort' instead.
  3876. * typeck.c (build_static_cast): Don't allow static_casts that cast
  3877. away constness.
  3878. (casts_away_constness_r): New function.
  3879. (casts_away_constness): Likewise.
  3880. * decl.c (lookup_tag): Remove code no longer needed after
  3881. name-lookup improvements.
  3882. * decl2.c (handle_class_head): Make error-recovery more robust.
  3883. * friend.c (make_friend_class): Reject templated typename types.
  3884. * lex.c (is_global): A template parameter isn't global.
  3885. * parse.y (class_head): Robustify.
  3886. * parse.c: Regenerated.
  3887. 1999-05-22 Mark Mitchell <mark@codesourcery.com>
  3888. * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
  3889. INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
  3890. * cp-tree.h (push_nested_namespace): Declare.
  3891. (pop_nested_namespace): Likewise.
  3892. * decl.c (push_nested_namespace): New function.
  3893. (pop_nested_namespace): Likewise.
  3894. * pt.c (instantiate_class_template): Use them.
  3895. * tree.c (mapcar): Handle NON_LVALUE_EXPR.
  3896. * cp-tree.h (cplus_expand_constant): Declare.
  3897. * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
  3898. converted from one pointer-to-object type to another.
  3899. * expr.c (cplus_expand_constant): Don't make it static.
  3900. * typeck.c (build_component_ref): Don't crash when presented with
  3901. a component which is a TEMPLATE_DECL.
  3902. (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
  3903. cast from a pointer-to-member constant to its own type does not
  3904. result in a valid non-type template argument.
  3905. 1999-05-21 Mark Mitchell <mark@codesourcery.com>
  3906. Nathan Sidwell <nathan@acm.org>
  3907. * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
  3908. * cp-tree.h: Fix typo in documentation on pointers-to-members.
  3909. (cp_build_qualified_type): Make it a macro.
  3910. (cp_build_qualified_type_real): Declare.
  3911. * decl.c (grokdeclarator): Remove misleading comment. Avoid
  3912. problem with template parameters and restrict-qualification.
  3913. * gxx.gperf: Replace NORID with RID_UNUSED throughout.
  3914. * hash.h: Regenerated.
  3915. * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
  3916. the enumeration.
  3917. (NORID): Remove definition.
  3918. * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
  3919. (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
  3920. (fn_type_unification): Check that the function type resulting from
  3921. the deduction is legal.
  3922. (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
  3923. (unify): Use cp_build_qualified_type_real.
  3924. * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
  3925. (cp_build_qualified_type): Rename to ...
  3926. (cp_build_qualified_type_real): Add additional COMPLAIN parameter
  3927. and modify appropriately.
  3928. * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
  3929. reveal optimization opportunities.
  3930. * pt.c (tsubst): Don't issue error messages when we're not
  3931. complaining, even if we see a qualified function type.
  3932. (check_cv_quals_for_unify): Don't allow a qualified function
  3933. type.
  3934. 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
  3935. * class.c (instantiate_type): Downgrade errors for object-dependent
  3936. memfn refs to pedwarn.
  3937. 1999-05-20 Mark Mitchell <mark@codesourcery.com>
  3938. * decl.c (grokdeclarator): Don't treat [] as indicating a
  3939. zero-sized array in a typedef.
  3940. * call.c (build_object_call): Don't look at DECL_NAME for a type.
  3941. (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
  3942. (typeck.c): Or TYPE_MAIN_VARIANT for a type.
  3943. * pt.c (for_each_template_parm): Rework to match documentation.
  3944. Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
  3945. 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
  3946. * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
  3947. * class.c (finish_base_struct): Allow non-COM bases for COM classes
  3948. except at the leftmost position.
  3949. (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
  3950. Pass the binfo's class, not the most derived, to skip_rtti_stuff.
  3951. * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
  3952. * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
  3953. (build_cplus_new): Make sure that what we return is of the right type.
  3954. 1999-05-20 Mark Mitchell <mark@codesourcery.com>
  3955. * cp-tree.h (make_ptrmem_cst): New function.
  3956. * expr.c (cplus_expand_constant): Split out from ...
  3957. (cplus_expand_expr): Here. Use cplus_expand_constant.
  3958. (init_cplus_expand): Set lang_expand_constant.
  3959. * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
  3960. * tree.c (make_ptrmem_cst): Define.
  3961. * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
  3962. * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
  3963. 1999-05-19 Mark Mitchell <mark@codesourcery.com>
  3964. * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
  3965. * decl2.c (start_static_storage_duration_function): Fix comment.
  3966. (finish_file): Create static storage duration functions lazily.
  3967. 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
  3968. Implement anonymous structs.
  3969. * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
  3970. * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
  3971. * class.c (finish_struct_1): Remove redundant check for anon struct.
  3972. * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
  3973. (check_tag_decl): Check for anonymous struct here.
  3974. * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
  3975. * init.c (sort_member_init, emit_base_init): Handle getting fields
  3976. as well as names in current_member_init_list.
  3977. (perform_member_init): Handle getting an anon aggr.
  3978. * method.c (do_build_assign_ref): Don't descend into anon aggrs.
  3979. (do_build_copy_constructor): Likewise.
  3980. 1999-05-19 Mark Mitchell <mark@codesourcery.com>
  3981. * tree.c (cp_build_qualified_type): Don't allow qualified function
  3982. types.
  3983. Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
  3984. * gxxint.texi: Fix typo.
  3985. 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
  3986. * call.c (find_scoped_type, resolve_scope_to_name): Lose.
  3987. * class.c (finish_struct_1): Use CLASS_TYPE_P.
  3988. * ptree.c (print_lang_type): Likewise.
  3989. * typeck.c (build_modify_expr, c_expand_asm_operands): Use
  3990. IS_AGGR_TYPE_CODE.
  3991. * typeck2.c (digest_init): Likewise.
  3992. 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
  3993. * call.c (joust): Compare the types of the conv ops, not the
  3994. target types of the conversions.
  3995. Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
  3996. * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
  3997. was not given.
  3998. 1999-05-17 Mark Mitchell <mark@codesourcery.com>
  3999. * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
  4000. * decl.c (grokfndecl): Don't allow inline declarations of friend
  4001. template specializations, or friend template specializations with
  4002. default arguments.
  4003. * pt.c (tsubst): Handle substitution into array types that does
  4004. not yield a fixed upper bound, even when not processing a
  4005. template.
  4006. (tsubst_copy): Deal with the fact that the second operand to a
  4007. TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
  4008. * search.c (marked_pushdecls_p): Don't descend into
  4009. TEMPLATE_TYPE_PARMs and the like.
  4010. (unmarked_pushdecls_p): Likewise.
  4011. * call.c (build_over_call): Don't throw away
  4012. initializations/copies of empty classes; use MODIFY_EXPR and
  4013. INIT_EXPR as for non-empty classes.
  4014. * class.c (finish_struct_1): Put the padding byte for an empty
  4015. class on the TYPE_NONCOPIED_PARTS list for the class.
  4016. 1999-05-16 Mark Mitchell <mark@codesourcery.com>
  4017. * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
  4018. indicate a reference to a field that is a qualified name.
  4019. 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
  4020. * decl2.c (finish_objects): Don't use .?tors.* if we don't have
  4021. ASM_OUTPUT_CONSTRUCTOR.
  4022. * friend.c (do_friend): Add attrlist arg. Remove support for
  4023. getting a non-decl as 'decl'.
  4024. * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
  4025. rtl.
  4026. (grokdeclarator): Adjust.
  4027. * cp-tree.h: Adjust.
  4028. 1999-05-16 Mark Mitchell <mark@codesourcery.com>
  4029. * cp-tree.h (permanent_p): New function.
  4030. * init.c (build_new_1): Use mapcar, not copy_node, to copy a
  4031. possibly complex tree node.
  4032. * tree.c (mapcar): Adjust comments, and follow coding standards in
  4033. conditional.
  4034. (permanent_p): New function.
  4035. 1999-05-13 Per Bothner <bothner@cygnus.com>
  4036. * class.c (push_lang_context): Turn off DECL_IGNORED_P for
  4037. primitive Java types, if we actually see `extern "Java"'.
  4038. 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
  4039. * lang-specs.h: Pass -$ to the preprocessor.
  4040. 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
  4041. * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
  4042. Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
  4043. (resolve_offset_ref): Don't handle a raw baselink.
  4044. * cvt.c (build_expr_type_conversion): Likewise.
  4045. * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
  4046. convert_for_initialization): Likewise.
  4047. * class.c (instantiate_type): Handle seeing a baselink under an
  4048. OFFSET_REF.
  4049. * error.c (dump_expr): Likewise.
  4050. * pt.c (for_each_template_parm): Likewise.
  4051. (resolve_overloaded_unification): Likewise.
  4052. * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
  4053. * typeck.c (expr_sizeof): Also complain about other permutations
  4054. of overloaded functions.
  4055. 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
  4056. * init.c (resolve_offset_ref): Don't return a raw method.
  4057. Use BASELINK_P.
  4058. * typeck.c (decay_conversion): Don't handle a raw method.
  4059. Resolve all OFFSET_REFs.
  4060. (get_member_function_from_ptrfunc): 0 is a valid vtable index.
  4061. (build_binary_op_nodefault): Handle resolving overloaded fns. Use
  4062. same_type_p for pmf bits. Don't use build_binary_op to compare
  4063. raw pointers to methods.
  4064. (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
  4065. to decide when to call resolve_offset_ref.
  4066. (build_c_cast, convert_for_initialization): Likewise.
  4067. * cvt.c (build_expr_type_conversion): Likewise.
  4068. 1999-05-06 Nathan Sidwell <nathan@acm.org>
  4069. * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
  4070. 1999-05-05 Mark Mitchell <mark@codesourcery.com>
  4071. * decl2.c (start_objects): Don't let static constructors and
  4072. destructors get inlined.
  4073. * parse.y (nested_name_specifier): Make sure ordinary types are
  4074. complete, just like template types.
  4075. * parse.c: Regenerated.
  4076. * pt.c (check_explicit_specialization): Improve error messages.
  4077. 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4078. * typeck.c (string_conv_p): Use same_type_p to check whether we
  4079. try to convert between char and wchar_t.
  4080. 1999-05-03 Mark Mitchell <mark@codesourcery.com>
  4081. * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
  4082. lookup to error_mark_node here.
  4083. (lookup_member): Revise documentation. Add comments. Don't set
  4084. the TREE_TYPE to error_mark_node here, and don't build up an extra
  4085. TREE_LIST for ambiguous lookups.
  4086. (setup_class_bindings): Adjust accordingly.
  4087. (push_class_decls): Revise out-of-date comments.
  4088. * typeck.c (build_const_cast): Tighten checks for legality.
  4089. 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4090. * init.c (build_member_call): Lookup names coming from
  4091. namespace-scoped LOOKUP_EXPR.
  4092. 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
  4093. * gxxint.texi: Add documentation for 'I'.
  4094. 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4095. * tinfo.cc (operator==): Qualify type_info with std::.
  4096. 1999-05-02 Mark Mitchell <mark@codesourcery.com>
  4097. * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
  4098. (DECL_COMDAT): Remove definition.
  4099. 1999-05-01 Mark Mitchell <mark@codesourcery.com>
  4100. * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
  4101. change.
  4102. 1999-04-30 Mark Mitchell <mark@codesourcery.com>
  4103. * class.c (build_vtable): Use build_lang_decl when building
  4104. vtables, not just build_decl.
  4105. (prepare_fresh_vtable): Likewise.
  4106. * decl.c (wrapup_globals_for_namespace): Mark vtables as
  4107. DECL_EXTERNAL when calling wrapup_global_declarations.
  4108. * decl2.c (priority_info_s): Add initializations_p and
  4109. destructions_p members.
  4110. (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
  4111. when deciding what vtables to write out.
  4112. (ssdf_decls): New variable.
  4113. (ssdf_decls_used): Likewise.
  4114. (start_static_storage_duration_function): Deal with being called
  4115. multiple times. Avoid inlining this function.
  4116. (generate_inits_for_priority): Deal with reuse of priority map.
  4117. (get_priority_info): Clear initializations_p and destructions_p.
  4118. (do_static_initialization): Tweak comment.
  4119. (do_static_destruction): Likewise. Fix condition on sentries for
  4120. destruction.
  4121. (generate_ctor_or_dtor_function): Call all of the static storage
  4122. duration functions.
  4123. (generate_ctor_or_dtor_function_for_priority): Check
  4124. initializations_p and destructions_p to see what priorities need
  4125. initialization functions.
  4126. (finish_file): Rework to generate multiple static storage duration
  4127. functions, rather than just one.
  4128. * typeck.c (build_const_cast): Tweak last change to handle
  4129. templates correctly.
  4130. * typeck.c (build_const_cast): Disallow use of const_cast to
  4131. anything but a pointer or reference type.
  4132. 1999-04-30 Nathan Sidwell <nathan@acm.org>
  4133. * decl.c (cp_finish_decl): Don't permit arrays of abstract or
  4134. signature type.
  4135. 1999-04-29 Mark Mitchell <mark@codesourcery.com>
  4136. * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
  4137. (finish_file): Indent comments properly.
  4138. 1999-04-29 Richard Henderson <rth@cygnus.com>
  4139. * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
  4140. (do_static_destruction): Likewise.
  4141. 1999-04-29 Nathan Sidwell <nathan@acm.org>
  4142. * cp-tree.h (TYPE_NOTHROW_P): New macro.
  4143. * decl2.c (delete_sanity): Warn on deleting void *.
  4144. * init.c (build_new_1): Use TYPE_NOTHROW_P.
  4145. * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
  4146. throwing operator new.
  4147. 1999-04-28 Nathan Sidwell <nathan@acm.org>
  4148. * cp-tree.h (build_component_addr): Remove prototype.
  4149. * typeck.c (build_component_addr): Make static. Remove MSG
  4150. argument.
  4151. (build_component_addr): Remove MSG parameter, clean up
  4152. comment.
  4153. (build_x_function_call): Use cp_error.
  4154. (build_unary_op): Adjust call of build_component_addr.
  4155. 1999-04-28 Mark Mitchell <mark@codesourcery.com>
  4156. * pt.c (tsubst_friend_class): Check for NULL.
  4157. Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
  4158. * search.c (binfo_for_vtable): Initialize bfvi.var.
  4159. 1999-04-27 Nathan Sidwell <nathan@acm.org>
  4160. * rtti.c (build_x_typeid): Check rtti is enabled.
  4161. 1999-04-26 Mark Mitchell <mark@codesourcery.com>
  4162. * search.c (is_subobject_of_p): Make sure we're looking at the
  4163. right baseclasses.
  4164. 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
  4165. * Make-lang.in (cplib2.ready): Don't depend on phony targets.
  4166. 1999-04-23 Mark Mitchell <mark@codesourcery.com>
  4167. * decl2.c (finish_file): Tweak handling of extern inlines so that
  4168. they are not unnecessarily put out.
  4169. * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
  4170. such as base classes.
  4171. 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
  4172. * tree.c (build_exception_variant): Fix typo: use the chain of U,
  4173. not trying V, while cycling through U.
  4174. 1999-04-22 Mark Mitchell <mark@codesourcery.com>
  4175. * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
  4176. preserves_first_arg. Enlarge dummy accordingly.
  4177. (DECL_TINFO_FN_P): New macro.
  4178. (SET_DECL_TINFO_FN_P): Likeiwse.
  4179. (DECL_RETURNS_FIRST_ARG): Remove.
  4180. (DECL_PRESERVES_THIS): Likewise.
  4181. (DECL_INIT_PRIORITY): New macro.
  4182. (finish_struct_1): Change prototype.
  4183. (cat_namespace_levels): Remove prototype.
  4184. (vtable_decl_p): New prototype.
  4185. (vtype_decl_p): Likewise.
  4186. (sigtable_decl_p): Likewise.
  4187. (walk_globals_pred): New typedef.
  4188. (walk_globals_fn): Likewise.
  4189. (walk_globals): New prototype.
  4190. (walk_namespaces_fn): New typedef.
  4191. (walk_namespaces): New prototype.
  4192. (wrapup_globals_for_namespace): Likewise.
  4193. (walk_vtables): Remove prototype.
  4194. (walk_sigtables): Likewise.
  4195. (instantiate_pending_templates): New prototype.
  4196. * class.c (finish_struct_1): Don't return a value.
  4197. * decl.h (pending_statics): Remove declaration.
  4198. * decl.c (walk_namespaces_r): New function.
  4199. (walk_globals_r): Likewise.
  4200. (vtable_decl_p): Likewise.
  4201. (vtype_decl_p): Likewise.
  4202. (sigtable_decl_p): Likewise.
  4203. (walk_namespaces): Likewise.
  4204. (walk_globals_data): New type.
  4205. (walk_globals): New function.
  4206. (wrapup_globals_for_namespace): Likewise.
  4207. (expand_static_init): Remove assertion. Remove redundancy in
  4208. conditional. Don't put static data members in static_aggregates
  4209. Tidy.
  4210. (finish_function): Remove redundancy in conditional. Don't set
  4211. DECL_RETURNS_FIRST_ARG.
  4212. (cat_namespace_levels): Remove.
  4213. * decl2.c: Include splay-tree.h and varray.h.
  4214. (priority_info_s): New structure.
  4215. (finish_vtable_vardecl): Change prototype. Adjust for new calling
  4216. conventions.
  4217. (prune_vtable_vardecl): Likewise.
  4218. (finish_sigtable_vardecl): Likewise.
  4219. (setup_initp): Remove.
  4220. (do_dtors): Remove.
  4221. (do_ctors): Remove.
  4222. (start_static_storage_duration_function): New function.
  4223. (generate_inits_for_priority): Likewise.
  4224. (finish_static_storage_duration_function): Likewise.
  4225. (get_priority_info): Likewise.
  4226. (do_static_initialization): Likewise.
  4227. (do_static_destruction): Likewise.
  4228. (do_static_initialization_and_destruction): Likewise.
  4229. (generate_ctor_or_dtor_function): Likewise.
  4230. (generate_ctor_and_dtor_functions_for_priority): Likewise.
  4231. (pending_statics): Make it a varray.
  4232. (pending_statics_used): New variable.
  4233. (saved_inlines): Make it a varray.
  4234. (saved_inlines_used): New variable.
  4235. (finish_static_data_member): Change method of updating
  4236. pending_statics.
  4237. (mark_inline_for_output): Remove #if 0'd code. Change method of
  4238. updating saved_inlines.
  4239. (walk_vtables): Remove.
  4240. (walk_sigtables): Likewise.
  4241. (import_export_decl): Use DECL_TINFO_FN_P.
  4242. (pending_templates): Remove declaration.
  4243. (maybe_templates): Likewise.
  4244. (static_aggregates_initp): Likewise.
  4245. (setup_initp): Likewise.
  4246. (finish_objects): Simplify.
  4247. (INITIALIZE_P_IDENTIFIER): New macro.
  4248. (PRIORITY_IDENTIFIER): New macro.
  4249. (SSDF_IDENTIFIER): New macro.
  4250. (initialize_p_decl): New variable.
  4251. (priority_decl): Likewise.
  4252. (ssdf_decl): Likewise.
  4253. (priority_info_map): Likewise.
  4254. (finish_file): Recode output of static intializers and other
  4255. file-scope finalization tasks.
  4256. * error.c (OB_END_TEMPLATE_ID): New macro.
  4257. (dump_type_real): Use it.
  4258. (dump_decl): Likewise.
  4259. (dump_function_name): Likewise.
  4260. * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
  4261. interface.
  4262. (check_newline): Use walk_globals, not walk_vtables.
  4263. * pt.c (pending_tempalte_expansions): Remove.
  4264. (set_vardecl_interface_info): Likewise.
  4265. (pending_templates): Make static.
  4266. (maybe_templates): Likewise.
  4267. (instantiate_class_template): Adjust call to finish_struct_1.
  4268. (instantiate_pending_templates): New function.
  4269. * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
  4270. * tree.c (static_aggregates_initp): Remove.
  4271. (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
  4272. instead.
  4273. * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
  4274. * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
  4275. with the RTL code RETURN.
  4276. * hash.h: Regenerated.
  4277. * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
  4278. * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
  4279. * parse.c: Regenerated.
  4280. * pt.c: Include varray.h. Include rtl.h since varray.h requires
  4281. it.
  4282. (inline_parm_levels): New variable.
  4283. (inline_parm_levels_used): Likewise.
  4284. (maybe_begin_member_template_processing): Update them.
  4285. (maybe_end_member_template_processing): Use them, rather than
  4286. guessing how many levels to pop.
  4287. * decl.c (make_typename_type): Tighten error-checking.
  4288. 1999-04-20 Mark Mitchell <mark@codesourcery.com>
  4289. * cp-tree.h (build_binary_op): Remove unneeded parameter.
  4290. * class.c (build_vrable_entry_ref): Adjust call to
  4291. build_binary_op.
  4292. * decl.c (expand_static_init): Likewise.
  4293. (grokdeclarator): Likewise.
  4294. (finish_function): Likewise.
  4295. * decl2.c (delete_sanity): Likewise.
  4296. (do_dtors): Likewise.
  4297. (do_ctors): Likewise.
  4298. * error.c (dump_type_suffix): Likewise.
  4299. * expr.c (cplus_expand_expr): Likewise.
  4300. * init.c (resolve_offset_ref): Likewise.
  4301. (build_new): Likewise.
  4302. (build_new_1): Likewise.
  4303. (build_vec_delete_1): Likewise.
  4304. (expand_vec_init_catch_clause): Likewise.
  4305. (build_delete): Likewise.
  4306. * pt.c (tsubst): Likewise.
  4307. * rtti.c (synthesize_tinfo_fn): Likewise.
  4308. * search.c (expand_upcast_fixups): Likewise.
  4309. (expand_direct_vtbls_init): Likewise.
  4310. * typeck.c (get_member_function_from_ptrfunc): Likewise.
  4311. (build_binary_op_nodefault): Likewise.
  4312. (point_int_sum): Likewise.
  4313. (pointer_diff): Likewise.
  4314. (build_unary_op): Likewise.
  4315. (build_modify_expr): Likewise.
  4316. (get_delta_difference): Likewise.
  4317. (build_ptrmemfunc): Likewise.
  4318. (expand_ptrmemfunc_cst): Likewise.
  4319. 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
  4320. * decl.c (grokfndecl): Always call cplus_decl_attributes.
  4321. * decl2.c (grokfield): Pass attrlist to grokdeclarator.
  4322. 1999-04-19 Mark Mitchell <mark@codesourcery.com>
  4323. * cp-tree.h (finish_static_data_member_decl): New function.
  4324. * decl2.c (finish_static_data_member_decl): Split out from ...
  4325. (grokfield): Here.
  4326. * pt.c (instantiate_class_template): Use it here instead of
  4327. trying to fake it.
  4328. (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
  4329. finish_static_data_member_decl will do that. Explicit set
  4330. DECL_EXTERNAL to match non-template processing.
  4331. 1999-04-18 Mark Mitchell <mark@codesourcery.com>
  4332. * cp-tree.h (finish_class_definition): Add parameter.
  4333. * parse.y (structsp): Use it. Don't call pop_scope here.
  4334. * parse.c: Regenerated.
  4335. * semantics.c (finish_class_definition): Pop it here.
  4336. 1999-04-17 Mark Mitchell <mark@codesourcery.com>
  4337. * decl.c (xref_tag): Revise handling of nested template
  4338. declarations.
  4339. * pt.c (check_explicit_specialization): Tweak handling of friend
  4340. templates in template classes.
  4341. (tsubst_friend_class): Handle friend declarations for nested
  4342. member template classes.
  4343. 1999-04-16 Mark Mitchell <mark@codesourcery.com>
  4344. * class.c (finish_struct): Remove unused variable.
  4345. (pushclass): Likewise.
  4346. (invalidate_class_lookup_cache): Likewise.
  4347. * cp-tree.def (TYPENAME_TYPE): Improve documentation.
  4348. * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
  4349. doesn't get obliterated.
  4350. (make_typename_type): Handle template classes correctly.
  4351. * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
  4352. (storetags): Declare.
  4353. * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
  4354. (pushclass): Likewise. Use storetags to install tag declarations,
  4355. not pushtag.
  4356. (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
  4357. * decl.c (storetags): Make it global.
  4358. (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
  4359. implicit typename declaration.
  4360. (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
  4361. * method.c (hack_identifier): Likewise.
  4362. * search.c (lookup_member): Likewise.
  4363. * decl.c (warn_about_implicit_typename_lookup): New function.
  4364. (lookup_name_real): Use it. Rework handling of implicit typename
  4365. extension.
  4366. 1999-04-15 Mark Mitchell <mark@codesourcery.com>
  4367. * cp-tree.h (lookup_nested_field): Remove.
  4368. * class.c (push_nested_class): Handle UNION_TYPEs.
  4369. (pop_nested_class): Likewise.
  4370. * decl.c (lookup_name_real): Don't call lookup_nested_field.
  4371. (start_decl): Use push_nested_class, not just pushclass.
  4372. (cp_finish_decl): Use pop_nested_class, not just popclass.
  4373. * search.c (lookup_nested_field): Remove.
  4374. * cp-tree.h (lang_type): Add documentation.
  4375. * decl2.c (handle_class_head): Create template declarations here,
  4376. as appropriate.
  4377. * parse.y (class_head): Return whether or not we entered a new
  4378. scope, as well as the type named.
  4379. (named_class_head): Likewise.
  4380. (named_complex_class_head_sans_basetype): Likewise.
  4381. (structsp): Adjust accordingly. Pop scope when required.
  4382. * parse.c: Regenerated.
  4383. * pt.c (check_default_tmpl_args): Robustify.
  4384. (redeclare_class_template): Likewise.
  4385. (instantiate_class_template): An instantiation of an
  4386. anonymous union is itself an anonymous union.
  4387. * semantics.c (begin_class_definition): Don't create template
  4388. declarations here.
  4389. 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
  4390. * parse.y (after_type_declarator_intern): New nonterminal.
  4391. (after_type_declarator): Use it.
  4392. (direct_after_type_declarator): Likewise. Move above
  4393. nonnested_type to fix reduce/reduce conflict resolution.
  4394. (declmods): Reducing from just 'attributes' has EMPTY precedence.
  4395. * Makefile.in (CONFLICTS): Update.
  4396. * decl.c (define_label): Downgrade error for jumping over a
  4397. non-POD decl to pedwarn.
  4398. 1999-04-14 Mark Mitchell <mark@codesourcery.com>
  4399. * cp-tree.h (popclass): Change declaration.
  4400. (pop_nested_class): Likewise.
  4401. (poplevel_class): Remove declaration.
  4402. * call.c (convert_default_argument): Pass no arguments to
  4403. popclass.
  4404. * class.c (finish_struct_1): Likewise.
  4405. (finish_struct): Likewise.
  4406. (popclass): Remove argument. Simplify code accordingly.
  4407. (pop_nested_class): Likewise.
  4408. * decl.c (poplevel_class): Declare it here, and make it static.
  4409. (poplevel): Handle class scopes.
  4410. (poplevel_class): Don't take an rgument. Simplify.
  4411. (pop_everything): Pass no arguments to pop_nested_class.
  4412. (cp_finish_decl): Pass no arguments to popclass.
  4413. (grokdeclarator): Pass no arguments to pop_nested_class.
  4414. (finish_function): Likewise.
  4415. * decl2.c (grokfield): Likewise.
  4416. (pop_scope): Pass no arguments to popclass.
  4417. * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
  4418. * pt.c (instantiate_class_template): Move call to pushclass, and
  4419. document. Pass no arguments to popclass.
  4420. (regenerate_decl_from_template): Likewise.
  4421. 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
  4422. * typeck.c (build_unary_op): Handle taking the address of a unique
  4423. bound non-static member function.
  4424. 1999-04-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4425. * lang-options.h (-Wdeprecated): New flag.
  4426. * decl2.c (warn_deprecated): New flag.
  4427. (lang_decode_option): Deprecated this-is-variable,
  4428. external-templates, alt-external-templates.
  4429. Support -Wdeprecated.
  4430. * errfn.c (cp_deprecated): New function.
  4431. 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
  4432. * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
  4433. of the decls themselves.
  4434. * pt.c (tsubst_function_type): Copy attributes over.
  4435. * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
  4436. and com_interface.
  4437. * cp-tree.h: Add prototype.
  4438. * decl.c (init_decl_processing): Set valid_lang_attribute.
  4439. 1999-04-13 Mark Mitchell <mark@codesourcery.com>
  4440. * class.c (finish_struct_1): Look at the const-ness of the field's
  4441. type, not the TREE_READONLY-ness of the declaration.
  4442. * method.c (synthesize_method): Likewise.
  4443. * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
  4444. creating new declarations.
  4445. 1999-04-13 Mike Stump <mrs@wrs.com>
  4446. * decl2.c (import_export_decl): Because vtables always reference
  4447. virtual functions, even if they are inlined, don't allow
  4448. -fno-implement-inlines to not emit them, instead, emit them with
  4449. the vtable.
  4450. * decl.c (start_function): Likewise.
  4451. 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
  4452. * cp-tree.h (struct lang_type): Add com_interface.
  4453. (CLASSTYPE_COM_INTERFACE): New macro.
  4454. * class.c (set_rtti_entry): COM interface classes have no RTTI
  4455. entries in their vtables; adjust.
  4456. (add_virtual_function, finish_base_struct, skip_rtti_stuff,
  4457. modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
  4458. finish_struct_1): Likewise.
  4459. * decl2.c (mark_vtable_entries): Likewise.
  4460. * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
  4461. * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
  4462. expand_upcast_fixups): Likewise.
  4463. * tree.c (debug_binfo): Likewise.
  4464. * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
  4465. * typeck.c (comptypes): If we get it, ignore attributes.
  4466. * class.c (instantiate_type): Use BASELINK_P. Change complain
  4467. parameter to flags; 2 means ignore attributes.
  4468. * call.c (build_op_delete_call): Pass it.
  4469. * decl.c (xref_tag): Only complain once about using a typedef-name
  4470. with 'struct'. Downgrade to pedwarn.
  4471. * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
  4472. * parse.y (absdcl_intern): New nonterminal.
  4473. (absdcl, direct_abstract_declarator): Use it.
  4474. * pt.c (lookup_template_class): Look through implict typename.
  4475. 1999-04-11 Mark Mitchell <mark@codesourcery.com>
  4476. * friend.c (add_friend): Deal gracefully with error_mark_node.
  4477. * method.c (build_overload_value): Handle pointers-to-members as
  4478. template parameters.
  4479. * decl.c (push_binding): Fix typo in comment.
  4480. 1999-04-10 Mark Mitchell <mark@codesourcery.com>
  4481. * error.c (dump_type_real): If a typename is a template-id, put
  4482. out the template arguments.
  4483. (dump_expr): Handle TEMPLATE_ID_EXPR.
  4484. * pt.c (lookup_template_class): Now that full arguments are
  4485. available everywhere, remove code that tried to guess them.
  4486. 1999-04-09 Mark Mitchell <mark@codesourcery.com>
  4487. * decl.c (make_typename_type): Complain if we don't find a type
  4488. when trying to make a typename type for a non-template type.
  4489. 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
  4490. * decl.c (start_decl): Pass attributes to grokdeclarator.
  4491. (grokdeclarator): Handle attributes on constructor-syntax
  4492. initializers.
  4493. 1999-04-08 Mark Mitchell <mark@codesourcery.com>
  4494. * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
  4495. don't have types.
  4496. * search.c (template_self_reference_p): Tweak.
  4497. 1999-04-07 Mark Mitchell <mark@codesourcery.com>
  4498. * init.c (build_offset_ref): Don't build yet another weird data
  4499. structure to describe overloaded functions.
  4500. 1999-04-06 Mark Mitchell <mark@codesourcery.com>
  4501. * cp-tree.h (BASELINK_P): New macro.
  4502. (SET_BASELINK_P): Likewise.
  4503. * init.c (build_member_call): Remove needless assignment in if
  4504. statement.
  4505. * search.c (lookup_field_r): Fix handling when we are looking
  4506. specifically for a type; these are not hidden by functions and
  4507. variables.
  4508. (lookup_member): Use SET_BASELINK_P.
  4509. * tree.c (is_overloaded_fn): Use BASELINK_P.
  4510. (really_overloaed_fn): Likewise.
  4511. (get_first_fn): Likewise.
  4512. 1999-04-05 Mark Mitchell <mark@codesourcery.com>
  4513. * decl.c (lookup_name_current_level): Tweak, and improve
  4514. documentation.
  4515. * class.c (maybe_fixup_vptrs): Remove declaration.
  4516. (build_class_init_list): Likewise.
  4517. * decl.c (pushdecl_class_level): Call check_template_shadow here
  4518. ...
  4519. (push_class_level_binding): ... not here.
  4520. * search.c (dfs_push_type_decls): Only avoid
  4521. template-self-reference TYPE_DECLs if they are from base classes.
  4522. 1999-04-04 Mark Mitchell <mark@codesourcery.com>
  4523. * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
  4524. nodes. Tidy.
  4525. 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
  4526. * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
  4527. (finish_struct_1): Don't call build_class_init_list.
  4528. 1999-04-02 Mark Mitchell <mark@codesourcery.com>
  4529. * tinfo.h (__class_type_info): Fix illegal declaration.
  4530. * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
  4531. * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
  4532. (IDENTIFIER_CLASS_VALUE): Improve documentation.
  4533. (is_properly_derived_from): Declare.
  4534. (invalidate_class_lookup_cache): Likewise.
  4535. (maybe_maybe_note_name_used_in_class): Likewise.
  4536. (note_name_declared_in_class): Likewise.
  4537. (push_using_decl): Remove duplicate declaration.
  4538. (id_in_current_class): Remove declaration.
  4539. (push_class_binding): Change prototype.
  4540. (clear_identitifer_class_values): Declare.
  4541. * call.c (is_properly_derived_from): Make it global.
  4542. (build_new_function_call): Be careful about updating candidates.
  4543. (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
  4544. asked to make illegal calls.
  4545. * class.c: Include splay-tree.h.
  4546. (class_stack_node): Add names_used slot.
  4547. (check_member_decl_is_same_in_complete_scope): Remove.
  4548. (add_method): Fix comment. Push the declaration into class
  4549. scope.
  4550. (finish_struct_1): When popping the class, pop the bindings too.
  4551. Remove check for data member/function member conflict.
  4552. (finish_struct): Remove calls to
  4553. check_member_decl_is_same_in_complete_scope. Change calls to
  4554. popclass.
  4555. (pushclass): Clear names_used in the class stack entry.
  4556. Use invalidate_class_lookup_cache to remove cached entries, rather
  4557. than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
  4558. before entering a new class. Remove dead code. Don't mess with
  4559. current_function_decl when pushing declarations.
  4560. (invalidate_class_lookup_cache): New function, split out from ...
  4561. (popclass): Here. Clean up names_used on our way out.
  4562. (instantiate_type): Adjust.
  4563. (build_self_reference): Don't push the declaration here.
  4564. (maybe_note_name_used_in_class): New function.
  4565. (note_name_declared_in_class): Likewise.
  4566. * decl.c (add_binding): Change prototype.
  4567. (find_class_binding_level): New function.
  4568. (innermost_nonclass_level): Likewise.
  4569. (current_binding_level): Update documentation.
  4570. (inner_binding_level): Remove. Replace with current_binding_level
  4571. throughout.
  4572. (push_binding_level): Remove special handling of
  4573. class_binding_level.
  4574. (pop_binding_level): Likewise. Use find_class_binding_level.
  4575. (suspend_binding_level): Likewise.
  4576. (global_bindings_p): Use innermost_nonclass_level.
  4577. (toplevel_bindings_p): Likewise.
  4578. (namespace_bindings_p): Likewise.
  4579. (pseudo_global_level_p): Likewise.
  4580. (push_binding): Clear INHERITED_VALUE_BINDING_P.
  4581. (add_binding): Check for illegal multiple declarations. Return a
  4582. value indicating whether or not the new binding was legal.
  4583. (push_local_binding): Skip over class binding levels. Check
  4584. return value from add_binding.
  4585. (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
  4586. note_name_declared_in_class.
  4587. (pushlevel_class): Remove "fake out the rest of the compiler"
  4588. code.
  4589. (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
  4590. (clear_identifier_class_values): New function.
  4591. (pop_from_top_level): Use it.
  4592. (pop_everything): Tweak.
  4593. (maybe_process_template_type_declaration): Don't push the
  4594. declaration for the template here.
  4595. (pushtag): Don't push tag declarations into class scope here.
  4596. (pushdecl): Apply DeMorgan's law for readability.
  4597. (pushdecl_class_level): Remove special-case code for
  4598. TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
  4599. (push_class_level_bindng): Deal with inherited bindings.
  4600. (lookup_name_real): Remove special-case code for
  4601. TYPE_BEING_DEFINED, and some implicit typename magic.
  4602. (grokdeclarator): Handle COMPONENT_REF for a template function.
  4603. (build_enumerator): Don't call pushdecl_class_level here.
  4604. (id_in_current_class): Remove.
  4605. * decl2.c (grokfield): Don't call pushdecl_class_level or
  4606. check_template_shadow.
  4607. * errfn.c (cp_file_of): Don't declare.
  4608. (cp_line_of): Likewise.
  4609. * error.c (dump_decl): Handle an OVERLOAD.
  4610. (cp_file_of): Likewise.
  4611. (cp_line_of): Likewise.
  4612. * init.c (build_member_call): Handle a COMPONENT_REF.
  4613. * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
  4614. pushdecl_class_level.
  4615. * method.c (hack_identifier): Build COMPONENT_REFs for references
  4616. to member templates as well as member functions. Remove dead
  4617. code.
  4618. * parse.y (left_curly): Remove.
  4619. (nonnested_type): Call maybe_note_name_used_in_class, not
  4620. pushdecl_class_level.
  4621. * parse.c: Regenerated.
  4622. (nested_name_specifier_1): Likewise.
  4623. * pt.c (check_explicit_specialization): Adjust, for robustness.
  4624. (check_template_shadow): Handle OVERLOADs.
  4625. (build_template_decl): Set DECL_CONSTRUCTOR_P on the
  4626. TEMPLATE_DECL, if appropriate.
  4627. * search.c (envelope_add_decl): Remove.
  4628. (dfs_pushdecls): Likewise.
  4629. (dfs_compress_decls): Likewise.
  4630. (dfs_push_decls): New function.
  4631. (dfs_push_type_decls): Likewise.
  4632. (setup_class_bindings): Likewise.
  4633. (template_self_reference_p): Likewise.
  4634. (lookup_field_r): Use it.
  4635. (looup_member): Remove old comment. Deal with ambiguity.
  4636. (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
  4637. and remove envelope processing.
  4638. * semantics.c (begin_class_definition): Let pushclass push
  4639. declarations for base classes.
  4640. (finish_member_declaration): Push declarations into class scope.
  4641. * typeck.c (build_component_ref): Just put an OVERLOAD into the
  4642. COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
  4643. (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
  4644. * Makefile.in (class.o): Depend on splay-tree.h.
  4645. Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
  4646. * cvt.c (convert_pointer_to_real): Use same_type_p.
  4647. * typeck.c (comp_target_types): Use same_type_p.
  4648. 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
  4649. * semantics.c (begin_inline_definitions,
  4650. finish_inline_definitions): Rename from finish_default_args and
  4651. begin_inline_definitions, respectively, to something that isn't a
  4652. total lie. :)
  4653. * parse.y (structsp): Adjust.
  4654. * tree.c (hash_tree_cons): Remove obsolete via_* parms.
  4655. (list_hash_lookup): Likewise.
  4656. (hash_tree_chain): Adjust.
  4657. * pt.c (tsubst): Adjust.
  4658. (tsubst_arg_types): Use plain hash_tree_cons.
  4659. * cp-tree.h (hash_tree_cons_simple): Lose.
  4660. * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
  4661. Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  4662. * Makefile.in (hash.h): Generate using gperf language 'C', not
  4663. 'KR-C', so gperf uses the `const' keyword on strings.
  4664. * gxx.gperf (resword): Const-ify a char*.
  4665. 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
  4666. * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
  4667. CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
  4668. CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
  4669. CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
  4670. CLASSTYPE_BINFO_AS_LIST): Remove cruft.
  4671. * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
  4672. tree.c: Adjust.
  4673. 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
  4674. * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
  4675. 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
  4676. * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
  4677. 1999-03-27 Mark Mitchell <mark@codesourcery.com>
  4678. * cp-tree.h (add_friend): Declare.
  4679. (add_friends): Likewise.
  4680. * friend.c (add_friend): Make it global. Don't add to
  4681. DECL_BEFRIENDING_CLASSES if the befriending class is a template.
  4682. (add_friends): Make it global.
  4683. (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
  4684. befriending class is a template.
  4685. * parse.y (component_decl_1): Fix typo in comment.
  4686. * parse.c: Regenerated.
  4687. * pt.c (instantiate_class_template): Use add_friend and
  4688. add_friends rather that duplicating some of their functionality
  4689. here.
  4690. 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
  4691. * call.c (build_field_call): Unify 'this' and non-'this' cases.
  4692. * typeck.c (build_indirect_ref): Check for 'this' sooner.
  4693. Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  4694. * call.c (op_error): Const-ify a char*.
  4695. (add_candidate, source_type, add_warning): Add static prototype.
  4696. (print_z_candidates): Const-ify a char*.
  4697. * class.c (resolve_address_of_overloaded_function,
  4698. fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
  4699. (get_vtable_name, finish_struct_1): Const-ify a char*.
  4700. * cvt.c (convert_to_reference): Likewise.
  4701. * decl.c (redeclaration_error_message, record_builtin_type,
  4702. record_unknown_type, member_function_or_else, bad_specifiers):
  4703. Likewise.
  4704. (find_binding, select_decl, unqualified_namespace_lookup,
  4705. lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
  4706. Add static prototype.
  4707. (warn_extern_redeclared_static, duplicate_decls, pushdecl,
  4708. implicitly_declare, record_builtin_java_type, define_function,
  4709. grok_op_properties, tag_name): Const-ify a char*.
  4710. * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
  4711. (define_function, finish_builtin_type): Const-ify a char*.
  4712. (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
  4713. cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
  4714. (file_name_nondirectory): Const-ify a char*.
  4715. (init_filename_times): Don't prototype.
  4716. (compiler_error): Prototype.
  4717. (yyerror, init_repo): Const-ify a char*.
  4718. (build_srcloc): Don't prototype.
  4719. (build_x_indirect_ref, build_indirect_ref, build_component_addr):
  4720. Const-ify a char*.
  4721. (warn_for_assignment): Don't prototype.
  4722. (convert_for_initialization, readonly_error, check_for_new_type,
  4723. GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
  4724. Const-ify a char*.
  4725. * decl2.c (acceptable_java_type, output_vtable_inherit,
  4726. setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
  4727. merge_functions, decl_namespace, validate_nonmember_using_decl,
  4728. do_nonmember_using_decl): Add static prototype.
  4729. (lang_f_options): Const-ify a char*.
  4730. (finish_builtin_type): Likewise.
  4731. (add_function, arg_assoc_namespace, arg_assoc_class): Add static
  4732. prototype.
  4733. * errfn.c: Include cp-tree.h.
  4734. (cp_thing): Add static prototype.
  4735. (compiler_error): Don't protoptype.
  4736. (cp_compiler_error): Cast `compiler_error' to `errorfn' before
  4737. passing it to `cp_thing'.
  4738. * error.c (interesting_scope_p): Add static prototype.
  4739. * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
  4740. a char*.
  4741. * init.c (compiler_error): Don't prototype.
  4742. (member_init_ok_or_else): Const-ify a char*.
  4743. (build_java_class_ref): Add static prototype.
  4744. * lex.c (compiler_error): Don't prototype.
  4745. (get_time_identifier, interface_strcmp, extend_token_buffer,
  4746. handle_cp_pragma): Const-ify a char*.
  4747. (is_global, init_filename_times): Add static prototype.
  4748. (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
  4749. (compiler_error): Change from fixed args to variable args.
  4750. (yyerror): Const-ify a char*.
  4751. * parse.y (cond_stmt_keyword): Const-ify a char*.
  4752. (parse_decl): Add static prototype.
  4753. * pt.c (template_args_equal, print_template_context): Likewise.
  4754. (print_candidates, check_default_tmpl_args): Const-ify a char*.
  4755. (instantiate_class_template): Likewise.
  4756. * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
  4757. * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
  4758. expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
  4759. * search.c (lookup_field_info, lookup_member): Likewise.
  4760. (lookup_member): Cast the first argument of `bzero' to a PTR.
  4761. * sig.c (compiler_error): Don't prototype.
  4762. (build_signature_pointer_or_reference_nam): Const-ify a char*.
  4763. (get_sigtable_name, build_member_function_pointer): Likewise.
  4764. * tree.c (compiler_error): Don't prototype.
  4765. (no_linkage_helper, build_srcloc): Add static prototype.
  4766. (build_vbase_pointer_fields): Const-ify a char*.
  4767. (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
  4768. * typeck.c (compiler_error): Don't prototype.
  4769. (convert_for_assignment): Const-ify a char*.
  4770. (comp_cv_target_types): Add static prototype.
  4771. (build_x_indirect_ref, build_indirect_ref, convert_arguments,
  4772. build_component_addr, build_unary_op, convert_for_initialization):
  4773. Const-ify a char*.
  4774. * typeck2.c (ack): Add static prototype and change from fixed args
  4775. to variable args.
  4776. (readonly_error, check_for_new_type): Const-ify a char*.
  4777. * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
  4778. fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
  4779. (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
  4780. (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
  4781. gen_assign, GNU_xref_member): Const-ify a char*.
  4782. 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4783. * gxxint.texi: Remove old discussion on copying virtual bases.
  4784. 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
  4785. * Make-lang.in: Remove all references to g++.o/g++.c.
  4786. Link g++ from gcc.o.
  4787. 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
  4788. * decl2.c (comdat_linkage): Treat vtables like functions.
  4789. 1999-03-25 Mark Mitchell <mark@codesourcery.com>
  4790. * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
  4791. 1999-03-25 Nathan Sidwell <nathan@acm.org>
  4792. * decl.c (init_decl_processing): Add `signed' type as a synonym
  4793. for `int'.
  4794. 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
  4795. * typeck.c (common_type): Handle cv-qual unification for pointers
  4796. to members.
  4797. * decl.c (unqualified_namespace_lookup): Return error_mark_node
  4798. on error.
  4799. (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
  4800. * lex.c (do_identifier): If we got error_mark_node, call
  4801. lookup_name again.
  4802. 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4803. * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
  4804. classes.
  4805. 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
  4806. * decl.c (lookup_name_real): Do nested field lookup regardless of
  4807. TYPE_BEING_DEFINED.
  4808. 1999-03-24 Mark Mitchell <mark@codesourcery.com>
  4809. * cp-tree.h (lang_type): Remove has_assignment and
  4810. has_real_assignment. Add befriending_classes.
  4811. (TYPE_HAS_ASSIGNMENT): Remove.
  4812. (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
  4813. (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
  4814. (lang_decl): Document.
  4815. (DECL_BEFRIENDING_CLASSES): New macro.
  4816. (FRIEND_NAME): Move declaration to more obvious location.
  4817. (FRIEND_DECLS): Likewise.
  4818. * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
  4819. * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
  4820. (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
  4821. (grok_op_properties): Likewise.
  4822. * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
  4823. (add_friend): Likewise. Don't do weird things with assignment
  4824. operators. Update DECL_BEFRIENDING_CLASSES.
  4825. (add_friends): Don't do weird things with assignment operators.
  4826. (make_friend_class): Likewise. Update
  4827. CLASSTYPE_BEFRIENDING_CLASSES.
  4828. * pt.c (instantiate_class_template): Don't set
  4829. TYPE_HAS_ASSIGNMENT.
  4830. (tsubst_copy): Substitute the TREE_TYPE for more unary
  4831. expressions.
  4832. * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
  4833. * search.c (protected_accessible_p): New function.
  4834. (friend_accessible_p): Likewise.
  4835. (accessible_p): Use them.
  4836. 1999-03-23 Mark Mitchell <mark@codesourcery.com>
  4837. * pt.c (convert_nontype_argument): Don't create things that aren't
  4838. PTRMEM_CSTs when applying a qualification conversion to a
  4839. PTRMEM_CST.
  4840. 1999-03-23 Mark Mitchell <mark@codesourcery.com>
  4841. * Makefile.in (OBJS): Don't mention hash.o.
  4842. (OBJDEPS): Likewise.
  4843. 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
  4844. * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
  4845. * decl.c (expand_static_init): Make sure we don't add any after
  4846. then.
  4847. * decl.c (cp_finish_decl): Move intelligence about handling
  4848. DECL_COMDAT for variables from here...
  4849. * decl2.c (comdat_linkage): ...to here.
  4850. (maybe_make_one_only): Tweak.
  4851. (import_export_decl): Call comdat_linkage for variables, too.
  4852. (finish_file): Handle template statics properly.
  4853. 1999-03-22 Mark Mitchell <mark@codesourcery.com>
  4854. * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
  4855. Document internals of pointer-to-member-functions.
  4856. (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
  4857. (PFN_FROM_PTRMEMFUNC): Likewise.
  4858. (build_type_conversion): Remove unused parameter.
  4859. (build_ptrmemfunc1): Declare.
  4860. (expand_ptrmemfunc_cst): New function.
  4861. (delta2_from_ptrmemfunc): Likewise.
  4862. (pfn_from_ptrmemfunc): Likewise.
  4863. * cvt.c (cp_convert_to_pointer): Remove unused parameter to
  4864. build_type_conversion. Use TYPE_PTRMEM_P for readability.
  4865. (convert_to_reference): Remove unused parameter to
  4866. build_type_conversion.
  4867. (ocp_convert): Likewise.
  4868. (build_user_type_conversion): Likewise.
  4869. * error.c (dump_expr): Handle NULL pointer-to-member functions.
  4870. * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
  4871. * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
  4872. open when handling pointer-to-member functions.
  4873. * pt.c (convert_nontype_argument): Clean up error messages. Be
  4874. more stringent with pointers-to-members.
  4875. * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
  4876. (build_unary_op): Tidy ever-so-slightly.
  4877. (build_conditional_expr): Remove extra parameter to
  4878. build_type_conversion.
  4879. (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
  4880. we're using.
  4881. (expand_ptrmemfunc_cst): Define.
  4882. (delta2_from_ptrmemfunc): Likewise.
  4883. (pfn_from_ptrmemfunc): Likewise.
  4884. 1999-03-19 Mark Mitchell <mark@codesourcery.com>
  4885. * init.c (build_member_call): Handle template-id expressions
  4886. correctly.
  4887. * typeck.c (build_x_function_call): Likewise.
  4888. 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
  4889. * friend.c (make_friend_class): Avoid core dump when
  4890. not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
  4891. 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
  4892. * decl.c (start_function): Suppress normal linkage heuristics
  4893. for #pragma interface under MULTIPLE_SYMBOL_SPACES.
  4894. 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
  4895. * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
  4896. ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
  4897. 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4898. * parse.y (named_complex_class_head_sans_basetype):
  4899. Do not push a scope for error_mark_node.
  4900. (maybe_base_class_list): Likewise.
  4901. * decl.c (start_decl): Check for error_mark_node as a type.
  4902. Detected by g++.brendan/array-refs.C.
  4903. (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
  4904. (maybe_build_cleanup_1): Likewise. Detected by
  4905. g++.jason/incomplete1.C.
  4906. * tree.c (build_dummy_object): Use void_zero_node instead of the
  4907. error_mark_node.
  4908. (is_dummy_object): Check for such a node.
  4909. Detected by g++.bob/inherit1.C
  4910. 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
  4911. * method.c (old_backref_index): Split out...
  4912. (flush_repeats): From here. Rename back from try_old_backref.
  4913. (build_mangled_name): Put back some old-style repeat handling.
  4914. Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  4915. * lex.c: Don't include setjmp.h.
  4916. (parse_float): New static function.
  4917. (pf_args): New struct.
  4918. (real_yylex): Use them in call to `do_float_handler'.
  4919. 1999-03-15 Mark Mitchell <mark@markmitchell.com>
  4920. * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
  4921. * tree.c (layout_basetypes): Not here.
  4922. * search.c (dfs_search): Remove; no longer used.
  4923. 1999-03-12 Mark Mitchell <mark@markmitchell.com>
  4924. * decl2.c (validate_nonmember_using_decl): Issue sensible
  4925. error-messages on bogus qualifiers.
  4926. 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
  4927. * call.c (add_function_candidate): Fix uninitialized variable.
  4928. * Makefile.in (search.o): Add dependency on varray.h.
  4929. 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
  4930. * decl.c (duplicate_decls): Use same_type_p.
  4931. * method.c (try_old_backref): Renamed from flush_repeats. Use
  4932. same_type_p. Don't try to handle repeats. Return success.
  4933. (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
  4934. calls from old-style code, too.
  4935. (check_ktype): Use same_type_p.
  4936. (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
  4937. (build_qualified_name): Simplify logic.
  4938. (process_overload_item): Strip typedefs and quals at the top.
  4939. (build_mangled_name_for_type_with_Gcode): Remove call to
  4940. type_canonical_variant.
  4941. (build_mangled_name): Likewise. Remove support for old-style
  4942. repeats, which have been disabled since 2.7.2. Don't mess with
  4943. TREE_USED.
  4944. (build_decl_overload_real): Don't mess with TREE_USED.
  4945. 1999-03-13 Nathan Sidwell <nathan@acm.org>
  4946. * error.c (cp_printers): Add 'F' escape character.
  4947. (dump_type_real): Remove TREE_LIST (fnargs) printing.
  4948. Functionality moved to dump_parameters.
  4949. (dump_type_suffix): Use dump_parameters and dump_exception_spec.
  4950. (dump_function_decl): Extend meaning of V parameter. Use
  4951. dump_parameters and dump_exception_spec.
  4952. (dump_parameters): New static function.
  4953. (dump_exception_spec): New static function.
  4954. (fndecl_as_string): Change argument semantics. Use
  4955. dump_function_decl directly.
  4956. * sig.c (build_signature_table_constructor): Use cp_error.
  4957. 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4958. * semantics.c (finish_switch_cond): Handle error cases gracefully.
  4959. Detected by g++.law/enum5.C.
  4960. * typeck.c (build_modify_expr): Check for errors after resolving
  4961. offsets. Detected by g++.brendan/static1.C.
  4962. * decl.c (complete_array_type): Ignore initial_value if it is an
  4963. error. Detected by g++.benjamin/17930.C.
  4964. * typeck2.c (process_init_constructor): Return error if one argument
  4965. is in error. Detected by g++.benjamin/13478.C.
  4966. 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
  4967. * decl.c (select_decl): Allow class templates when we need types.
  4968. * decl2.c (ambiguous_decl): Likewise.
  4969. 1999-03-12 Mark Mitchell <mark@markmitchell.com>
  4970. * lex.c (do_identifier): Correct call to enforce_access.
  4971. * search.c (accessible_p): Tweak comment.
  4972. 1999-03-10 Mark Mitchell <mark@markmitchell.com>
  4973. * semantics.c (begin_class_definition): Call build_self_reference.
  4974. (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
  4975. * search.c (assert_canonical_unmarked): Fix typo in prototype.
  4976. * search.c (dfs_canonical_queue): New function.
  4977. (dfs_assert_unmarked_p): Likewise.
  4978. (assert_canonical_unmarked): Likewise.
  4979. (access_in_type): Use it.
  4980. (accessible_p): Likewise. Walk the whole tree when umarking.
  4981. * sig.c (build_signature_table_constructor): Use accessible_p
  4982. instead of compute_access.
  4983. 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
  4984. * call.c (add_builtin_candidates): Handle overloaded conversion ops.
  4985. 1999-03-09 Mark Mitchell <mark@markmitchell.com>
  4986. * cp-tree.h (flag_access_control): Declare.
  4987. (TREE_VIA_PPUBLIC): Document.
  4988. (DECL_NONSTATIC_MEMBER_P): New macro.
  4989. (enforce_access): Return an indication of whether or not access
  4990. was permitted.
  4991. (build_self_reference): Change prototype.
  4992. (compute_access): Replace with ...
  4993. (accessible_p): New function.
  4994. (dfs_walk): Change prototype.
  4995. (dfs_unmark): Likewise.
  4996. (markedp): Likewise.
  4997. * call.c (enforce_access): Use accessible_p.
  4998. * class.c (build_self_reference): Insert the declaration into the
  4999. list of members for this type, and make it public.
  5000. * decl.c (xref_basetypes): Avoid ill-timed recursion.
  5001. * init.c (build_offset_ref): Use lookup_member, not three separate
  5002. name-lookups. Call enforce_access rather than checking for
  5003. illegal accesses here.
  5004. (resolve_offset_ref): Likewise.
  5005. * lex.c (do_identifier): Likewise.
  5006. * method.c (hack_identifier): Likewise.
  5007. * parse.y (self_reference): Remove.
  5008. (opt_component_decl_list): Don't use it.
  5009. * parse.c: Regenerated.
  5010. * pt.c (print_candidates): Generalize to handle lists of
  5011. overloaded functions.
  5012. (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
  5013. not set.
  5014. (get_template_base): Use new calling convention for dfs_walk.
  5015. * search.c: Include varray.h. Add prototypes.
  5016. (dfs_walk): Accept a data pointer to pass to the work functions.
  5017. All callers changed. All work functions changed.
  5018. (breadth_first_search): Rename to bfs_walk, and make consistent
  5019. with dfs_walk.
  5020. (dfs_walk_real): New function.
  5021. (canonical_binfo): New function.
  5022. (context_for_name_lookup): Likewise.
  5023. (shared_marked_p): Likewise.
  5024. (shared_unmarked_p): Likewise.
  5025. (lokup_field_queue_p): Likewise.
  5026. (lookup_field_r): Generalize to handle both functions and fields.
  5027. (lookup_field): Just call lookup_member.
  5028. (lookup_fnfields): Likewise.
  5029. (lookup_member): Move body of lookup_field here and generalize.
  5030. (dfs_accessible_queue_p): Likewise.
  5031. (dfs_accessible_p): Likewise.
  5032. (dfs_access_in_type): Likewise.
  5033. (access_in_type): Likewise.
  5034. (compute_access): Remove, and replace with ...
  5035. (accessible_p): New function.
  5036. (vbase_types): Remove.
  5037. (vbase_decl_ptr_intermediate): Likewise.
  5038. (vbase_decl_ptr): Likewise.
  5039. (vbase_init_result): Likewise.
  5040. (closed_envelopes): Likewise.
  5041. (bvtable): Likewise.
  5042. 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
  5043. * call.c (add_function_candidate): Check for proper number of args
  5044. before checking the validity of those args.
  5045. 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
  5046. * cp-tree.h (struct lang_type): Add anon_union field.
  5047. (ANON_UNION_TYPE_P): Use it instead of examining type.
  5048. (SET_ANON_UNION_TYPE_P): New macro.
  5049. * decl.c (check_tag_decl): Use it.
  5050. * search.c (compute_access): Handle non-type contexts earlier, and
  5051. handle NULL_TREE.
  5052. * tree.c (build_exception_variant): Use copy_to_permanent.
  5053. * decl2.c (setup_initp): Give statics with no priority the default
  5054. priority here.
  5055. (do_dtors, do_ctors, finish_file): Remove special handling of
  5056. non-prioritized statics.
  5057. 1999-03-05 Mark Mitchell <mark@markmitchell.com>
  5058. * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
  5059. * decl.c (make_typename_type): Don't issue an error if an
  5060. immediate lookup fails; it migt be resolved later.
  5061. * friend.c (is_friend): Add comment.
  5062. * search.c (breadth_first_search): Add POSTFN and DATA
  5063. parameters. Tidy. All callers changed.
  5064. (lookup_field_queue_p): New function.
  5065. (lookup_field_r): Likewise.
  5066. (lookup_field_post): Likewise.
  5067. (lookup_field): Use them, via breadth_first_search, instead of
  5068. duplicating logic.
  5069. (compute_access): Robustify.
  5070. (lookup_fnfield_info): New structure.
  5071. 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
  5072. * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
  5073. 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
  5074. * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
  5075. cc happy.
  5076. * decl2.c (import_export_class): Also return if
  5077. CLASSTYPE_INTERFACE_ONLY is set.
  5078. 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
  5079. * decl.c (push_overloaded_decl): Only overwrite the old binding if
  5080. there was one.
  5081. * decl2.c (do_local_using_decl): Fix loop termination.
  5082. 1999-03-02 Mark Mitchell <mark@markmitchell.com>
  5083. * cp-tree.h (determine_specialization): Don't declare.
  5084. * pt.c (determine_specialization): Make it static. Eliminate
  5085. complain parameter. Note that decl is always non-NULL now, and
  5086. simplify accordingly.
  5087. * decl.c (maybe_push_to_top_level): Always call
  5088. push_cp_function_context.
  5089. (pop_from_top_level): Always call pop_cp_function_context.
  5090. 1999-02-26 Nathan Sidwell <nathan@acm.org>
  5091. * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
  5092. diagnostics.
  5093. * cp-tree.h (complete_type_or_else): Added VALUE parameter.
  5094. * init.c (build_new_1): Extra arg to complete_type_or_else.
  5095. (build_delete): Likewise.
  5096. * typeck.c (require_complete_type): Likewise.
  5097. (pointer_int_sum): Likewise.
  5098. (pointer_diff): Likewise.
  5099. (build_component_ref): Likewise.
  5100. * typeck2.c (incomplete_type_error): Always use cp_error.
  5101. Show declaration of undefined type, if appropriate.
  5102. Deal with UNKNOWN_TYPE nodes.
  5103. * typeck.c (require_complete_type): Use TYPE_SIZE as
  5104. size_zero_node to mean incomplete type.
  5105. (require_complete_type_in_void): New function.
  5106. (build_compound_expr): Call complete_type_in_void for LHS.
  5107. (build_c_cast): Call complete_type_in_void for void cast.
  5108. * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
  5109. * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
  5110. require_complete_type_in_void. Call it.
  5111. * cp-tree.h (require_complete_type_in_void): Prototype new function.
  5112. * typeck.c (convert_arguments): Use alternative format for
  5113. function decls. Don't require_complete_type here. Simplify
  5114. diagnostic printing.
  5115. (convert_for_initialization): Don't require_complete_type on RHS yet.
  5116. * call.c (convert_arg_to_ellipsis): Call require_complete_type.
  5117. * call.c (build_over_call): Cope with qualified void return type.
  5118. * semantics.c (finish_call_expr): Likewise.
  5119. * typeck.c (build_function_call_real): Likewise.
  5120. (c_expand_return): Likewise.
  5121. * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
  5122. * call.c (print_z_candidates): Use alternate print format, to be
  5123. consistent with (pt.c) print_candidates.
  5124. * method.c (hack_identifier): List candidate members.
  5125. * search.c (lookup_field): Build ambiguous list, and show it, if
  5126. ambiguous.
  5127. 1999-02-26 Mark Mitchell <mark@markmitchell.com>
  5128. * typeck.c (decay_conversion): Don't confuse constant array
  5129. variables with their initializers.
  5130. * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
  5131. merging decls.
  5132. * pt.c (regenerate_decl_from_template): Tweak for clarity.
  5133. (instantiate_decl): Mark a decl instantiated before regenerating
  5134. it to avoid recursion.
  5135. * tree.c (mapcar): Don't call decl_constant_value unless we know
  5136. something is TREE_READONLY_DECL_P.
  5137. * class.c (check_for_override): Don't stop checking when we find
  5138. the first overridden function. Delete #if 0'd code.
  5139. * search.c (get_matching_virtual): Likewise.
  5140. 1999-02-25 Richard Henderson <rth@cygnus.com>
  5141. * lang-specs.h: Define __FAST_MATH__ when appropriate.
  5142. 1999-02-24 Mike Stump <mrs@wrs.com>
  5143. * typeck.c (convert_for_assignment): Allow boolean integral constant
  5144. expressions to convert to null pointer.
  5145. 1999-02-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
  5146. * decl.c (lookup_namespace_name): Resolve namespace aliases.
  5147. * class.c (push_nested_class): Allow namespaces.
  5148. * decl2.c (set_decl_namespace): Add friendp parameter.
  5149. * decl.c (grokfndecl): Pass it.
  5150. (grokvardecl): Likewise.
  5151. * cp-tree.h: Change declaration.
  5152. 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
  5153. * pt.c (tsubst): Allow an array of explicit size zero.
  5154. 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
  5155. * errfn.c: Change varargs code to look like toplev.c.
  5156. * method.c (process_modifiers): Don't prepend 'U' for char or
  5157. wchar_t.
  5158. 1999-02-20 Craig Burley <craig@jcb-sc.com>
  5159. * Make-lang.in (cplib2.ready): Don't consider updating
  5160. cplib2 stuff if the current directory isn't writable, as
  5161. it won't work (such as during a `make install').
  5162. Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
  5163. * decl2.c (start_objects): Make file scope constructors and
  5164. destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
  5165. ASM_OUTPUT_DESTRUCTOR are defined.
  5166. 1999-02-19 Mark Mitchell <mark@markmitchell.com>
  5167. * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
  5168. (fn_type_unification): Adjust prototype.
  5169. (lookup_fnfields_1): Declare.
  5170. * call.c (add_template_candidate_real): Adjust call to
  5171. fn_type_unification.
  5172. * class.c (add_method): Don't allow duplicate declarations of
  5173. constructors or destructors.
  5174. (resolve_address_of_overloaded_function): Remove unused variable.
  5175. Adjust call to fn_type_unification.
  5176. * decl.c (grokfndecl): Be more robust in the face of illegal
  5177. specializations.
  5178. * decl2.c (check_classfn): Remove hokey handling of member
  5179. templates.
  5180. * pt.c (determine_specialization): Improve comments. Adjust to
  5181. handle template argument deduction as per the standard.
  5182. (check_explicit_specialization): Fix comment spacing. Handle
  5183. type-conversion operators correctly. Improve error-recovery.
  5184. (fn_type_unification): Remove EXTRA_FN_ARG parameter.
  5185. (get_bindings_real): Simplify handling of static members.
  5186. * search.c (lookup_fnfields_1): Make it have external linkage.
  5187. * typeck.c (compparms): Fix comment.
  5188. (build_unary_op): Don't try to figure out which template
  5189. specialization is being referred to when when the address-of
  5190. operator is used with a template function.
  5191. Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5192. * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
  5193. keyword to match an analogous change at the top level.
  5194. * tree.c (lvalue_or_else): Likewise.
  5195. 1999-02-17 Mark Mitchell <mark@markmitchell.com>
  5196. * decl.c (xref_basetypes): Comment.
  5197. * pt.c (instantiate_class_template): Use xref_basetypes.
  5198. 1999-02-16 Mark Mitchell <mark@markmitchell.com>
  5199. * cp-tree.h (tsubst): Change prototype.
  5200. (tsubst_expr): Likewise.
  5201. (tsubst_copy): Likewise.
  5202. (type_unification): Remove prototype.
  5203. * call.c (convert_default_arg): Adjust call to tsubst_expr.
  5204. * class.c (resolve_address_of_overloaded_function): Just use
  5205. fn_type_unification.
  5206. * decl.c (grokdeclarator): Adjust call to tsubst.
  5207. * method.c (build_template_parm_names): Likewise.
  5208. * pt.c (GTB_VIA_VIRTUAL): New macro.
  5209. (GTB_IGNORE_TYPE): Likewise.
  5210. (resolve_overloaded_unification): Add `complain' parameter.
  5211. (try_one_overload): Likewise.
  5212. (tsubst_template_arg_vector): Likewise.
  5213. (tsubst_template_parms): Likewise.
  5214. (tsubst_aggr_type): Likewise.
  5215. (tsubst_arg_types): Likewise.
  5216. (tsubst_call_declarator_parms): Likewise.
  5217. (unify): Remove explicit_mask.
  5218. (type_unification_real): Likewise.
  5219. (get_template_base_recursive): Likewise.
  5220. (coerce_template_template_parms): Provide prototype.
  5221. (tsubst_function_type): Likewise.
  5222. (try_class_unification): New function.
  5223. All callers changed to use new complain parameter.
  5224. (get_template_base): Use try_class_unification.
  5225. (unify): Adjust handling of classes derived from template types.
  5226. (fn_type_unification): Substitute explicit arguments before
  5227. unification.
  5228. 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
  5229. * decl.c (pushdecl): Remove dead code.
  5230. 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
  5231. * decl2.c (finish_objects): Fix code I missed in previous change.
  5232. 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
  5233. * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
  5234. (grokdeclarator): Don't expect error_mark_node from grokfndecl.
  5235. * pt.c (maybe_process_partial_specialization): Complain about
  5236. 'template <>' on non-specialization.
  5237. 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
  5238. * decl.c (grokdeclarator): Catch weird declarators.
  5239. * decl2.c (finish_file): Don't abort because of namespace parsing
  5240. failure.
  5241. (check_decl_namespace): Remove.
  5242. 1999-02-09 Mark Mitchell <mark@markmitchell.com>
  5243. * cp-tree.h (get_template_base): Don't declare.
  5244. (dfs_walk): Declare.
  5245. (dfs_unmark): Likewise.
  5246. (markedp): Likewise.
  5247. * pt.c (unify): Remove duplicate declaration. Pass tparms and
  5248. targs to get_template_base.
  5249. (get_template_base_recursive): Move here from search.c. Check to
  5250. see that the base found can be instantiated to form the desired
  5251. type.
  5252. (get_template_base): Likewise.
  5253. (get_class_bindings): Simplify.
  5254. * search.c (get_template_base_recursive): Move to pt.c.
  5255. (get_template_base): Likewise.
  5256. (markedp): Make it global.
  5257. (dfs_walk): Likewise.
  5258. (dfs_unmark): Likewise.
  5259. 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
  5260. * pt.c (maybe_process_partial_specialization): Complain about
  5261. specialization in wrong namespace.
  5262. * tree.c (decl_namespace_context): New fn.
  5263. 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
  5264. * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
  5265. * pt.c (coerce_template_template_parms): Handle nested
  5266. template template parameters.
  5267. Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
  5268. * typeck2.c: Update email addresses.
  5269. 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
  5270. * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
  5271. turned off.
  5272. 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
  5273. * lex.c (retrofit_lang_decl): Split out...
  5274. (build_lang_decl): From here.
  5275. * decl.c (pushdecl): Call it for functions generated by the middle
  5276. end that don't have DECL_LANG_SPECIFIC.
  5277. * cp-tree.h: Declare it.
  5278. * decl2.c: Remove flag_init_priority. Always enable initp stuff.
  5279. (start_objects, finish_objects): Only use special
  5280. init_priority code if the user specified a priority.
  5281. (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
  5282. objects.
  5283. Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
  5284. * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
  5285. mkstemp.o. Get them from libiberty now.
  5286. (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
  5287. Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
  5288. * decl2.c (lang_decode_option): Use read_integral_parameter.
  5289. 1999-02-01 Mark Mitchell <mark@markmitchell.com>
  5290. * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
  5291. before calling complete_type_or_else.
  5292. Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5293. * input.c (inline): Don't define, its handled by system.h.
  5294. Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
  5295. * decl2.c: Don't define flag_no_ident here. Don't process
  5296. -f(no-)ident here.
  5297. * cp-tree.h: Don't declare flag_no_ident here.
  5298. * lang-specs.h: Map -Qn to -fno-ident.
  5299. 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
  5300. * cp-tree.h (struct tree_binding): Replace scope field with a union.
  5301. (BINDING_SCOPE): Adjust.
  5302. * decl.c (BINDING_LEVEL): Adjust.
  5303. 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
  5304. * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
  5305. member constants.
  5306. * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
  5307. a ctor initializer.
  5308. * tree.c (equal_functions): Fix name in prototype.
  5309. * decl.c (push_local_binding): Add FLAGS argument.
  5310. (pushdecl, push_overloaded_decl): Pass it.
  5311. * decl2.c (do_local_using_decl): Likewise.
  5312. * cp-tree.h: Adjust prototype.
  5313. * decl.c (poplevel): Fix logic.
  5314. * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
  5315. (poplevel): Handle that. Fix logic for removing TREE_LISTs.
  5316. (cat_namespace_levels): Don't loop forever.
  5317. 1999-01-25 Richard Henderson <rth@cygnus.com>
  5318. * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
  5319. 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
  5320. * class.c (resolve_address_of_overloaded_function): Mark the
  5321. chosen function used.
  5322. * call.c (build_call): Make sure that a function coming in has
  5323. been marked used already.
  5324. * decl.c (expand_static_init): Call mark_used instead of
  5325. assemble_external.
  5326. * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
  5327. alloc_eh_object, expand_throw): Likewise.
  5328. * init.c (build_builtin_delete_call): Likewise.
  5329. * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
  5330. expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
  5331. expand_generic_desc): Likewise.
  5332. 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
  5333. * tree.c (equal_functions): New function.
  5334. (ovl_member): Call it.
  5335. 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
  5336. * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
  5337. 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
  5338. * decl.c (decls_match): Return 1 if old and new are identical.
  5339. (push_overloaded_decl): Set OVL_USED when PUSH_USING.
  5340. 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
  5341. * decl.c (start_function): Make member functions one_only on windows.
  5342. * decl2.c (import_export_decl): Likewise.
  5343. * decl.c (grokdeclarator): Don't complain about implicit int in
  5344. a system header. Change same-name field check to not complain in
  5345. a system header instead of within extern "C".
  5346. 1999-01-21 Mark Mitchell <mark@markmitchell.com>
  5347. * cp-tree.h (PUSH_GLOBAL): New macro.
  5348. (PUSH_LOCAL): Likewise.
  5349. (PUSH_USING): Likewise.
  5350. (namespace_bindings_p): Declare.
  5351. (push_overloaded_decl): Likewise.
  5352. * decl.c (push_overloaded_decl): Don't make it static. Check for
  5353. illegal declarations after using declarations here.
  5354. (namespace_bindings_p): Likewise.
  5355. (duplicate_decls): Don't consider declarations from different
  5356. namespaces to be the same.
  5357. (pushdecl): Use symbolic PUSH_ constants in calls to
  5358. push_overloaded_decl.
  5359. (push_overloaded_decl_1): Likewise.
  5360. * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
  5361. (do_nonmember_using_decl): Check for illegal using declarations
  5362. after ordinary declarations here.
  5363. (do_local_using_decl): Call pushdecl to insert declarations.
  5364. 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
  5365. * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
  5366. 1999-01-21 Mark Mitchell <mark@markmitchell.com>
  5367. * tree.c (build_cplus_array_type_1): Don't call build_array_type
  5368. for types involving template parameters.
  5369. * cp-tree.h (PARM_DECL_EXPR): Delete.
  5370. (convert_default_arg): Change prototype.
  5371. (check_default_argument): Declare.
  5372. (search_tree): Likewise.
  5373. * call.c (convert_default_arg): Take the function to which the
  5374. default argument belongs as a parameter, and do any necessary
  5375. instantiation here, instead of ...
  5376. (build_over_call): Here.
  5377. * decl.c (local_variable_p): New function.
  5378. (check_default_argument): Likewise, split out and tidied from ...
  5379. (grokparms): Here.
  5380. * error.c (dump_expr): Don't set PARM_DECL_EXPR.
  5381. * pt.c (tsubst_call_declarator_parms): New function.
  5382. (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
  5383. with CALL_EXPRs, rather than trying to be clever.
  5384. (tsubst): Use tsubst_call_declarator_parms.
  5385. * tree.c (search_tree): Don't make it static.
  5386. * typeck.c (convert_arguments): Use new interface to
  5387. convert_default_arg.
  5388. 1999-01-20 Mark Mitchell <mark@markmitchell.com>
  5389. * error.c (dump_function_decl): Don't print the argument types for
  5390. a function when the verbosity level is negative.
  5391. * call.c (build_over_call): Check format attributes at call-time.
  5392. * pt.c (tsubst_copy): Fix comment.
  5393. (unify): Don't allow unification with variable-sized arrays.
  5394. * semantics.c (finish_stmt_expr): When processing a template make
  5395. the BIND_EXPR long-lived.
  5396. 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
  5397. * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
  5398. (import_export_vtable): Not here.
  5399. 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
  5400. * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
  5401. non-static member function.
  5402. 1999-01-18 Nathan Sidwell <nathan@acm.org>
  5403. * class.c (instantiate_type): Only diagnose illegal address of member
  5404. function if complaining.
  5405. * decl.c (lookup_name_real): Remove duplicate code.
  5406. 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
  5407. * tree.c (copy_template_template_parm): Use permanent_obstack.
  5408. 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
  5409. * pt.c (unify): Remove restrictions on deduction of argument
  5410. of template template parameters.
  5411. 1999-01-18 Nathan Sidwell <nathan@acm.org>
  5412. * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
  5413. * class.c (resolve_address_of_overloaded_function): Show list of
  5414. all candidates, when none of them match.
  5415. 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
  5416. * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
  5417. definition of 'casting away const' in reinterpret_cast<>.
  5418. 1999-01-18 Graham <grahams@rcp.co.uk>
  5419. * cvt.c: Add include for decl.h, remove extern for
  5420. static_aggregates which is now provided by decl.h.
  5421. * Makefile.in (cvt.o): Add dependency for decl.h and missing
  5422. dependencies for convert.h and flags.h.
  5423. 1999-01-18 Nathan Sidwell <nathan@acm.org>
  5424. * decl2.c (do_dtors): Set current location to that of the
  5425. decl, for sensible diagnostics and debugging.
  5426. (check_classfn): Issue `incomplete type' error, if
  5427. class is not defined.
  5428. 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
  5429. * cp-tree.h: Add prototype for bound_pmf_p.
  5430. 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
  5431. Manfred Hollstein <manfred@s-direktnet.de>
  5432. * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
  5433. -Wreturn-type.
  5434. 1999-01-16 Nathan Sidwell <nathan@acm.org>
  5435. * cp-tree.h (struct lang_type): Added has_mutable flag.
  5436. (CLASSTYPE_HAS_MUTABLE): New macro to access it.
  5437. (TYPE_HAS_MUTABLE_P): New macro to read it.
  5438. (cp_has_mutable_p): Prototype for new function.
  5439. * class.c (finish_struct_1): Set has_mutable from members.
  5440. * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
  5441. it contains a mutable.
  5442. * typeck.c (cp_has_mutable_p): New function.
  5443. 1999-01-15 Mark Mitchell <mark@markmitchell.com>
  5444. * pt.c (process_template_parm): Ignore top-level qualifiers on
  5445. non-type parameters.
  5446. * decl.c (start_function): Use current_function_parms in the call
  5447. to require_complete_type_for_parms, not the probably empty
  5448. DECL_ARGUMENTS.
  5449. 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
  5450. * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
  5451. * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
  5452. that we don't suppress the other copies.
  5453. * lex.c (handle_cp_pragma): Likewise.
  5454. 1999-01-13 Mark Mitchell <mark@markmitchell.com>
  5455. * decl.c (grokdeclarator): Undo 1998-12-14 change.
  5456. * tree.c (build_cplus_array_type_1): Likewise.
  5457. * pt.c (instantiate_class_template): Remove misleading comment.
  5458. (tsubst_aggr_type): Substitute if there are template parameters,
  5459. regardless of whether or not they use template arguments.
  5460. (unify): Likewise, but for unification.
  5461. 1999-01-12 Richard Henderson <rth@cygnus.com>
  5462. * cp-tree.h (flag_permissive): Declare extern.
  5463. 1999-01-06 Mark Mitchell <mark@markmitchell.com>
  5464. * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
  5465. here.
  5466. (lang_type): Add is_partial_instantiation. Decrease width of
  5467. dummy.
  5468. (PARTIAL_INSTANTIATION_P): New macro.
  5469. (OPERATOR_TYPENAME_P): Remove.
  5470. * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
  5471. OPERATOR_TYPENAME_P.
  5472. (grok_op_properties): Likewise.
  5473. * friend.c (do_friend): Handle friends that are member functions
  5474. correctly.
  5475. * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
  5476. * pt.c (instantiate_class_template): Rework for clarity. Avoid
  5477. leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
  5478. any more partial instantiation than is absolutely necessary for
  5479. implicit typename. Set PARTIAL_INSTANTIATION_P.
  5480. (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
  5481. * semantics.c (begin_class_definition): Handle partial
  5482. specializations of a type that was previously partially
  5483. instantiated.
  5484. Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
  5485. * g++spec.c (LIBSTDCXX): Provide default definition.
  5486. (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
  5487. Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5488. * Make-lang.in (g++.o): Depend on prefix.h.
  5489. 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
  5490. * tree.c (bound_pmf_p): New fn.
  5491. * typeck.c (build_c_cast): Use it.
  5492. * decl.c (grok_op_properties): Use same_type_p.
  5493. Copyright (C) 1999 Free Software Foundation, Inc.
  5494. Copying and distribution of this file, with or without modification,
  5495. are permitted in any medium without royalty provided the copyright
  5496. notice and this notice are preserved.