ChangeLog-2004 242 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885
  1. 2004-12-31 Richard Henderson <rth@redhat.com>
  2. PR middle-end/17799
  3. * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
  4. * class.c (build_vtable): Don't conditionallize setting it
  5. based on DWARF2_DEBUG.
  6. (layout_class_type): Set DECL_IGNORED_P.
  7. * decl2.c (get_guard): Likewise.
  8. * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
  9. * tree.c (build_local_temp): Likewise.
  10. 2004-12-30 Mark Mitchell <mark@codesourcery.com>
  11. * cp-tree.h (cp_declarator): Split "name" field into
  12. qualifying_scope and unqualified_name.
  13. * decl.c (get_scope_of_declarator): Adjust accordingly.
  14. (grokdeclarator): Likewise.
  15. * decl2.c (grokfield): Likewise, and adjust call to
  16. do_class_using_decl.
  17. * name-lookup.c (do_class_using_decl): Split "decl" into
  18. "scope" and "name". Remove unnecessary code.
  19. * name-lookup.h (do_class_using_decl): Adjust declaration.
  20. * parser.c (make_id_declarator): Split "id" into qualifying_scope
  21. and unqualified_name.
  22. (cp_parser_using_declaration): Adjust call to do_class_using_decl.
  23. (cp_parser_direct_declarator): Adjust to handle the fact that
  24. cp_parser_declarator_id no longer returns a SCOPE_REF.
  25. (cp_parser_direct_declarator): Likewise.
  26. (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
  27. names.
  28. (cp_parser_member_declaration): Adjust call to make_id_declarator.
  29. (cp_parser_check_declarator_template_parameters): Do not expect a
  30. SCOPE_REF.
  31. * decl.c (duplicate_decls): Call ggc_free on declarations we will
  32. not be needing any longer.
  33. PR c++/19190
  34. * cvt.c (convert_to_void): Do not use STRIP_NOPs.
  35. 2004-12-28 Richard Henderson <rth@redhat.com>
  36. PR inline-asm/15740
  37. * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
  38. constraints. Mark memory inputs addressable.
  39. 2004-12-27 Jason Merrill <jason@redhat.com>
  40. * decl.c (expand_static_init): Don't use shortcut if
  41. targetm.relaxed_ordering.
  42. 2004-12-27 Mark Mitchell <mark@codesourcery.com>
  43. PR c++/19149
  44. * decl.c (check_tag_decl): Robustify.
  45. 2004-12-23 Mark Mitchell <mark@codesourcery.com>
  46. PR c++/17595
  47. * parser.c (cp_parser_error): Issue better messages about
  48. #pragma in locations where it is not permitted.
  49. PR c++/17413
  50. * pt.c (check_instantiated_args): Remove bogus SFINAE code.
  51. * cvt.c (convert_to_void): Fix typo in comment.
  52. 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
  53. PR c++/18962
  54. * pt.c (check_explicit_specialization): Use the argument list from
  55. the definition in a template function specialization definition.
  56. 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  57. PR c++/18733
  58. * pt.c (check_explicit_specialization): Use special logic to validate
  59. befriended specializations.
  60. 2004-12-22 Mark Mitchell <mark@codesourcery.com>
  61. * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
  62. PR c++/18464
  63. * call.c (build_this): In templates, do not bother with
  64. build_unary_op.
  65. * typeck.c (unary_complex_lvalue): In a template, always refuse
  66. simplifications.
  67. PR c++/18492
  68. * cp-gimplify.c (cp_genericize): Relax assertion.
  69. PR c++/11224
  70. * cvt.c (convert_to_void): Warn about unused values.
  71. PR c++/18257
  72. * rtti.c (emit_support_tinfos): On systems without weak symbols,
  73. emit the runtime library type-info objects as non-COMDAT.
  74. 2004-12-21 Mark Mitchell <mark@codesourcery.com>
  75. PR c++/18378
  76. * call.c (convert_like_real): Do not permit the use of a copy
  77. constructor to copy a packed field.
  78. PR c++/19063
  79. * decl.c (grokdeclarator): Return error_mark_node, not
  80. void_type_node, to indicate errors.
  81. * parser.c (cp_parser_template_parameter_list): Robustify.
  82. (cp_parser_template_parameter): Likewise.
  83. PR c++/19034
  84. * tree.c (cp_tree_equal): Handle OVERLOAD.
  85. 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  86. * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
  87. * name-lookup.c (pushdecl_class_level): Likewise.
  88. 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  89. * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
  90. 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
  91. PR c++/18984
  92. * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
  93. check to see if contains the pointer. Insert the statement before
  94. returning.
  95. 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
  96. PR c++/14075
  97. * decl.c (check_initializer): Check string initializer of array is
  98. not parenthesized.
  99. * cp-tree.h (PAREN_STRING_LITERAL_P): New.
  100. * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
  101. * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
  102. * cp-tree.def (TEMPLATE_TYPE_PARM,
  103. BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
  104. for better code efficiency.
  105. * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
  106. (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
  107. (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
  108. INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
  109. CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
  110. TYPE_PTROBV_P): Likewise.
  111. PR c++/18975
  112. * method.c (do_build_copy_constructor): Refactor. Don't const
  113. qualify a mutable field.
  114. (do_build_assign_ref): Likewise.
  115. 2004-12-20 Matt Austern <austern@apple.com>
  116. PR c++/19044
  117. * decl.c (make_rtl_for_nonlocal_decl): Use
  118. set_builtin_user_assembler_name.
  119. 2004-12-19 Mark Mitchell <mark@codesourcery.com>
  120. * cp-tree.h (note_decl_for_pch): New function.
  121. * class.c (build_clone): Call note_decl_for_pch.
  122. * semantics.c (finish_member_declaration): Likewise.
  123. (note_decl_for_pch): New function.
  124. 2004-12-17 Steven Bosscher <stevenb@suse.de>
  125. * init.c (build_zero_init): max_index is the number of
  126. elements, minus 1.
  127. 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
  128. PR c++/18721
  129. * class.c (add_method): Do not push conversion operators into a
  130. binding level.
  131. * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
  132. * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
  133. 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
  134. PR c++/18905
  135. * cp-tree.h (integral_constant_value): Declare.
  136. * call.c (null_ptr_cst_p): Use integral_constant_value, not
  137. decl_constant_value.
  138. (convert_like_real): Likewise.
  139. * class.c (check_bitfield_decl): Likewise.
  140. * cvt.c (ocp_convert): Likewise.
  141. (convert): Remove unnecessary decl_constant_value call.
  142. * decl.c (compute_array_index_type): Use integral_constant_value,
  143. not decl_constant_value.
  144. (build_enumerator): Likewise.
  145. * decl2.c (grokfield): Likewise.
  146. * init.c (decl_constant_value): Simplify.
  147. (integral_constant_value): New.
  148. * pt.c (fold_decl_constant_value): Use integral_constant_value,
  149. remove subsequent check.
  150. (tsubst): Use integral_constant_value, not decl_constant_value.
  151. (tsubst_copy, unify): Likewise.
  152. * typeck.c (decay_conversion): Likewise.
  153. (build_compound_expr): Remove unnecessary decl_constant_value
  154. calls.
  155. (build_static_cast_1, build_reinterpret_cast_1):
  156. (convert_for_assignment): Remove comment about not calling
  157. decl_constant_value.
  158. 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  159. PR c++/18825
  160. * pt.c (instantiate_class_template): Set input_location for
  161. friend function.
  162. (tsubst_friend_function): Don't set input_location here.
  163. Make sure the context is complete if necessary.
  164. 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
  165. PR c++/18981
  166. * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
  167. flag setting.
  168. 2004-12-14 Mark Mitchell <mark@codesourcery.com>
  169. PR c++/18738
  170. * decl.c (make_typename_type): Do not handle namespace-scoped
  171. names here.
  172. (tag_name): Handle typename_type.
  173. (check_elaborated_type_specifier): Handle typenames.
  174. * parser.c (cp_parser_diagnose_invalid_type_name): Improve
  175. comment.
  176. (cp_parser_elaborated_type_specifier): Use
  177. cp_parser_diagnose_invalid_type_name.
  178. 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
  179. PR c++/18965
  180. * init.c (build_zero_init): If the max_index is 0, there is no
  181. need to create a RANGE_EXPR.
  182. 2004-12-14 Mark Mitchell <mark@codesourcery.com>
  183. PR c++/18793
  184. * cp-objcp-common.c (cp_expr_size): Loosen assertion.
  185. 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
  186. PR c++/18949
  187. * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
  188. REFERENCE_REF_P is dereferencing a reference type.
  189. * typeck.c (build_static_cast): Convert from reference even in a
  190. template.
  191. (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
  192. 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  193. * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
  194. (cp_parser_name_lookup_error): Use it.
  195. (cp_parser_check_for_invalid_template_id): Likewise.
  196. (cp_parser_skip_to_closing_parenthesis): Likewise.
  197. (cp_parser_nested_name_specifier_opt): Likewise.
  198. (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
  199. (cp_parser_parameter_declaration_list): Likewise.
  200. (cp_parser_parameter_declaration): Likewise.
  201. (cp_parser_template_name): Let cp_parser_simulate_error perform
  202. the checking.
  203. (cp_parser_committed_to_tentative_parse): Remove.
  204. 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
  205. PR c++/18968
  206. * class.c (build_base_path): Convert the zero constant to the correct
  207. type when comparing.
  208. 2004-12-13 Mark Mitchell <mark@codesourcery.com>
  209. PR c++/18925
  210. * class.c (layout_class_type): Determine the visibility of static
  211. data members.
  212. 2004-12-12 Roger Sayle <roger@eyesopen.com>
  213. PR middle-end/12454
  214. * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
  215. condition is a constant and the unexecuted clause is empty.
  216. 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  217. PR c++/18731
  218. * parser.c (cp_parser_class_head): Reject typedef-name in class head.
  219. 2004-12-09 Matt Austern <austern@apple.com>
  220. PR c++/18514
  221. * name-lookup.c (do_nonmember_using_decl): A real function
  222. declaration takes precedence over an anticipated declaration.
  223. 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  224. * parser.c (cp_parser_member_declaration): Fix comment typo.
  225. 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
  226. PR c++/18757
  227. * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
  228. if parsing failed.
  229. 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  230. PR c++/18073
  231. * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
  232. 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
  233. PR c++/16681
  234. * init.c (build_zero_init): Build a RANGE_EXPR for an array
  235. initializer.
  236. 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
  237. * typeck.c: Remove DOS line endings.
  238. 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  239. PR c++/18100
  240. * decl.c (lookup_and_check_tag): Diagnose nested class with
  241. the same name as enclosing class.
  242. 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
  243. PR c++/18803
  244. * cp-tree.h (REFERENCE_REF_P): New.
  245. (CPTI_TYPE_INFO_TYPE): Rename to ...
  246. (CPTI_CONST_TYPE_INFO_TYPE): ... here.
  247. (CPTI_TYPE_INFO_REF_TYPE): Remove.
  248. (type_info_type_node): Rename to ...
  249. (const_type_info_type_node): ... here.
  250. (type_info_ref_type): Remove.
  251. * call.c (build_user_type_conversion): Reformat.
  252. (resolve_args): Do not convert_from_reference.
  253. (build_object_call): Call convert_from_reference.
  254. (prep_operand): Do not convert_from_reference.
  255. (build_new_method_call): Likewise.
  256. * class.c (build_vfield_ref): Likewise.
  257. * cvt.c (convert_to_reference): Likewise.
  258. (convert_from_reference): Build INDIRECT_REF here, not with
  259. build_indirect_ref.
  260. (convert_force): Do not convert_from_reference.
  261. (build_expr_type_conversion): Likewise.
  262. * decl.c (grok_reference_init): Likewise.
  263. * decl2.c (delete_sanity): Likewise.
  264. * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
  265. * init.c (build_dtor_call): Do not convert_from_reference.
  266. * parser.c (cp_parser_template_argument): Unwrap indirected
  267. reference. Allow TEMPLATE_PARM_INDEX as an object parm.
  268. * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
  269. convert_from_reference, if indicated.
  270. <case CALL_EXPR>: Do not convert_from_reference.
  271. <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
  272. (tsubst_initializer_list): Do not convert_from_reference.
  273. * rtti.c (init_rtti_processing): Adjust node creation.
  274. (throw_bad_typeid): Use const_type_info_type_node.
  275. Do not convert_from_reference.
  276. (typeid_ok_p): Use const_type_info_type_node.
  277. (build_typeid, get_typeid): Always return type_info typed node.
  278. (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
  279. * semantics.c (finish_stmt_expr_expr): Do not
  280. convert_from_reference.
  281. (finish_id_expression): Convert_from_reference as appropriate.
  282. * typeck.c (decay_conversion): Do not convert_from_reference.
  283. (finish_class_member_access_expr): Likewise.
  284. (build_indirect_ref): Use POINTER_TYPE_P.
  285. (convert_arguments): Do not convert_from_reference.
  286. (build_modify_expr): Likewise.
  287. (convert_for_initialization): Likewise.
  288. * typeck2.c (build_x_arrow): Likewise.
  289. 2004-12-07 Ziemowit Laski <zlaski@apple.com>
  290. * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
  291. field to 'objc_info'.
  292. 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
  293. * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
  294. 2004-12-07 Roger Sayle <roger@eyesopen.com>
  295. * name-lookup.c (leave_scope): We only need to update
  296. class_binding_level when leaving a class scope.
  297. 2004-12-06 Ziemowit Laski <zlaski@apple.com>
  298. * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
  299. 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  300. PR c++/17011, c++/17971
  301. * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
  302. invalid field.
  303. (tsubst_copy_and_build) <COMPONENT_REF case>: Check
  304. error_mark_node after member substitution.
  305. * semantics.c (finish_id_expression): Call
  306. finish_non_static_data_member for non-dependent FIELD_DECL.
  307. 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
  308. PR c++/18782
  309. * decl.c (grokdeclarator): Make sure class in pointer to member is
  310. not a namespace.
  311. 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
  312. PR c++/18318
  313. * parser.c (cp_parser_new_type_id): Move array size expression
  314. checks from here ...
  315. * init.c (build_new): ... to here.
  316. 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
  317. PR c++/18758
  318. * parser.c (cp_parser_class_head): Return NULL_TREE when
  319. push_template_decl fails. Update comment.
  320. 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  321. PR c++/15664, c++/18276
  322. * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
  323. tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
  324. 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  325. PR c++/18123
  326. * parser.c (cp_parser_type_specifier): Catch template declaration
  327. of enum.
  328. 2004-12-01 Matt Austern <austern@apple.com>
  329. * name-lookup.c (namespace_binding): Omit alias check for global
  330. namespace.
  331. 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
  332. PR c++/18729
  333. * parser.c (cp_parser_class_name): Check decl's type is not
  334. error_mark_node.
  335. PR c++/17431
  336. * call.c (standard_conversion): Add FLAGS parameter. Do not allow
  337. derived to base conversion when checking constructor
  338. accessibility.
  339. (implicit_conversion): Pass FLAGS to standard_conversion.
  340. (check_constructir_callable): Disallow conversion functions.
  341. 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
  342. * parser.c: Fix comment typos.
  343. 2004-11-27 Mark Mitchell <mark@codesourcery.com>
  344. PR c++/18368
  345. * parser.c (cp_parser_check_for_definition_in_return_type): Take
  346. the defined type as a parameter, and inform the user about the
  347. possibility of a missing semicolon.
  348. (cp_parser_explicit_instantiation): Adjust call to
  349. cp_parser_check_for_definition_in_return_type.
  350. (cp_parser_init_declarator): Likewise.
  351. (cp_parser_member_declaration): Likewise.
  352. PR c++/18674
  353. * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
  354. typename from comments.
  355. * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
  356. (TYPENAME_IS_CLASS_P): Likewise.
  357. (make_typename_type): Change prototype.
  358. * decl.c (struct_typename_info): New type.
  359. (typename_compare): Expect the second argument to be a
  360. typename_info, not a tree.
  361. (build_typename_type): Add tag_type parameter. Do not create a
  362. new type until necessary.
  363. (make_typename_type): Add tag_type parameter.
  364. * error.c (TYPENAME_TYPE): Print tags other than "typename" if
  365. appropriate.
  366. * friend.c (make_friend_class): Adjust call to make_typename_type.
  367. * parser.c (cp_parser_make_typename_type): Likewise.
  368. (cp_parser_primary_expression): Adjust call to
  369. cp_parser_lookup_name.
  370. (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
  371. (cp_parser_class_or_namespace_name): Likewise.
  372. (cp_parser_postfix_expression): Adjust calls to
  373. make_typename_type.
  374. (cp_parser_mem_initializer_id): Adjust calls to
  375. cp_parser_class_name.
  376. (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
  377. (cp_parser_template_name): Likewise.
  378. (cp_parser_template_argument): Likewise.
  379. (cp_parser_type_name): Adjust call to cp_parser_class_name.
  380. (cp_parser_elaborated_type_specifier): Adjust calls to
  381. make_typename_type and cp_parser_lookup_name.
  382. (cp_parser_namespace_name): Likewise.
  383. (cp_parser_class_name): Replace type_p parameter with tag_type.
  384. Adjust calls to make_typename_type and cp_parser_lookup_name.
  385. (cp_parser_class_head): Adjust calls to cp_parser_class_name.
  386. (cp_parser_base_specifier): Likewise.
  387. (cp_parser_lookup_name): Replace is_type parameter with tag_type.
  388. Adjust calls to make_typename_type and lookup_qualified_name.
  389. (cp_parser_lookup_name_simple): Adjust call to
  390. cp_parser_lookup_name.
  391. (cp_parser_constructor_declarator_p): Adjust call to
  392. cp_parser_class_name.
  393. * pt.c (convert_template_argument): Adjust all to
  394. make_typename_type.
  395. (tsubst_decl): Do not pre-substitute the type of the declaration.
  396. (tsubst): Hand off declarations more quickly. Adjust call to
  397. make_typename_type.
  398. PR c++/18512
  399. * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
  400. 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
  401. PR c/7544
  402. * Make-lang.in (cp/decl2.o): Update dependencies.
  403. * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
  404. 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  405. PR c++/18652
  406. * name-lookup.c (pushtag): Change return type to tree.
  407. * cp-tree.h (pushtag): Adjust declaration.
  408. * decl.c (xref_tag, start_enum): Use return value of pushtag.
  409. * pt.c (push_template_decl_real): Return immediately if
  410. pushdecl_namespace_level returns error_mark_node.
  411. 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
  412. * pt.c: Fix a comment typo.
  413. 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  414. Friend class name lookup 4/n
  415. * class.c (pushclass): Don't call cxx_remember_type_decls.
  416. * cp-tree.h (clear_anon_tags): Remove declaration.
  417. * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
  418. * name-lookup.c (binding_entry_free, binding_table_free): Comment
  419. out functions.
  420. (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
  421. binding_table_remove_anonymous_types, cxx_remember_type_decls,
  422. bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
  423. lookup_tag_reverse): Remove
  424. (begin_scope, leave_scope, kept_level_p, print_binding_level):
  425. Don't use type_decls field in cp_binding_level.
  426. (maybe_process_template_type_declaration, pushtag): Set
  427. CLASSTYPE_NESTED_UTDS directly.
  428. * name-lookup.h (binding_table_remove_anonymous_types,
  429. cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
  430. declaration.
  431. (cp_binding_level): Remove type_decls field.
  432. 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
  433. * typeck.c: Fix a comment typo.
  434. 2004-11-25 Mark Mitchell <mark@codesourcery.com>
  435. PR c++/18445
  436. * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
  437. unknown_type as non matching. Tidy up.
  438. * pt.c (build_non_dependent_expr): Do not build a
  439. NON_DEPENDENT_EXPR for a VAR_DECL.
  440. PR c++/18001
  441. * cp-tree.h (lvalue_or_else): Remove declaration.
  442. * tree.c (lvalue_or_else): Remove.
  443. * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
  444. (build_modify_expr): Likewise.
  445. PR c++/18625
  446. * decl.c (duplicate_decls): Return error_mark_node on error, as
  447. specified.
  448. PR c++/18466
  449. * decl.c (grokvardecl): Keep track of whether or not a there was
  450. explicit qualification.
  451. * name-lookup.c (set_decl_namespace): Complain about explicit
  452. qualification of a name within its own namespace.
  453. PR c++/18545
  454. * typeck.c (check_return_expr): Robustify.
  455. 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  456. Friend class name lookup 3/n, PR c++/3332
  457. * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
  458. (lookup_type_scope): Don't deal with name from user declaration
  459. specially.
  460. * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
  461. * parser.c (cp_parser_class_specifier): Use push_inner_scope and
  462. pop_inner_scope.
  463. 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  464. Friend class name lookup 2/n, PR c++/14513, c++/15410
  465. * name-lookup.c (lookup_name_real): Simplify.
  466. (lookup_type_scope): Add SCOPE parameter. Handle friend class
  467. lookup.
  468. * name-lookup.h (tag_scope): New enum type.
  469. (lookup_type_scope): Adjust declaration.
  470. * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
  471. Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
  472. (start_enum): Likewise. Add assertion test that NAME is
  473. IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
  474. case of error.
  475. * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
  476. * parser.c (cp_parser_elaborated_type_specifier,
  477. cp_parser_class_head): Adjust call to xref_tag.
  478. * pt.c (lookup_template_class, instantiate_class_template):
  479. Likewise.
  480. * rtti.c (init_rtti_processing, build_dynamic_cast_1,
  481. tinfo_base_init, emit_support_tinfos): Likewise.
  482. 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
  483. * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
  484. 2004-11-24 Mark Mitchell <mark@codesourcery.com>
  485. PR c++/17473
  486. * name-lookup.c (supplement_binding): Do not allow typedefs to be
  487. redefined in class scope.
  488. PR c++/18285
  489. * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
  490. redefinitions of builtin types other that "bool" or "wchar_t".
  491. 2004-11-24 Steven Bosscher <stevenb@suse.de>
  492. * decl.c (cxx_init_decl_processing): Don't clear
  493. flag_inline_functions.
  494. 2004-11-24 Mark Mitchell <mark@codesourcery.com>
  495. * pt.c (tsubst_function_type): Do not permit function types which
  496. return arrays or functions.
  497. PR c++/18586
  498. * parser.c (cp_parser_init_declarator): Do not pop scope twice.
  499. PR c++/18530
  500. * cp-tree.h (CTOR_NAME): Remove.
  501. (DTOR_NAME): Remove.
  502. * decl.c (initialize_predefined_identifiers): Add spaces to the
  503. end of constructor and destructor names.
  504. 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  505. PR c++/8929
  506. * decl.c (start_decl): Check for invalid specialization headers.
  507. 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
  508. PR c++/16882
  509. * call.c (standard_conversion): Move check for conversions between
  510. vector pointers...
  511. * typeck.c (ptr_reasonably_similar): ... here.
  512. 2004-11-23 Ben Elliston <bje@au.ibm.com>
  513. * cp-tree.h (context_as_string): Remove extern.
  514. * error.c (context_as_string): Remove.
  515. * cp-tree.h (cp_type_qual_from_rid): Remove extern.
  516. * lex.c (cp_type_qual_from_rid): Remove.
  517. * cp-tree.h (do_poplevel): Remove extern.
  518. (check_multiple_declarators): Likewise.
  519. * semantics.c (do_poplevel): Make static.
  520. (check_multiple_declarators): Remove.
  521. * cp-tree.h (check_final_overrider): Remove extern.
  522. * search.c (check_final_overrider): Make static.
  523. * cp-tree.h (build_artificial_parm): Remove extern.
  524. * decl2.c (build_artificial_parm): Make static.
  525. 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  526. PR c++/18354
  527. * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
  528. Make sure the result is always a rvalue.
  529. 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  530. * decl.c (start_preparsed_function): Call check_function_type even
  531. in templates.
  532. (require_complete_types_for_parms): Skip dependent types.
  533. (check_function_type): Likewise.
  534. 2004-11-16 Steven Bosscher <stevenb@suse.de>
  535. * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
  536. * search.c: Don't include it.
  537. 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
  538. * cp-gimplify.c: Include pointer-set.h
  539. (cp_genericize_r): Use pointer_sets instead of a hashtable.
  540. Also instert the new statement for CLEANUP_STMT.
  541. (cp_genericize): Use pointer_sets instead of a hashtable.
  542. * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
  543. 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  544. Friend class name lookup 1/n, PR c++/18471
  545. * decl.c (lookup_and_check_tag): New function.
  546. (xref_tag, start_enum): Use it.
  547. (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
  548. before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
  549. location.
  550. * name-lookup.c (lookup_name_current_level): Rename to ...
  551. (lookup_name_innermost_nonclass_level): ... this.
  552. (lookup_type_scope): New function.
  553. * name-lookup.h (lookup_name_current_level): Rename to ...
  554. (lookup_name_innermost_nonclass_level): ... this.
  555. (lookup_type_scope): Add declaration.
  556. 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  557. PR c++/17344
  558. * pt.c (coerce_template_parms): Only emit error message about
  559. invalid template argument when TF_ERROR.
  560. 2004-11-12 Mark Mitchell <mark@codesourcery.com>
  561. PR c++/18389
  562. * decl.c (start_decl): Make sure to set *pop_scope_p. Return
  563. error_mark_node to indicate errors.
  564. PR c++/18429
  565. * parser.c (cp_parser_direct_declarator): Disallow non-constant
  566. array bounds when not inside a function.
  567. PR c++/18436
  568. * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
  569. unqualified name resolves to a member function.
  570. PR c++/18407
  571. * pt.c (tsubst_copy_and_build): Handle qualified names used from a
  572. derived class correctly.
  573. * decl2.c (import_export_decl): Fix typo in comment.
  574. * tree.c (pod_type_p): Likewise.
  575. 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
  576. * typeck.c (cxx_mark_addressable): Add braces around the first if.
  577. 2004-11-10 Adam Nemet <anemet@lnxw.com>
  578. PR middle-end/18160
  579. * typeck.c (cxx_mark_addressable): Issue an error if address of an
  580. explicit register variable is requested.
  581. 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
  582. PR c++/18143
  583. * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
  584. (struct lang_decl_flags): Add thunk_p flag.
  585. (struct lang_decl): Remove separate fixed_offset. Place
  586. cloned_function and fixed_offset into union.
  587. (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
  588. (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
  589. (THUNK_FIXED_OFFSET): Adjust.
  590. * method.c (make_thunk): Adjust.
  591. 2004-11-09 Mark Mitchell <mark@codesourcery.com>
  592. PR c++/18369
  593. * init.c (build_new_1): Handle parenthesized type-ids that name an
  594. array type. Tidy.
  595. 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
  596. * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
  597. pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
  598. quoting in diagnostics.
  599. * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
  600. quoting in printf format.
  601. * decl.c (duplicate_decls, start_decl): Use %qD instead of
  602. unquoted %D.
  603. 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
  604. * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
  605. search.c, typeck2.c: Fix comment formatting.
  606. 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
  607. PR tree-optimization/18184
  608. * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
  609. of different modes or alias-all flags as equivalent.
  610. * typeck.c (comptypes): Likewise.
  611. 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  612. DR 49, 100
  613. * cp-tree.h (TYPE_REF_OBJ_P): New macro.
  614. (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
  615. TYPE_REFFN_P): Document.
  616. (fold_decl_constant_value): New prototype.
  617. * pt.c (convert_nontype_argument_function): Rewrite and extract
  618. parts into...
  619. (fold_decl_constant_value, convert_nontype_argument_function): New.
  620. (lookup_template_class): Add comment about useless double call.
  621. * mangle.c (write_expression): Strip conversions before lowering
  622. pointer to members.
  623. * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
  624. enum to enum conversion.
  625. 2004-11-02 Mark Mitchell <mark@codesourcery.com>
  626. PR c++/18124
  627. * parser.c (cp_parser_type_parameter): Robustify.
  628. PR c++/18155
  629. * parser.c (cp_parser_single_declaration): Disallow template
  630. typedefs.
  631. PR c++/18177
  632. * typeck.c (build_const_cast): Use error_operand_p.
  633. 2004-11-02 Ziemowit Laski <zlaski@apple.com>
  634. * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
  635. (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
  636. * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
  637. from cp-lang.c.
  638. * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
  639. from cp-lang.c.
  640. (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
  641. 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
  642. PR c++/18064
  643. * search.c (check_final_overrider): Deprecate gnu covariant extension.
  644. 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
  645. Convert diagnostics to use quoting flag q 9/n
  646. * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
  647. get_delta_difference): Use new quotation style.
  648. * repo.c (reopen_repo_file_for_write): Likewise.
  649. * pt.c (do_type_instantiation): Likewise.
  650. * parser.c (cp_parser_diagnose_invalid_type_name):
  651. * name-lookup.c (push_overloaded_decl, set_decl_namespace):
  652. * error.c (cp_print_error_function,
  653. print_instantiation_full_context): Likewise.
  654. * decl.c (define_label, grok_reference_init,
  655. maybe_deduce_size_from_array_init, revert_static_member_fn):
  656. * decl2.c (check_classfn): Likewise.
  657. * class.c (add_method, check_field_decls, layout_class_type,
  658. resolve_address_of_overloaded_function): Likewise.
  659. * call.c (build_x_va_arg, build_over_call): Likewise.
  660. 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
  661. Convert diagnostics to use quoting flag q 8/n
  662. * cvt.c (cp_convert_to_pointer, warn_ref_binding,
  663. convert_to_reference, ocp_convert, convert_to_void
  664. cp_convert_to_pointer): Use new quotation style.
  665. 2004-10-31 Mark Mitchell <mark@codesourcery.com>
  666. PR c++/15172
  667. * typeck2.c (store_init_value): Use split_nonconstant_init even
  668. for types that require construction.
  669. 2004-10-28 Matt Austern <austern@apple.com>
  670. PR c++/17542
  671. * cp-tree.h (class_key_or_enum_as_string): Declare.
  672. * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
  673. and remove static qualifier.
  674. * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
  675. union/enum declaration.
  676. 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
  677. * pt.c: Fix a comment typo.
  678. 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
  679. * typeck.c (composite_pointer_type): Remove comment about DR 195.
  680. (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
  681. warning when being pedantic.
  682. (build_reinterpet_cast, build_c_cast): Adjust.
  683. 2004-10-29 Mark Mitchell <mark@codesourcery.com>
  684. PR c++/17695
  685. * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
  686. appear in a constructor/destructor that will be cloned.
  687. 2004-10-28 Matt Austern <austern@apple.com>
  688. PR c++/14124
  689. * decl.c (finish_enum): Handle packed attribute.
  690. * parser.c (cp_parser_enum_specifier): Process trailing attributes.
  691. 2004-10-28 Mark Mitchell <mark@codesourcery.com>
  692. PR c++/17132
  693. * pt.c (instantiate_class_template): Increment
  694. processing_template_decl when substituting into a member class
  695. template.
  696. 2004-10-27 Mark Mitchell <mark@codesourcery.com>
  697. PR c++/17435
  698. * call.c (convert_like_real): Fix formatting.
  699. (initialize_reference): When binding a temporary to a base class,
  700. ensure that the nominal copy made is to the derived class, not the
  701. base class.
  702. PR c++/18140
  703. * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
  704. include ">>".
  705. 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
  706. * decl.c (bad_specifiers): Move the q after the %.
  707. 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
  708. * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
  709. the %.
  710. 2004-10-26 Mark Mitchell <mark@codesourcery.com>
  711. * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
  712. * search.c (current_scope): Fix prototype.
  713. PR c++/18093
  714. * search.c (current_scope): Return the innermost non-block scope,
  715. not the innermost non-block, non-namespace scope.
  716. (at_namespace_scope_p): Adjust accordingly.
  717. (dfs_accessible_post): Do not pass namespaces to is_friend.
  718. (dfs_walk_once_accessible_r): Likewise.
  719. * decl.c (grokvardecl): Adjust call to current_scope.
  720. (build_enumerator): Likewise.
  721. * parser.c (cp_parser_using_declaration): Likewise.
  722. (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
  723. current_scope.
  724. (cp_parser_class_head): Adjust call to current_scope.
  725. * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
  726. alias.
  727. PR c++/18020
  728. * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
  729. their underlying values.
  730. PR c++/18161
  731. * typeck.c (build_binary_op): Honor build_type, even when in a
  732. template.
  733. 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
  734. * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
  735. padding token checking.
  736. 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
  737. PR c++/18121
  738. * decl.c (grokdeclarator) <case cdk_array>: Remove the call
  739. layout_type as it is already done by create_array_type_for_decl.
  740. 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
  741. PR c++/18095
  742. * parser.c (eof_token): Make const, correctly initialize rid and
  743. location fields.
  744. (struct cp_lexer): Replace buffer_end pointer with buffer_length
  745. count. Adjust.
  746. (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
  747. zero it out.
  748. (cp_lexer_new_from_tokens): Adjust.
  749. (cp_lexer_grow_buffer): Remove.
  750. (cp_lexer_peek_nth_token, cp_lexer_consume_token,
  751. cp_lexer_purge_token): Add const casts.
  752. 2004-10-21 Mark Mitchell <mark@codesourcery.com>
  753. PR c++/18073
  754. PR c++/10841
  755. * cp-tree.h (convert_to_base): Change prototype.
  756. (build_ptrmemfunc): Likewise.
  757. (convert_ptrmem): New function.
  758. * call.c (struct conversion): Adjust documentation for base_p.
  759. (standard_conversion): Set base_p for ck_pmem conversions as
  760. appropriate.
  761. (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
  762. conversions.
  763. * class.c (convert_to_base): Handle both pointers and objects.
  764. Add nonnull parameter.
  765. (build_vfield_ref): Adjust call to convert_to_base.
  766. * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
  767. (convert_force): Likewise.
  768. * typeck.c (build_unary_op): Likewise.
  769. (convert_ptrmem): New function.
  770. (build_static_cast_1): Use it.
  771. (build_reinterpret_cast): Allow conversions to vector types.
  772. (get_delta_difference): Add c_cast_p parameter.
  773. (build_ptrmemfunc): Likewise. Adjust calls to
  774. get_delta_difference.
  775. 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
  776. PR c++/13560
  777. * error.c (cp_error_at): Output the context as it might be
  778. different file as the other location.
  779. 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
  780. * typeck.c: Fix a comment typo.
  781. 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  782. PR c++/13495
  783. * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
  784. * cp-tree.h (make_unbound_class_template): Adjust prototype.
  785. * parser.c (cp_parser_lookup_name): Adjust call to
  786. make_unbound_class_template.
  787. (cp_parser_single_declaration): Handle member class of class
  788. template as template friend parsing correctly.
  789. * friend.c (is_friend): Call is_specialization_of_friend for
  790. template friend class.
  791. (make_friend_class): Handle member class of class template as
  792. template friend.
  793. * pt.c (is_specialization_of_friend): Likewise.
  794. (instantiate_class_template): Likewise.
  795. (tsubst): Adjust call to make_unbound_class_template.
  796. 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
  797. * typeck.c (composite_pointer_type): Add comment about DR 195
  798. (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
  799. Allow function pointer conversions that DR195 suggests.
  800. (build_reinterpret_cast, build_c_cast): Update
  801. build_reinterpret_cast_1 calls.
  802. 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
  803. * call.c, typeck.c: Fix comment typos.
  804. 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
  805. * parser.c (cp_token_position): New typedef. Define VEC thereof.
  806. (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
  807. next_token and last_token cp_token_position. Make saved_tokens a
  808. VEC(cp_token_position).
  809. (eof_token): New static variable.
  810. (CP_SAVED_TOKENS_SIZE): Rename to ...
  811. (CP_SAVED_TOKEN_STACK): ... here.
  812. (cp_lexer_new_main): Adjust main lexer creation and buffer
  813. filling.
  814. (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
  815. to the parent buffer. Do not append eof token.
  816. (cp_lexer_destroy): Only free buffer if non-NULL. Free token
  817. stack.
  818. (cp_lexer_next_token, cp_lexer_prev_token): Remove.
  819. (cp_lexer_token_position, cp_lexer_token_at): New.
  820. (cp_lexer_saving_tokens): Adjust. Make inline.
  821. (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
  822. (cp_lexer_peek_token_emit_debug_info): Fold into ...
  823. (cp_lexer_peek_token): ... here.
  824. (cp_lexer_peek_nth_token): Don't peek past EOF.
  825. (cp_lexer_consume_token): Set next_token to eof_token, if reaching
  826. EOF.
  827. (cp_lexer_purge_token): Adjust eof setting.
  828. (cp_lexer_purge_tokens_after): Likewise.
  829. (cp_lexer_save_tokens): Push next_token directly.
  830. (cp_lexer_commit_tokens): Adjust.
  831. (cp_lexer_rollback_tokens): Pop next_token directly.
  832. (cp_parser_check_for_invalid_template_id): Adjust token purging.
  833. (cp_parser_translation_unit): Do not consume the EOF.
  834. (cp_parser_nested_name_specifier_opt): Adjust token purging.
  835. (cp_parser_template_id, cp_parser_template_name): Likewise.
  836. 2004-10-19 Mark Mitchell <mark@codesourcery.com>
  837. PR c++/14035
  838. * call.c (struct conversion): Add base_p.
  839. (convert_like): Add c_cast_p argument.
  840. (convert_like_with_conversion): Likewise.
  841. (build_conv): Clear base_p.
  842. (standard_conversion): Set it, for derived-to-base conversions.
  843. (convert_like_real): Add c_cast_p parameter. Handle pointer
  844. conversions directly rather than relying on ocp_convert.
  845. (perform_direct_initialization_if_possible): Add c_cast_p
  846. parameter.
  847. * cp-tree.h (perform_direct_initialization_if_possible): Change
  848. prototype.
  849. (convert_member_func_to_ptr): New function.
  850. * typeck.c (check_for_casting_away_constness): Add diag_fn
  851. parameter.
  852. (build_static_cast_1): New function, split out from ...
  853. (build_static_cast): ... here. Use build_static_cast_1.
  854. (build_reinterpret_cast_1): New function, split out from ...
  855. (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
  856. (build_const_cast_1): New function, split out from ...
  857. (build_const_cast): ... here. Use build_const_cast_1.
  858. (build_c_cast): Rewrite to use build_const_cast_1,
  859. build_static_cast_1, and build_reinterpret_cast_1.
  860. (convert_member_func_to_ptr): New function.
  861. 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
  862. PR c++/18047
  863. * parser.c (enum cp_parser_prec): Give relational expressions
  864. a higher precedence than equality expressions.
  865. 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
  866. * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
  867. (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
  868. (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
  869. (enum base_access): Reorganize.
  870. (accessible_base_p, accessible_p): Add consider_local_p parameter.
  871. * call.c (standard_conversion): Update comment about
  872. DERIVED_FROM_P.
  873. (enforce_access): Adjust accessible_p call.
  874. (build_over_call): Adjust accessible_base_p call.
  875. * class.c (convert_to_base): Adjust lookup_base call.
  876. (build_vtbl_ref_1): Likewise.
  877. (warn_about_ambiguous_bases): Likewise. Add early exit.
  878. * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
  879. * search.c (accessible_base_p): Add consider_local_p parameter.
  880. (lookup_base): Pass consider_local_p to accessible_base_p call.
  881. (friend_accessible_p): Check whether scope is a class member.
  882. Remove unnecessary class template check.
  883. (accessible_p): Add consider_local_p parameter. Use it.
  884. (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
  885. * tree.c (maybe_dummy_object): Likewise.
  886. * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
  887. (build_class_member_access_expr): Adjust lookup_base call.
  888. * typeck2.c (binfo_or_else): Likewise.
  889. * rtti.c (build_dynamic_cast_1): Access can consider friendship
  890. and current scope.
  891. 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  892. PR c++/17743
  893. * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
  894. 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  895. PR c++/10479
  896. * parser.c (cp_parser_parenthesized_expression_list): Fold
  897. non-dependent expressions in attribute lists.
  898. 2004-10-15 Mark Mitchell <mark@codesourcery.com>
  899. PR c++/17042
  900. * decl.c (declare_global_var): Use the return value from pushdecl.
  901. PR c++/14667
  902. * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
  903. type names if we have already found a valid type.
  904. (cp_parser_member_declaration): Likewise.
  905. PR c++/17916
  906. * parser.c (cp_parser_member_specification_opt): Handle
  907. CPP_PRAGMA.
  908. 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
  909. * dump.c, g++spec.c, repo.c: Update copyright.
  910. 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
  911. * decl.c: Fix a comment typo.
  912. 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
  913. PR c++/16301
  914. * name-lookup.c (parse_using_directive): If we have a
  915. error_mark_node, do not set the decl namespace associations
  916. on it.
  917. 2004-10-14 Mark Mitchell <mark@codesourcery.com>
  918. PR c++/17976
  919. * decl.c (cp_finish_decl): Do not call expand_static_init more
  920. than once for a single variable.
  921. 2004-10-14 Matt Austern <austern@apple.com>
  922. * Make-lang.in (pt.o): depends on pointer-set.h
  923. * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
  924. * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
  925. (for_each_template_parm): Convert from htab_t to pointer_set_t.
  926. * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
  927. 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
  928. PR c++/17661
  929. * semantics.c (finish_for_expr): Convert expression to void
  930. so that we don't create temporaries for a?b:c.
  931. 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
  932. * search.c: Fix a comment typo.
  933. 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
  934. * class.c (dfs_modify_vtables): Simplify condition. Return
  935. dfs_skip_bases as appropriate.
  936. (modify_all_vtables): Walk in pre-order.
  937. * search.c (dfs_walk_all, dfs_walk_once_r,
  938. dfs_walk_once_accessible_r): Assert post order function never
  939. returns dfs_skip_bases.
  940. * search.c (struct lookup_base_data_s): New.
  941. (lookup_base_r): Replace with ...
  942. (dfs_lookup_base): ... this.
  943. (lookup_base): Use dfs_walk_all.
  944. 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
  945. * search.c: Fix comment typos.
  946. 2004-10-11 Mark Mitchell <mark@codesourcery.com>
  947. PR c++/15786
  948. * parser.c (cp_parser_declarator): Add member_p parameter.
  949. (cp_parser_condition): Adjust calls to cp_parser_declarator.
  950. (cp_parser_explicit_instantiation): Likewise.
  951. (cp_parser_init_declarator): Likewise.
  952. (cp_parser_direct_declarator): Add member_p parameter. Do not
  953. parse tentatively when parsing the parameters to a member.
  954. (cp_parser_type_id): Adjust calls to cp_parser_declarator.
  955. (cp_parser_parameter_declaration): Likewise.
  956. (cp_parser_member_declaration): Likewise.
  957. (cp_parser_exception_declaration): Likewise.
  958. PR c++/17936
  959. * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
  960. * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
  961. for members of partial or explicit specializations.
  962. PR c++/17929
  963. * decl2.c (finish_anon_union): Robustify.
  964. 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
  965. * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
  966. (dcast_base_hint): ... here.
  967. * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
  968. * search.c (struct dcast_data_s): New.
  969. (dynamic_cast_base_recurse): Remove. Replace with ...
  970. (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
  971. (get_dynamic_cast_base_type): Rename to ...
  972. (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
  973. (accessible_r): Remove.
  974. (dfs_accessible_post): New, broken out of accessible_r.
  975. (accessible_p): Use dfs_walk_once_accessible.
  976. (dfs_walk_once_accessible_r): New. From accessible_r.
  977. (dfs_walk_once_accessible): New. From acessible_p.
  978. * cp-tree.h (SAME_BINFO_TYPE_P): New.
  979. * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
  980. binfo types.
  981. (convert_to_base_statically, determine_primary_bases,
  982. update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
  983. dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
  984. accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
  985. build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
  986. * init.c (expand_member_init): Likewise.
  987. * search.c (lookup_base_r, dynamic_cast_base_recurse,
  988. binfo_via_virtual, copied_binfo, binfo_for_vbase,
  989. original_binfo): Likewise.
  990. * tree.c (copy_binfo): Likewise.
  991. 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
  992. * semantics.c: Fix comment typos.
  993. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
  994. PR c++/17554
  995. part of c++/17657
  996. middle-end/17703
  997. * semantics.c (maybe_cleanup_point_expr): Call
  998. fold_build_cleanup_point_expr.
  999. (maybe_cleanup_point_expr_void): New function.
  1000. (add_decl_expr): Call maybe_cleanup_point_expr_void.
  1001. (finish_expr_stmt): Likewise.
  1002. (finish_return_stmt): Likewise.
  1003. (finish_for_expr): Likewise.
  1004. (finish_asm_stmt): Likewise.
  1005. * typeck.c (condition_conversion): Call
  1006. fold_build_cleanup_point_expr.
  1007. 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
  1008. PR c++/17907
  1009. * semantics.c (add_decl_expr): If the decl has a size which
  1010. has side effects then the decl expression needs a cleanup point.
  1011. 2004-10-10 Mark Mitchell <mark@codesourcery.com>
  1012. PR c++/17393
  1013. * decl.c (grokdeclarator): Robustify error-recovery on invalid
  1014. declarations.
  1015. 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1016. Convert diagnostics to use quoting flag q 7/n
  1017. * typeck.c (composite_pointer_type_r, composite_pointer_type,
  1018. cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
  1019. string_conv_p, build_class_member_access_expr,
  1020. build_class_member_access_expr, lookup_destructor,
  1021. finish_class_member_access_expr, build_indirect_ref,
  1022. get_member_function_from_ptrfunc, build_function_call,
  1023. convert_arguments, build_binary_op, pointer_diff, build_unary_op,
  1024. check_for_casting_away_constness, build_static_cast,
  1025. build_reinterpret_cast, build_const_cast, build_c_cast,
  1026. build_modify_expr, get_delta_difference, build_ptrmemfunc,
  1027. dubious_conversion_warnings, convert_for_assignment,
  1028. convert_for_initialization,
  1029. maybe_warn_about_returning_address_of_local, check_return_expr):
  1030. Use quoting marks.
  1031. * typeck2.c (error_not_base_type, readonly_error,
  1032. abstract_virtuals_error, cxx_incomplete_type_diagnostic,
  1033. store_init_value, digest_init, build_x_arrow,
  1034. build_m_component_ref, require_complete_eh_spec_types): Likewise.
  1035. * tree.c (cp_build_qualified_type_real,
  1036. handle_java_interface_attribute, handle_init_priority_attribute):
  1037. Likewise.
  1038. * semantics.c (finish_asm_stmt, finish_non_static_data_member,
  1039. finish_pseudo_destructor_expr,
  1040. check_template_template_default_arg, begin_class_definition,
  1041. finish_base_specifier, qualified_name_lookup_error,
  1042. finish_id_expression, finish_typeof): Likewise.
  1043. * search.c (lookup_base, check_final_overrider,
  1044. look_for_overrides_r): Likewise.
  1045. * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
  1046. 2004-10-09 Mark Mitchell <mark@codesourcery.com>
  1047. PR c++/17867
  1048. * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
  1049. constructor.
  1050. PR c++/17670
  1051. * init.c (build_new): Correct comments.
  1052. * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
  1053. the non-array case.
  1054. PR c++/17821
  1055. * parser.c (cp_parser_postfix_dot_deref_expression): If the
  1056. pseduo-destructor-name production does not work, fall back to the
  1057. ordinary production.
  1058. PR c++/17826
  1059. * tree.c (cp_tree_equal): Handle a BASELINK.
  1060. PR c++/17524
  1061. * cp-tree.h (check_var_type): New function.
  1062. * decl.c (check_var_type): New function, split out from ...
  1063. (grokdeclarator): ... here.
  1064. * pt.c (tsubst_decl): Use check_var_type.
  1065. PR c++/17685
  1066. * decl.c (grokdeclarator): Disallow declarations of operators as
  1067. non-functions.
  1068. 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  1069. PR c++/17868
  1070. * error.c (dump_expr): Add missing case for RDIV_EXPR.
  1071. 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
  1072. * pt.c, search.c: Fix comment typos.
  1073. 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
  1074. * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
  1075. unmarkedp): Remove.
  1076. (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
  1077. * class.c (struct find_final_overrider_data): Remove most_derived,
  1078. vpath_list and vpath fields. Add path field.
  1079. (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
  1080. (dfs_find_final_overrider): Rename to ...
  1081. (dfs_find_final_overrider_pre): ... here. Adjust.
  1082. (dfs_find_final_overrider_post): Adjust.
  1083. (dfs_find_final_overrider_q): Fold into
  1084. dfs_find_final_overrider_pre.
  1085. (find_final_overrider): Adjust dfs searching.
  1086. (dfs_modify_vtables): Don't mark binfo here.
  1087. (modify_all_vtables): Use dfs_walk_once.
  1088. (build_vtt_inits): Likwise. Use dfs_walk_all.
  1089. (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
  1090. Return dfs_skip_bases as appropriate.
  1091. (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
  1092. * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
  1093. appropriate. Don't mark binfo here.
  1094. (initialize_vtbl_ptrs): Use dfs_walk_once.
  1095. * search.c (struct vbase_info): Remove unused struct.
  1096. (access_in_type): Use dfs_walk_once.
  1097. (dfs_access_in_type): Don't mark binfo here.
  1098. (dfs_accessible_queue_p, dfs_accessible_p) Remove.
  1099. Fold into ...
  1100. (accessible_r): ... here. New. Specialize dfs_walk_once.
  1101. (accessible_p): Use accessible_r.
  1102. (lookup_field_queue_p): Remove. Fold into ...
  1103. (lookup_field_r): ... here. Adjust.
  1104. (lookup_member): Use dfs_walk_all.
  1105. (dfs_walk_real, dfs_walk): Replace with ...
  1106. (dfs_walk_all, dfs_walk_once): ... these.
  1107. (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
  1108. (dfs_unmark, unmarkedp, markedp): Remove.
  1109. (dfs_get_pure_virtuals): Don't mark binfo here.
  1110. (get_pure_virtuals): Use dfs_walk_once.
  1111. (dfs_debug_unmarked_p): Remove. Fold into ...
  1112. (dfs_debug_mark): ... here.
  1113. (note_debug_info_needed): Use dfs_walk_all.
  1114. 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
  1115. * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
  1116. CLEANUP_POINT_EXPR to get the asm expression.
  1117. 2004-10-07 Mark Mitchell <mark@codesourcery.com>
  1118. * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
  1119. (DECL_MEMBER_TEMPLATE_P): New macro.
  1120. (is_member_template): Remove.
  1121. (class_method_index_for_fn): New function.
  1122. * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
  1123. * class.c (finish_struct_methods): Remove out-of-date comment.
  1124. * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
  1125. * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
  1126. class_method_index_for_fn.
  1127. * pt.c (is_member_template): Remove.
  1128. (is_member_template_class): Likewise.
  1129. (optimize_specialization_lookup_p): New function.
  1130. (retrieve_specialization): Optimize lookups for members that are
  1131. not member templates.
  1132. (register_specialization): Adjust accordingly.
  1133. (build_template_decl): Add member_template_p parameter. Set
  1134. DECL_MEMBER_TEMPLATE_P.
  1135. (process_partial_specialization): Adjust call to
  1136. retrieve_specialization.
  1137. (push_template_decl_real): Determine whether the template is a
  1138. member template.
  1139. (lookup_template_class): Use retrieve_specialization.
  1140. (tsubst_decl): Adjust call to retrieve_specialization.
  1141. (tsubst_exception_specification): New function.
  1142. (tsubst): Use it.
  1143. (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
  1144. (instantiate_template): Adjust call to retrieve_specialization.
  1145. (regenerate_decl_from_template): Do not actually generate a new
  1146. DECL.
  1147. (instantiate_decl): Adjust call to retrieve_specialization.
  1148. (class_method_index_for_fn): New method.
  1149. 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
  1150. * parser.c (cp_parser_asm_definition): Look passed the
  1151. CLEANUP_POINT_EXPR to get the asm expression.
  1152. 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
  1153. PR c++/17368
  1154. * semantics.c (finish_asm_stmt): Asm expressions need cleanup
  1155. also.
  1156. 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1157. Convert diagnostics to use quoting flag q 6/n
  1158. * pt.c (finish_member_template_decl, check_specialization_scope,
  1159. maybe_process_partial_specialization, determine_specialization,
  1160. check_explicit_specialization, maybe_check_template_type,
  1161. process_partial_specialization, check_default_tmpl_args,
  1162. push_template_decl_real, redeclare_class_template,
  1163. convert_nontype_argument, coerce_template_parms,
  1164. lookup_template_class, push_tinst_level,
  1165. instantiate_class_template, tsubst_arg_types,
  1166. tsubst_function_type, tsubst, tsubst_qualified_id,
  1167. tsubst_copy_and_build, check_instantiated_args,
  1168. do_decl_instantiation, do_type_instantiation,
  1169. invalid_nontype_parm_type_p, check_specialization_namespace,
  1170. convert_template_argument, determine_specialization,
  1171. check_template_shadow, tsubst_decl
  1172. instantiate_pending_templates): Use quoting marks.
  1173. 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
  1174. PR c++/17829
  1175. * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
  1176. unqualified lookup finds a member function.
  1177. 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1178. Convert diagnostics to use quoting flag q 5/n
  1179. * parser.c (cp_parser_name_lookup_error,
  1180. cp_parser_diagnose_invalid_type_name,
  1181. cp_parser_primary_expression, cp_parser_unqualified_id,
  1182. cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
  1183. cp_parser_jump_statement, cp_parser_simple_declaration,
  1184. cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
  1185. cp_parser_type_parameter, cp_parser_template_id,
  1186. cp_parser_template_name, cp_parser_direct_declarator,
  1187. cp_parser_parameter_declaration_list, cp_parser_class_head,
  1188. cp_parser_base_specifier, cp_parser_lookup_name,
  1189. cp_parser_late_parsing_default_args,
  1190. cp_parser_optional_template_keyword
  1191. cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
  1192. cp_parser_check_access_in_redeclaration): Use quoting marks.
  1193. * name-lookup.c (supplement_binding, pushdecl,
  1194. check_for_out_of_scope_variable, validate_nonmember_using_decl,
  1195. do_nonmember_using_decl, lookup_tag, set_decl_namespace,
  1196. push_namespace, do_namespace_alias, do_using_directive,
  1197. ambiguous_decl, lookup_namespace_name, add_function): Likewise.
  1198. * method.c (use_thunk): Likewise.
  1199. * lex.c (unqualified_name_lookup_error,
  1200. unqualified_fn_lookup_error): Likewise.
  1201. 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1202. Convert diagnostics to use quoting flag q 4/n
  1203. * except.c (decl_is_java_type, build_throw,
  1204. is_admissible_throw_operand, check_handlers_1, check_handlers):
  1205. Use quoting formats.
  1206. * friend.c (add_friend, make_friend_class, do_friend): Likewise.
  1207. * init.c (sort_mem_initializers, emit_mem_initializers,
  1208. member_init_ok_or_else, expand_member_init, is_aggr_type,
  1209. build_offset_ref, build_java_class_ref): Likewise.
  1210. 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1211. Convert diagnostics to use quoting flag q 3/n
  1212. * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
  1213. redeclaration_error_message, lookup_label, check_goto,
  1214. make_typename_type, make_unbound_class_template,
  1215. fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
  1216. grok_reference_init, layout_var_decl, maybe_commonize_var,
  1217. check_for_uninitialized_const_var, reshape_init_array,
  1218. reshape_init, check_initializer, cp_finish_decl,
  1219. member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
  1220. check_static_variable_definition, compute_array_index_type,
  1221. create_array_type_for_decl, check_special_function_return_type,
  1222. grokdeclarator, check_default_argument, grokparms,
  1223. grok_ctor_properties, grok_op_properties,
  1224. check_elaborated_type_specifier, xref_tag, finish_enum,
  1225. build_enumerator, check_function_type, start_preparsed_function,
  1226. store_parm_decls): Use quoting formats.
  1227. * decl2.c (grok_array_decl, delete_sanity, check_member_template,
  1228. check_java_method, check_classfn, finish_static_data_member_decl,
  1229. grokfield, grokbitfield, grok_function_init,
  1230. build_anon_union_vars, coerce_new_type, coerce_delete_type,
  1231. check_default_args): Likewise.
  1232. * parser.c (cp_parser_decl_specifier_seq): Likewise.
  1233. 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1234. Convert diagnostics to use quoting flag q 2/n
  1235. * class.c (build_base_path, add_method, alter_access,
  1236. handle_using_decl, check_bases,
  1237. maybe_warn_about_overly_private_class, find_final_overrider,
  1238. warn_hidden, finish_struct_anon, add_implicitly_declared_members,
  1239. check_bitfield_decl, check_field_decls, layout_empty_base,
  1240. build_base_field, check_methods, layout_virtual_bases,
  1241. warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
  1242. resolve_address_of_overloaded_function, instantiate_type,
  1243. note_name_declared_in_class): Use format flag "q" for quoting.
  1244. 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1245. Convert diagnostics to use quoting flag q 1/n
  1246. * error.c (locate_error): Ignore quoting flag q.
  1247. * call.c (build_user_type_conversion_1, build_operator_new_call,
  1248. build_object_call, op_error, build_conditional_expr,
  1249. build_new_op, build_op_delete_call, enforce_access,
  1250. convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
  1251. convert_default_arg, build_over_call, build_new_method_call,
  1252. joust, perform_implicit_conversion, initialize_reference): Use the
  1253. quoting flag q.
  1254. 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
  1255. PR c++/17797
  1256. * typeck.c (build_reinterpret_cast): Return if the inner type
  1257. is error_mark_node.
  1258. 2004-10-01 Jan Hubicka <jh@suse.cz>
  1259. * semantics.c (expand_body): Update call of tree_rest_of_compilation.
  1260. 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
  1261. * cp-tree.h (struct lang_decl): Shrink by reordering fields and
  1262. turning operator_code and fixed_offset into bitfields.
  1263. 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
  1264. * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
  1265. 2004-09-29 Jason Merrill <jason@redhat.com>
  1266. PR tree-optimization/17697
  1267. * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
  1268. 2004-09-28 Jason Merrill <jason@redhat.com>
  1269. PR middle-end/17525
  1270. * class.c (build_base_field): Set TYPE_MODE.
  1271. 2004-09-28 Roger Sayle <roger@eyesopen.com>
  1272. PR driver/17537
  1273. * g++spec.c (lang_specific_driver): Unrecognized libraries, other
  1274. than -lc and -lm, may require linking against libstc++.
  1275. 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
  1276. * tree.c: Fix a comment typo.
  1277. 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
  1278. * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
  1279. (struct secondary_vptr_vtt_init_data_s): New.
  1280. (build_vtt_inits): Adjust dfs_walkers.
  1281. (dfs_build_secondary_vptr_vtt_inits): Caller data is a
  1282. secondary_vptr_vtt_init_data_s structure. Adjust.
  1283. (dfs_ctor_vtable_bases_queue_p): Remove.
  1284. (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
  1285. * pt.c (struct get_template_base_data_s): Remove.
  1286. (get_template_base_r): Fold into get_template_base.
  1287. (get_template_base): Walk base binfos directly in inheritance
  1288. graph order.
  1289. 2004-09-27 Mark Mitchell <mark@codesourcery.com>
  1290. PR c++/17642
  1291. * cp-tree.h (fold_if_not_in_template): New function.
  1292. * call.c (build_conditional_expr): Use fold_if_not_in_template.
  1293. (build_cxx_call): Likewise.
  1294. * cvt.c (convert_to_complex): Likewise.
  1295. (ocp_convert): Likewise.
  1296. (convert): Likewise.
  1297. (convert_force): Likewise.
  1298. * decl.c (compute_array_index_type): Clear
  1299. processing_template_decl while folding array bounds.
  1300. * pt.c (convert_nontype_argument): Clear
  1301. processing_template_decl while processing non-type argument
  1302. initialization.
  1303. * tree.c (fold_if_not_in_template): New function.
  1304. * typeck.c (build_class_member_access_expr): Use
  1305. fold_if_not_in_template.
  1306. (build_array_ref): Likewise.
  1307. (build_binary_op): Likewise. Do not try to optimize computations
  1308. when processing templates.
  1309. (cp_pointer_int_sum): Use fold_if_not_in_template.
  1310. (pointer_diff): Likewise.
  1311. (build_unary_op): Likewise.
  1312. (build_reinterpret_cast): Likewise.
  1313. (get_delta_difference): Likewise.
  1314. (expand_ptrmemfunc_cst): Likewise.
  1315. (dubious_conversion_warnings): Likewise.
  1316. 2004-09-27 Matt Austern <austern@apple.com>
  1317. * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
  1318. (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
  1319. tokens that come from headers that are implicitly extern "C".
  1320. (struct cp_parser): new one-bit field, implicit_extern_c.
  1321. (cp_parser_new): Set parser's implicit_extern_c to false.
  1322. (cp_parser_translation_unit): Pop lang context if we were in a
  1323. header that was implicitly extern "C".
  1324. (cp_parser_declaration_seq_opt): Push/pop lang context as
  1325. required by the token's and parser's implicit_extern_c.
  1326. 2004-09-27 Mark Mitchell <mark@codesourcery.com>
  1327. PR c++/17585
  1328. * cp-tree.h (shared_member_p): Declare.
  1329. * search.c (shared_member_p): Give it external linkage.
  1330. * semantics.c (finish_qualified_id_expr): Use it.
  1331. (finish_id_expression): Likewise.
  1332. PR c++/17585
  1333. * semantics.c (finish_id_expression): Do not add "this->" to
  1334. static member functions.
  1335. 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
  1336. PR c++/17681
  1337. * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
  1338. * class.c (struct count_depth_data): Remove.
  1339. (dfs_depth_post, dfs_depth_q): Remove.
  1340. (find_final_overrider): Use number of vbase classes as depth
  1341. bound.
  1342. * cp-tree.h (types_overlap_p): Remove.
  1343. * search.c (struct overlap_info): Remove.
  1344. (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
  1345. * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
  1346. (get_template_base_recursive): Remove. Replace with ...
  1347. (get_template_base_r): ... this.
  1348. (struct get_template_base_data_s): New.
  1349. (get_template_base): Use get_template_base_r via dfs_walk. Always
  1350. return NULL on failure.
  1351. (unify): Remove error_mark_node check from get_template_base result.
  1352. 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
  1353. * parser.c (cp_parser_expression_stack): Clarify why it is
  1354. an array of NUM_PREC_VALUES elements.
  1355. (cp_parser_binary_expression): Clarify why we do not need to
  1356. handle stack overflow.
  1357. 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
  1358. PR c++/16889
  1359. * search.c (lookup_field_queue_p): Correct check for hidden base.
  1360. * search.c (bfs_walk): Remove.
  1361. (lookup_member): Use dfs_walk_real.
  1362. (dfs_walk_real): Move and adjust documentation from bfs_walk.
  1363. 2004-09-23 Zack Weinberg <zack@codesourcery.com>
  1364. * decl.c (grokfndecl): If ::main is found not to return int,
  1365. correct it after issuing a diagnostic.
  1366. (grokdeclarator): If the incoming type was error_mark_node, do
  1367. not complain about declaring something with no type.
  1368. (start_function): Change check for ::main not returning int to
  1369. an assertion, as grokfndecl now catches this when the user did it.
  1370. * init.c (perform_member_init, sort_mem_initializers)
  1371. (emit_mem_initializers): Make most diagnostics be issued on
  1372. the line of current_function_decl, not whatever the current
  1373. input line is.
  1374. * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
  1375. definition and declaration with #ifdef ENABLE_CHECKING.
  1376. Avoid unnecessary use of fprintf.
  1377. (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
  1378. definitions to avoid warnings.
  1379. (cp_lexer_new_main): Add assertion that first token is not a
  1380. padding token.
  1381. (cp_lexer_new_from_token_array): Fold into ...
  1382. (cp_lexer_new_from_tokens): ... here. Add assertion that
  1383. first token is not a padding token.
  1384. (cp_lexer_set_source_position_from_token): Move nearer to callers.
  1385. Remove unused lexer argument.
  1386. (cp_lexer_peek_token): Just print debugging report (if enabled)
  1387. and return lexer->next_token.
  1388. (cp_lexer_skip_purged_tokens): Delete.
  1389. (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
  1390. inline, simplify bodies.
  1391. (cp_lexer_peek_nth_token): Add debugging report a la
  1392. cp_lexer_peek_token.
  1393. (cp_lexer_consume_token): Correct commentary. Advance over
  1394. purged tokens here. Set current source position here, from
  1395. token to be returned. Avoid unnecessary use of fprintf.
  1396. (cp_lexer_purge_token): Advance next_token pointer over this and
  1397. subsequent purged tokens.
  1398. (cp_parser_error): Adjust source position to that of the
  1399. peeked token.
  1400. (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
  1401. (cp_parser_string_literal): Remove some excessive cleverness.
  1402. (cp_parser_enum_specifier): Call start_enum before consuming
  1403. the opening brace.
  1404. (cp_parser_member_declaration): Make the "extra semicolon"
  1405. diagnostic consistently-worded with the other place this is
  1406. diagnosed. Explicitly set the diagnostic location to the
  1407. location of the offending semicolon.
  1408. (cp_parser_enclosed_template_argument_list): Use %</%> quoting
  1409. in diagnostics. Do not use cp_parser_require. Set location
  1410. of diagnostics about improper use of '>>' to location of
  1411. offending token.
  1412. (cp_parser_late_parsing_for_member):
  1413. Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
  1414. (cp_parser_late_parsing_default_args): Likewise. Manually
  1415. move some logic outside the loop.
  1416. 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
  1417. PR c++/17618
  1418. * cvt.c (cp_convert_to_pointer): Return early when the type is
  1419. an error_mark_node.
  1420. 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
  1421. PR c++/13989
  1422. PR c++/9844
  1423. * decl.c (grokfndecl): Add new argument "attrlist", use it
  1424. to call cplus_decl_attributes.
  1425. (start_function): Remove call to cplus_decl_attributes.
  1426. * cvt.c (ocp_convert): Add support to use type conversion
  1427. function to vector type.
  1428. * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
  1429. to the parsed type.
  1430. 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
  1431. PR c++/17596
  1432. * parser.c (cp_parser_token_tree_map_node,
  1433. cp_parser_pm_expression, cp_parser_additive_expression,
  1434. cp_parser_multiplicative_expression, cp_parser_shift_expression,
  1435. cp_parser_relational_expression, cp_parser_equality_expression,
  1436. cp_parser_and_expression, cp_parser_exclusive_or_expression,
  1437. cp_parser_inclusive_or_expression,
  1438. cp_parser_logical_and_expression,
  1439. cp_parser_logical_or_expression): Removed.
  1440. (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
  1441. binops, binops_by_token): New.
  1442. (cp_parser_assignment_expression): Use cp_parser_binary_expression.
  1443. (cp_parser_new): Initialize binops_by_token.
  1444. (cp_parser_binary_expression): Rewritten.
  1445. (N_CP_TTYPES): New.
  1446. 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
  1447. * parser.c: Fix a comment typo.
  1448. 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
  1449. PR c++/17620
  1450. * decl.c (xref_basetypes): Look through typedefs before checking
  1451. for duplicate base.
  1452. 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
  1453. * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
  1454. * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
  1455. * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
  1456. (init_rtti_processing): Initialize it to something realistic.
  1457. (get_tinfo_decl): Adjust pushing the new decl.
  1458. * cp-tree.h (struct lang_type_class): Remove marked flags, add
  1459. diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
  1460. (TYPE_MARKED_P): New.
  1461. (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
  1462. (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
  1463. CLEAR_CLASSTYPE_MARKED_N): Remove.
  1464. (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
  1465. CLEAR_CLASSTYPE_MARKED_*): Remove.
  1466. * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
  1467. shaped and repeated base properties.
  1468. * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
  1469. * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
  1470. class_hint_flags): Remove.
  1471. (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
  1472. CLASSTYPE_DIAMOND_SHAPED_P.
  1473. 2004-09-21 Ziemowit Laski <zlaski@apple.com>
  1474. * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
  1475. cp-objcp-common.h.
  1476. (objcp_tsubst_copy_and_build): Reformat function signature.
  1477. * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
  1478. (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
  1479. 2004-09-21 Zack Weinberg <zack@codesourcery.com>
  1480. * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
  1481. Don't handle CPP_PRAGMA tokens specially.
  1482. (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
  1483. purge the token; do clear token->value after processing. Add
  1484. assertion at beginning that token->value is nonzero.
  1485. (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
  1486. CPP_PRAGMA as a full statement or declaration in its own right.
  1487. 2004-09-21 Matt Austern <austern@apple.com>
  1488. PR c++/15049
  1489. * decl.c (grokvardecl): Accept declarations of global variables
  1490. using anonymous types.
  1491. 2004-09-21 Roger Sayle <roger@eyesopen.com>
  1492. PR c++/7503
  1493. * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
  1494. if either operand has side-effects.
  1495. * typeck.c (rationalize_conditional_expr): Assert that neither
  1496. operand of MIN_EXPR or MAX_EXPR has side-effects.
  1497. (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
  1498. Check that the "lhs" is a valid lvalue, i.e. that neither operand
  1499. of a MIN_EXPR or MAX_EXPR has a side-effect.
  1500. 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
  1501. * cp-tree.h (struct lang_type_header): Remove
  1502. uses_multiple_inheritance field.
  1503. (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
  1504. (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
  1505. (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
  1506. (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
  1507. (TYPE_CONTAINS_VPTR_P): Likewise.
  1508. * call.c (add_template_candidate_real): Use
  1509. CLASSTYPE_VBASECLASSES.
  1510. (build_special_member_call): Likewise.
  1511. * class.c (finish_struct_bits): Remove
  1512. TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
  1513. bookkeeping.
  1514. (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
  1515. (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
  1516. bookkeeping.
  1517. (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
  1518. (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
  1519. Likewise.
  1520. * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
  1521. TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
  1522. bookkeeping.
  1523. (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
  1524. * decl2.c (maybe_retrofit_in_chrg): Likewise.
  1525. * init.c (expand_member, push_base_cleanups): Likewise.
  1526. * pt.c (instantiate_class_template): Remove
  1527. TYPE_USES_MULTIPLE_INHERITANCE,
  1528. TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
  1529. bookkeeping.
  1530. * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
  1531. check.
  1532. * typeck2.c (process_init_constructor): Replace some sorrys with
  1533. asserts.
  1534. 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
  1535. * decl.c (reshape_init_array): Initialize max_index_cst to fix
  1536. bootstrap failure.
  1537. 2004-09-20 Mark Mitchell <mark@codesourcery.com>
  1538. PR c++/17530
  1539. * pt.c (tsubst): Fix parentheses to accomodate emacs.
  1540. (tsubst_baselink): If we get a single function, mark it as used.
  1541. 2004-09-20 Matt Austern <austern@apple.com>
  1542. Zack Weinberg <zack@codesourcery.com>
  1543. * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
  1544. Apply lbasename to input_filename before passing to get_fileinfo.
  1545. * semantics.c (begin_class_definition): Likewise.
  1546. * lex.c (handle_pragma_interface): Apply get_fileinfo to the
  1547. correct filename. Rename variables to be less confusing.
  1548. (handle_pragma_implementation): Likewise. Disable "appears
  1549. after file is included" diagnostic.
  1550. * parser.c (struct cp_token): Add in_system_header fiag.
  1551. (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
  1552. (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
  1553. (CPP_NONE, cp_lexer_read_token): Delete.
  1554. (struct cp_lexer): Remove first_token, string_tokens,
  1555. main_lexer_p fields. Clarify comments.
  1556. (struct cp_token_cache): Now just a pair of pointers.
  1557. (CP_LEXER_BUFFER_SIZE): New #define.
  1558. (CPP_PURGED): New fake token type.
  1559. (cp_lexer_new_from_token_array, cp_lexer_destroy)
  1560. (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
  1561. (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
  1562. New functions.
  1563. (cp_lexer_new_from_tokens): Now a simple wrapper around
  1564. cp_lexer_new_from_token_array.
  1565. (cp_lexer_set_source_position_from_token): Also update
  1566. in_system_header.
  1567. (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
  1568. Don't wrap round.
  1569. (cp_lexer_token_difference): Dont handle wrapping round.
  1570. (cp_lexer_new_main): Enable pragma deferral and raw strings,
  1571. read the entire translation unit through c_lex_with_flags into
  1572. this lexer's buffer, then turn raw strings back off again.
  1573. (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
  1574. (cp_lexer_get_preprocessor_token): No need to handle not being
  1575. the main lexer. Set token->in_system_header too.
  1576. (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
  1577. to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
  1578. (cp_lexer_peek_nth_token): Likewise.
  1579. (cp_lexer_purge_token): Mark the token PURGED, don't shift all
  1580. the other tokens down.
  1581. (cp_lexer_purge_tokens_after): Likewise.
  1582. (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
  1583. about there being no tokens.
  1584. (cp_lexer_print_token): Revise to give useful information on
  1585. all tokens.
  1586. (struct cp_parser): Add field translate_strings_p.
  1587. (cp_parser_new): Initialize it.
  1588. (cp_parser_translation_unit): Destroy the lexer when done.
  1589. (cp_parser_parameter_declaration): Restructure saving of
  1590. default arguments.
  1591. (cp_parser_save_member_function_body): Likewise.
  1592. (cp_parser_check_for_invalid_template_id)
  1593. (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
  1594. Adjust calls to cp_lexer_advance_token.
  1595. (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
  1596. No need to fiddle c_lex_string_translate.
  1597. (cp_parser_primary_expression, cp_parser_linkage_specification)
  1598. (cp_parser_asm_definition, cp_parser_asm_specification_opt)
  1599. (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
  1600. Use cp_parser_string_literal.
  1601. (cp_parser_attribute_list): Save and restore
  1602. parser->translate_strings_p, not c_lex_string_translate.
  1603. (cp_parser_cache_group): Delete.
  1604. (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
  1605. not take a cache argument.
  1606. 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  1607. PR c++/14179
  1608. * decl.c (reshape_init): Extract array handling into...
  1609. (reshape_init_array): New function. Use integers instead of trees
  1610. for indices. Handle out-of-range designated initializers.
  1611. 2004-09-20 Steven Bosscher <stevenb@suse.de>
  1612. * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
  1613. to null_node.
  1614. 2004-09-19 Mark Mitchell <mark@codesourcery.com>
  1615. * decl2.c (determine_visibility): Allow class visibility
  1616. directives to override targetm.cxx.export_class_data.
  1617. 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
  1618. * call.c, semantics.c: Follow spelling conventions.
  1619. * class.c: Fix a comment typo.
  1620. 2004-09-16 Geoffrey Keating <geoffk@apple.com>
  1621. PR pch/13361
  1622. * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
  1623. (handle_pragma_implementation): Likewise.
  1624. 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
  1625. Zack Weinberg <zack@codesourcery.com>
  1626. * cp-tree.def: Use tree_code_class enumeration constants
  1627. instead of code letters.
  1628. * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
  1629. * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
  1630. Update for new tree-class enumeration constants.
  1631. 2004-09-16 Mark Mitchell <mark@codesourcery.com>
  1632. PR c++/16002
  1633. * parser.c (cp_parser_simple_declaration): Commit to tentative
  1634. parses after seeing a decl-specifier.
  1635. (cp_parser_simple_declaration): Eliminate spurious message.
  1636. (cp_parser_init_declarator): Adjust error message.
  1637. PR c++/16029
  1638. * lex.c (unqualified_name_lookup_error): Mark the dummy
  1639. declaration as used.
  1640. PR c++/17501
  1641. * parser.c (cp_parser_nested_name_specifier): Do not resolve
  1642. typename types if the user explicitly said "typename".
  1643. 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
  1644. * error.c (dump_decl): Make sure there is lang_specific info before
  1645. checking for DTOR and CTOR decls.
  1646. 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
  1647. * class.c (copy_virtuals): Remove.
  1648. (build_primary_vtable): Use copy_list directly.
  1649. (build_secondary_vtable): Likewise.
  1650. (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
  1651. (create_vtable_ptr): Likewise.
  1652. 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
  1653. * search.c: Follow spelling conventions.
  1654. 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
  1655. * cp-tree.h (struct lang_type_class): Make pure_virtuals a
  1656. VEC(tree).
  1657. (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
  1658. comments.
  1659. * call.c (build_new_method_call): Don't confirm a pure virtual is
  1660. in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
  1661. * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
  1662. (fixup_inline_methods, finish_struct): Likewise.
  1663. * decl.c (finish_method): Likewise.
  1664. * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
  1665. CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
  1666. * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
  1667. vector to avoid repeating the list in error messages.
  1668. 2004-09-15 Mark Mitchell <mark@codesourcery.com>
  1669. * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
  1670. * cp-tree.h (cxx_comdat_group): Declare.
  1671. * decl.c (cxx_comdat_group): New function.
  1672. 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
  1673. * search.c (get_pure_virtuals): Remove unused variables.
  1674. * cp-tree.h (struct lang_decl_flags): Remove
  1675. needs_final_overrider.
  1676. (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
  1677. * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
  1678. * class.c (finish_struct_bits): Correct comment about
  1679. CLASSTYPE_PURE_VIRTUALS.
  1680. * search.c (get_pure_virtuals): Remove useless loop.
  1681. 2004-09-14 Mark Mitchell <mark@codesourcery.com>
  1682. PR c++/17324
  1683. * mangle.c (partially_mangled_name): New variable.
  1684. (partially_mangled_name_len): Likewise.
  1685. (save_partially_mangled_name): New function.
  1686. (restore_partially_mangled_name): Likewise.
  1687. (write_encoding): Save and restore partially mangled names around
  1688. calls to get_mostly_instantiated_function_type.
  1689. (write_unqualified_name): Likewise.
  1690. 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
  1691. * pt.c (unify): Replace gcc_unreachable with gcc_assert.
  1692. 2004-09-13 Mark Mitchell <mark@codesourcery.com>
  1693. PR c++/16162
  1694. * parser.c (cp_parser_id_expression): Correct value for
  1695. is_declarator.
  1696. (cp_parser_nested_name_specifier_opt): Look through typenames as
  1697. necessary.
  1698. (cp_parser_template_name): Honor check_dependency_p.
  1699. PR c++/16716
  1700. * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
  1701. Robustify.
  1702. PR c++/17327
  1703. * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
  1704. gcc_unreacable.
  1705. 2004-09-12 Richard Henderson <rth@redhat.com>
  1706. PR c++/16254
  1707. * semantics.c (maybe_cleanup_point_expr): Don't call fold.
  1708. * typeck.c (condition_conversion): Likewise.
  1709. 2004-09-11 Richard Henderson <rth@redhat.com>
  1710. PR c++/17404
  1711. * pt.c (cur_stmt_expr): Move from tsubst_expr.
  1712. (tsubst_expr) <case STMT_EXPR>: Move ...
  1713. (tsubst_copy_and_build): ... here.
  1714. 2004-09-10 Zack Weinberg <zack@codesourcery.com>
  1715. * cp-tree.h (interface_only, interface_unknown): Delete declarations;
  1716. comment explaining them moved to c-common.h.
  1717. * lex.c (interface_only, interface_unknown, extract_interface_info):
  1718. Delete definitions.
  1719. (cxx_finish): Don't reset interface_unknown.
  1720. (handle_pragma_interface): Don't set interface_only and
  1721. interface_unknown; just the like-named fields in finfo.
  1722. (handle_pragma_implementation): Adjust comment.
  1723. * decl2.c (cp_finish_file): Don't reset interface_only and
  1724. interface_unknown.
  1725. * method.c (synthesize_method): Don't reset interface_unknown or
  1726. call extract_interface_info.
  1727. * pt.c (pop_tinst_level): Don't call extract_interface_info.
  1728. * decl.c (start_cleanup_fn): Don't save or restore interface_only
  1729. and interface_unknown.
  1730. (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
  1731. and use the result instead of the interface_only/interface_unknown
  1732. globals.
  1733. (start_preparsed_function): Likewise.
  1734. * lex.c (cxx_make_type): Likewise.
  1735. * semantics.c (begin_class_definition): Likewise.
  1736. (expand_body): Don't call extract_interface_info.
  1737. 2004-09-10 Ziemowit Laski <zlaski@apple.com>
  1738. * decl.c (objc_mark_locals_volatile): Make description of
  1739. routine more descriptive; only mark VAR_DECLs at each
  1740. binding level.
  1741. 2004-09-10 Richard Henderson <rth@redhat.com>
  1742. PR c++/17386
  1743. * call.c (build_vfield_ref): Move...
  1744. * class.c (build_vfield_ref): ... here. Convert datum to the
  1745. primary base containing the vptr.
  1746. (make_new_vtable): Simplify build_primary_vtable arguments.
  1747. (finish_struct_1): Do not duplicate TYPE_VFIELD.
  1748. * typeck.c (build_class_member_access_expr): Don't warn for
  1749. null object access to base fields.
  1750. 2004-09-10 Ziemowit Laski <zlaski@apple.com>
  1751. * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
  1752. New functions, to be called from ObjC++.
  1753. 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
  1754. * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
  1755. name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
  1756. comment typos.
  1757. 2004-09-09 Ziemowit Laski <zlaski@apple.com>
  1758. * typeck.c (build_c_cast): Preserve the cast if casting
  1759. to and from an Objective-C type.
  1760. 2004-09-09 Ziemowit Laski <zlaski@apple.com>
  1761. * Make-lang.in (cp/typeck.o): Depend on c-common.h.
  1762. * typeck.c: Include c-common.h.
  1763. (comptypes): For RECORD_TYPEs, call objc_comptypes() and
  1764. return the result if nonnegative.
  1765. 2004-09-09 Zack Weinberg <zack@codesourcery.com>
  1766. * decl2.c (import_export_class)
  1767. * lex.c (handle_pragma_interface):
  1768. Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
  1769. 2004-09-08 Ziemowit Laski <zlaski@apple.com>
  1770. * Make-lang.in (cp/semantics.o): Depend on c-common.h.
  1771. * semantics.c: Include c-common.h.
  1772. (finish_compound_stmt): Call objc_clear_super_receiver().
  1773. 2004-09-08 Ziemowit Laski <zlaski@apple.com>
  1774. * cp-tree.h (do_poplevel): New prototype.
  1775. * semantics.c (do_poplevel): Make externally visible.
  1776. 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
  1777. * cp-tree.h (tree_pair_s): Define a GC'd vector.
  1778. * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
  1779. * semantics.c (deferred_access): Likewise.
  1780. 2004-09-06 Daniel Jacobowitz <dan@debian.org>
  1781. * semantics.c (expand_body): Assert that we are not nested.
  1782. 2004-09-06 Zack Weinberg <zack@codesourcery.com>
  1783. * decl.c (build_enumerator): Use add_double and int_fits_type_p
  1784. instead of cp_build_binary_op, to avoid creating short-lived trees.
  1785. * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
  1786. lookahead instead of backtracking. Move some code to avoid a
  1787. conditional branch.
  1788. (cp_parser_enum_specifier): Avoid duplication of effort with caller.
  1789. Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
  1790. (cp_parser_enumerator_list, cp_parser_enumerator_definition):
  1791. Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
  1792. 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1793. * decl.c (grok_declarator): Remove a redundant semicolon.
  1794. * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
  1795. Correct comments describing function parameters.
  1796. 2004-09-03 Matt Austern <austern@apple.com>
  1797. Compile speed improvement.
  1798. * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
  1799. Otherwise define a stub macro that expands to nothing.
  1800. (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
  1801. define a stub macro that expands to 0.
  1802. (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
  1803. (cp_lexer_stop_debugging): Likewise.
  1804. (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
  1805. define a stub macro that expands to NULL.
  1806. (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
  1807. (cp_lexer_new_from_tokens): Likewise.
  1808. 2004-09-03 Jan Hubicka <jh@suse.cz>
  1809. * decl.c (finish_function): Clean out pointers we no longer need.
  1810. 2004-09-03 Jan Beulich <jbeulich@novell.com>
  1811. * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
  1812. than "-lm".
  1813. 2004-09-02 Paul Brook <paul@codesourcery.com>
  1814. * decl2.c (determine_visibility): Only check data visibility
  1815. for VAR_DECLS.
  1816. 2004-08-31 Mark Mitchell <mark@codesourcery.com>
  1817. * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
  1818. * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
  1819. * decl2.c (determine_visibility): Honor
  1820. TARGET_CXX_EXPORT_CLASS_DATA.
  1821. * class.c (key_method): Rename to ...
  1822. (determine_key_method): ... this.
  1823. (finish_struct_1): Adjust accordingly.
  1824. * cp-tree.h (key_method): Declare.
  1825. * decl2.c (maybe_emit_vtables): Determine the key method here if
  1826. it has not already been done.
  1827. 2004-08-31 Ziemowit Laski <zlaski@apple.com>
  1828. * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
  1829. (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
  1830. (cp/cp-decl.c): Do not depend on gtype-cp.h.
  1831. (cp/cp-objcp-common.o): New target.
  1832. * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
  1833. (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
  1834. cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
  1835. prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
  1836. respectively.
  1837. (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
  1838. LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
  1839. LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
  1840. LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
  1841. LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
  1842. LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
  1843. LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
  1844. LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
  1845. LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
  1846. LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
  1847. LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
  1848. LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
  1849. LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
  1850. LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
  1851. LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
  1852. LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
  1853. LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
  1854. LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
  1855. LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
  1856. LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
  1857. LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
  1858. LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
  1859. LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
  1860. LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
  1861. LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
  1862. LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
  1863. LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
  1864. LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
  1865. LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
  1866. LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
  1867. LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
  1868. hooks to cp-objcp-common.h.
  1869. (finish_file): New function.
  1870. * cp-objcp-common.c: New file.
  1871. * cp-objcp-common.h: New file.
  1872. * cp-tree.h (cp_finish_file): New prototype.
  1873. * decl.c: Do not include gtype-cp.h.
  1874. * decl2.c (finish_file): Rename to cp_finish_file.
  1875. 2004-08-31 Richard Henderson <rth@redhat.com>
  1876. PR c++/17221
  1877. * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
  1878. (tsubst_copy_and_build): ... here.
  1879. 2004-08-30 Mark Mitchell <mark@codesourcery.com>
  1880. * cp-tree.h (initialize_artificial_var): Declare.
  1881. * decl.c (initialize_artifical_var): New function.
  1882. * class.c (initialize_array): Remove.
  1883. (initialize_vtable): Use initialize_artificial_var.
  1884. (build_vtt): Likewise.
  1885. (build_ctor_vtbl_group): Likewise.
  1886. 2004-08-30 Richard Henderson <rth@redhat.com>
  1887. * class.c (build_base_path): Use build_address directly.
  1888. * typeck.c (build_unary_op): Don't lower &a.b to pointer
  1889. arithmetic directly.
  1890. * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
  1891. means !initializer_constant_valid_p.
  1892. 2004-08-30 Richard Henderson <rth@redhat.com>
  1893. * class.c (fixed_type_or_null): Use get_base_address before
  1894. assuming an ADDR_EXPR is non-null.
  1895. 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
  1896. * name-lookup.c (pop_binding, pushdecl,
  1897. set_identifier_type_value_with_scope, push_overloaded_decl,
  1898. arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
  1899. * parser.c (cp_parser_diagnose_invalid_type_name,
  1900. cp_parser_postfix_expression, cp_parser_unary_expression,
  1901. cp_parser_check_declarator_template_para): Likewise.
  1902. * pt.c (push_inline_template_parms_recursive,
  1903. check_explicit_specialization, convert_nontype_argument,
  1904. coerce_template_template_parms, uses_template_parms,
  1905. instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
  1906. tsubst_expr, instantiate_template,
  1907. maybe_adjust_types_for_deduction, type_unification_real,
  1908. resolve_overloaded_unification, template_decl_level,
  1909. type_dependent_expression_p): Likewise.
  1910. * search.c (lookup_base_r): Likewise.
  1911. * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
  1912. * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
  1913. verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
  1914. * typeck.c (common_type, get_member_function_from_ptrfunc,
  1915. build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
  1916. * typeck2.c (cxx_incomplete_type_diagnostic,
  1917. split_nonconstant_init_1, store_init_value,
  1918. process_init_constructor): Likewise.
  1919. 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
  1920. * call.c (check_dtor_name): Replace abort with gcc_assert or
  1921. gcc_unreachable.
  1922. (build_call, add_builtin_candidate, build_new_op,
  1923. convert_like_real, build_over_call, in_charge_arg_for_name,
  1924. source_type, joust): Likewise.
  1925. * class.c (build_simple_base_path, get_vcall_index,
  1926. finish_struct_1, instantiate_type, get_enclosing_class,
  1927. add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
  1928. * cp-gimplify.c (cp_genericize): Likewise.
  1929. * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
  1930. * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
  1931. * decl.c (poplevel, make_unbound_class_template, reshape_init,
  1932. check_special_function_return_type, grokdeclarator,
  1933. grok_op_properties, tag_name, xref_tag, start_preparsed_function,
  1934. finish_function): Likewise.
  1935. * decl2.c (grokfield, maybe_emit_vtables):Likewise.
  1936. * error.c (dump_global_iord, dump_decl, dump_template_decl,
  1937. language_to_string): Likewise.
  1938. * except.c (choose_personality_routine): Likewise.
  1939. * friend.c (do_friend): Likewise.
  1940. * g++spec.c (lang_specific_driver): Likewise.
  1941. * init.c (build_zero_init, expand_default_init, build_new_1,
  1942. build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
  1943. * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
  1944. * mangle.c (add_substitution, write_unscoped_name,
  1945. write_template_prefix, write_identifier,
  1946. write_special_name_destructor, write_type, write_builtin_type,
  1947. write_expression, write_template_param,
  1948. write_java_integer_type_codes): Likewise.
  1949. * method.c (implicitly_declare_fn): Likewise.
  1950. 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
  1951. * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
  1952. (BINFO_INDIRECT_PRIMARY_P): Remove.
  1953. * class.c (determine_primary_base): Rename to ...
  1954. (determine_primary_bases): ... here. Set all primary bases.
  1955. (set_primary_base): Remove.
  1956. (mark_primary_bases): Remove.
  1957. (build_simple_base_path, walk_subobject_offsets,
  1958. propagate_binfo_offsets, end_of_class): Adjust.
  1959. (layout_class_type): Rename determine_primary_base call.
  1960. (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
  1961. to type_as_string.
  1962. (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
  1963. build_rtti_vtbl_entries): Adjust.
  1964. * init.c (build_vtbl_address): Adjust.
  1965. * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
  1966. 2004-08-28 Ziemowit Laski <zlaski@apple.com>
  1967. * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
  1968. CXX_AND_OBJCXX_OBJS.
  1969. (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
  1970. separately on the link line.
  1971. 2004-08-28 Jason Merrill <jason@redhat.com>
  1972. * decl.c (expand_static_init): Avoid bogus warnings.
  1973. 2004-08-27 Jason Merrill <jason@redhat.com>
  1974. PR c++/16851
  1975. * tree.c (stabilize_init): See through a COMPOUND_EXPR.
  1976. PR c++/13684
  1977. * decl.c (expand_static_init): Use thread-safety API.
  1978. (register_dtor_fn): Return the call, don't expand it.
  1979. * tree.c (add_stmt_to_compound): New fn.
  1980. (stabilize_call): Use it.
  1981. 2004-08-27 Richard Henderson <rth@redhat.com>
  1982. * cp-tree.def (OFFSETOF_EXPR): New.
  1983. * parser.c (cp_parser_builtin_offsetof): Either built an
  1984. OFFSETOF_EXPR, or call fold_offsetof immediately.
  1985. * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
  1986. 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
  1987. * call.c (validate_conversion_obstack): Replace
  1988. my_friendly_assert with gcc_assert or gcc_unreachable.
  1989. (direct_reference_binding, merge_conversion_sequences,
  1990. build_user_type_conversion_1, perform_overload_resolution,
  1991. build_op_delete_call, enforce_access, call_builtin_trap,
  1992. build_over_call, build_special_member_call, build_new_method_call,
  1993. initialize_reference): Likewise.
  1994. * class.c (build_base_path, build_primary_vtable, alter_access,
  1995. check_bases, update_vtable_entry_for_fn, layout_empty_base,
  1996. clone_function_decl, adjust_clone_args,
  1997. type_requires_array_cookie, include_empty_classes,
  1998. finish_struct_1, resolve_address_of_overloaded_function,
  1999. instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
  2000. dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
  2001. accumulate_vtbl_inits, build_vtbl_initializer,
  2002. build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
  2003. * cvt.c (build_up_reference, convert_to_reference): Likewise.
  2004. * decl.c (poplevel, duplicate_decls, make_typename_type,
  2005. cxx_init_decl_processing, reshape_init, check_initializer,
  2006. make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
  2007. expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
  2008. grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
  2009. xref_basetypes, start_preparsed_function, save_function_data,
  2010. finish_function, finish_method, maybe_register_incomplete_var,
  2011. complete_vars): Likewise.
  2012. * decl2.c (grok_array_decl, check_member_template,
  2013. check_classfn, finish_static_data_member_decl, coerce_new_type,
  2014. coerce_delete_type, import_export_class, decl_needed_p,
  2015. determine_visibility, import_export_decl, build_cleanup,
  2016. start_static_initialization_or_destructi, do_static_destruction,
  2017. prune_vars_needing_no_initialization,
  2018. build_offset_ref_call_from_tree): Likewise.
  2019. * error.c (dump_decl, dump_expr): Likewise.
  2020. * init.c (finish_init_stmts, build_zero_init,
  2021. expand_virtual_init, expand_default_init, expand_aggr_init_1,
  2022. build_offset_ref, build_new_1, build_delete, build_vbase_delete):
  2023. Likewise.
  2024. * mangle.c (write_method_parms, write_template_args,
  2025. write_expression, write_template_arg): Likewise.
  2026. * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
  2027. * name-lookup.c (pop_binding, begin_scope, leave_scope,
  2028. resume_scope, push_using_decl, validate_nonmember_using_decl,
  2029. is_ancestor, poplevel_class, set_inherited_value_binding_p,
  2030. push_class_level_binding, do_class_using_decl, push_namespace,
  2031. pop_namespace, add_using_namespace, ambiguous_decl,
  2032. lookup_namespace_name, lookup_type_current_level,
  2033. maybe_process_template_type_declaration): Likewise.
  2034. * parser.c (cp_lexer_peek_nth_token,
  2035. cp_parser_parse_and_diagnose_invalid_typ,
  2036. cp_parser_translation_unit, cp_parser_template_id,
  2037. cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
  2038. * pt.c (push_access_scope, finish_member_template_decl,
  2039. push_inline_template_parms_recursive, add_outermost_template_args,
  2040. get_innermost_template_args, begin_explicit_instantiation,
  2041. end_explicit_instantiation, retrieve_specialization,
  2042. is_specialization_of, is_specialization_of_friend,
  2043. register_specialization, check_explicit_specialization,
  2044. comp_template_parms, process_template_parm,
  2045. process_partial_specialization, convert_nontype_argument,
  2046. coerce_template_template_parms, coerce_template_parms,
  2047. mangle_class_name_for_template, lookup_template_function,
  2048. lookup_template_class, instantiate_class_template, tsubst_decl,
  2049. tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
  2050. instantiate_template, fn_type_unification, type_unification_real,
  2051. get_template_base, regenerate_decl_from_template,
  2052. template_for_substitution, instantiate_decl,
  2053. get_mostly_instantiated_function_type, dependent_scope_ref_p,
  2054. value_dependent_expression_p, resolve_typename_type): Likewise.
  2055. * repo.c (repo_emit_p): Likewise.
  2056. * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
  2057. create_tinfo_types, emit_tinfo_decl): Likewise.
  2058. * search.c (lookup_base_r, lookup_base, lookup_field_1,
  2059. dfs_access_in_type, build_baselink, lookup_member,
  2060. adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
  2061. * semantics.c (perform_or_defer_access_check,
  2062. finish_non_static_data_member, finish_stmt_expr_expr,
  2063. finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
  2064. finish_template_template_parm, finish_member_declaration,
  2065. emit_associated_thunks): Likewise.
  2066. * tree.c (build_target_expr_with_type, force_target_expr,
  2067. copy_binfo, get_first_fn, cp_tree_equal): Likewise.
  2068. * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
  2069. cxx_sizeof_or_alignof_type, perform_integral_promotions,
  2070. build_class_member_access_expr, finish_class_member_access_expr,
  2071. build_ptrmemfunc_access_expr, build_unary_op,
  2072. unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
  2073. build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
  2074. * typeck2.c (complete_type_check_abstract,
  2075. abstract_virtuals_error, process_init_constructor,
  2076. add_exception_specifier): Likewise.
  2077. 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
  2078. * class.c (build_vtbl_initializer): Use ssize_int.
  2079. * decl.c (complete_array_type): Likewise.
  2080. * method.c (finish_thunk): Likewise.
  2081. * search.c (get_dynamic_base_type): Likewise.
  2082. 2004-08-26 Richard Henderson <rth@redhat.com>
  2083. * cp-tree.h (DECL_FIELD_IS_BASE): New.
  2084. * class.c (build_base_field): Set it.
  2085. (build_simple_base_path): Use it.
  2086. (fixed_type_or_null): Don't consider base fields definitive.
  2087. 2004-08-25 Roger Sayle <roger@eyesopen.com>
  2088. PR middle-end/16693
  2089. PR tree-optimization/16372
  2090. * decl.c (finish_enum): Make the precision of the enumerated type
  2091. the same width as the underlying integer type.
  2092. 2004-08-25 Mark Mitchell <mark@codesourcery.com>
  2093. PR c++/17155
  2094. * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
  2095. functions.
  2096. * mangle.c (get_identifier_nocopy): Add cast.
  2097. * cp-tree.h (mangle_type): Remove.
  2098. * mangle.c (globals): GTY it.
  2099. (mangle_obstack): New variable.
  2100. (name_obstack): Likewise.
  2101. (name_base): Likewise.
  2102. (write_char): Adjust accordingly.
  2103. (write_chars): Likewise.
  2104. (write_string): Likewise.
  2105. (start_mangling): Initialize G.substitutions only one. Add
  2106. ident_p parameter.
  2107. (finish_mangling): Use VARRAY_CLEAR to reclaim
  2108. storage in G.substitutions. Use obstack_finish.
  2109. (init_mangle): Adjust for changes to variable names above.
  2110. Initialize G.substitutions.
  2111. (mangle_decl_string): Adjust call to start_mangling.
  2112. (get_identifier_nocopy): New function.
  2113. (mangle_decl): Use it.
  2114. (mangle_type_string): Adjust call to start_mangling.
  2115. (mangle_special_for_type): Likewise.
  2116. (mangle_vtt_for_type): Likewise.
  2117. (mangle_ctor_vtbl_for_type): Likewise.
  2118. (mangle_thunk): Likewise.
  2119. (mangle_guard_variable): Likewise.
  2120. (mangle_ref_init_variable): Likewise.
  2121. 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2122. PR c++/14428
  2123. * pt.c (redeclare_class_template): Check the type of non-type and
  2124. template template parameter.
  2125. 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
  2126. * call.c (convert_class_to_reference): Adjust build_int_cst calls.
  2127. (build_user_type_conversion_1, convert_like_real,
  2128. build_java_interface_fn_ref, build_special_member_call): Likewise.
  2129. * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
  2130. * cp-gimplify.c (cp_gimplify_expr): Likewise.
  2131. * cvt.c (cp_convert_to_pointer): Likewise.
  2132. * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
  2133. * decl2.c (start_static_initialization_or_destruction,
  2134. generate_ctor_or_dtor_function): Likewise.
  2135. * except.c (build_throw): Likewise.
  2136. * mangle.c (write_integer_cst): Likewise.
  2137. * method.c (finish_thunk): Likewise.
  2138. * rtti.c (build_headof, get_tinfo_decl_dynamic,
  2139. build_dynamic_cast_1, ptr_initializer, ptm_initializer,
  2140. get_pseudo_ti_init): Likewise.
  2141. * search.c (get_dynamic_cast_base_type): Likewise.
  2142. 2004-08-25 Zack Weinberg <zack@codesourcery.com>
  2143. * class.c, search.c: Remove references to DWARF_DEBUG.
  2144. 2004-08-25 Adam Nemet <anemet@lnxw.com>
  2145. * repo.c (extract_string): Reset backquote after one character.
  2146. (get_base_filename): Fix indentation.
  2147. 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
  2148. * decl.c (cxx_init_decl_processing): Adjust
  2149. build_common_tree_nodes call.
  2150. 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
  2151. PR c++/16889
  2152. * (is_subobject_of_p): Resurrect & optimize.
  2153. (lookup_field_r): Use it.
  2154. 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2155. PR c++/16706
  2156. * search.c (friend_accessible_p): Increment processing_template_decl
  2157. when deal with TEMPLATE_DECL of SCOPE.
  2158. 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
  2159. PR c++/17149
  2160. * semantics.c (check_accessibility_of_qualified_id): Defer check
  2161. if qualifying_type is a template parameter.
  2162. 2004-08-23 Mark Mitchell <mark@codesourcery.com>
  2163. PR c++/17163
  2164. * pt.c (instantiate_decl): Do not try to apply
  2165. DECL_DECLARED_INLINED_P to a VAR_DECL.
  2166. * search.c (build_baselink): Fix typo in comment.
  2167. 2004-08-22 Andrew Pinski <apinski@apple.com>
  2168. Revert:
  2169. 2004-08-22 Andrew Pinski <apinski@apple.com>
  2170. PR c++/14029
  2171. * typeck.c (build_unary_op): Use &a.b if the folded lowered
  2172. expression is not constant.
  2173. 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
  2174. * name-lookup.c (pushdecl): Rename build_type_copy call.
  2175. * tree.c (cp_build_qualified_type_real,
  2176. build_exception_variant, handle_java_interface_attribute): Likewise.
  2177. 2004-08-22 Andrew Pinski <apinski@apple.com>
  2178. PR c++/14029
  2179. * typeck.c (build_unary_op): Use &a.b if the folded lowered
  2180. expression is not constant.
  2181. 2004-08-20 Mark Mitchell <mark@codesourcery.com>
  2182. PR c++/17121
  2183. * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
  2184. 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
  2185. PR c++/17120
  2186. * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
  2187. MODOP_EXPR.
  2188. 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2189. * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
  2190. before calling comp_template_args.
  2191. 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
  2192. * class.c (build_vtbl_initializer): Use build_int_cst for
  2193. negative size types.
  2194. * decl.c (complete_array_type): Likewise.
  2195. * method.c (finish_thunk): Likewise.
  2196. 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
  2197. * tree.c: Remove unused mark_local_for_remap_r.
  2198. 2004-08-19 Eric Christopher <echristo@redhat.com>
  2199. * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
  2200. * tree.c (cxx_unsave_expr_now): Delete.
  2201. (cp_unsave_r): Ditto.
  2202. 2004-08-19 Mark Mitchell <mark@codesourcery.com>
  2203. PR c++/15890
  2204. * pt.c (push_template_decl_real): Disallow template allocation
  2205. functions with fewer than two parameters.
  2206. 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
  2207. * cp-tree.h (build_shared_int_cst): Remove.
  2208. * tree.c (shared_int_cache): Remove.
  2209. (build_shared_int_cst): Remove.
  2210. * class.c (finish_struct_1): Use build_int_cst.
  2211. 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
  2212. * decl.c (finish_enum): Do not copy value node early, copy
  2213. later.
  2214. * lex.c (cxx_init): Force null_node to be unique.
  2215. 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
  2216. PR c++/17041
  2217. * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
  2218. from input for MODOP_EXPR.
  2219. 2004-08-18 Mark Mitchell <mark@codesourcery.com>
  2220. * pt.c (dependent_template_p): Fix typo in commment.
  2221. PR c++/17068
  2222. * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
  2223. dependent.
  2224. 2004-08-17 Mark Mitchell <mark@codesourcery.com>
  2225. PR c++/16246
  2226. * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
  2227. arguments have the same type as the corresponding parameter.
  2228. PR c++/16215
  2229. * parser.c (cp_parser_name_lookup_error): If parser->object_scope
  2230. is set use it for diagnostic purposes.
  2231. (cp_parser_pseudo_destructor_name): Remove special-case error
  2232. message.
  2233. PR c++/15871
  2234. * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
  2235. PR c++/16965
  2236. * cp-tree.h (qualified_name_lookup_error): Add parameter.
  2237. * name-lookup.c (do_class_using_decl): Restrict set of entities
  2238. passed to cp_emit_debug_info_for_using more carefully.
  2239. (lookup_qualified_name): Allow lookup_member to return sets of
  2240. ambiguous entries.
  2241. * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
  2242. (cp_parser_primary_expression): Handle ambiguous lookups.
  2243. (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
  2244. (cp_parser_template_argument): Likewise.
  2245. (cp_parser_elaborate_type_specifier): Likewise.
  2246. (cp_parser_namespace_name): Likewise.
  2247. (cp_parser_class_name): Likewise.
  2248. (cp_parser_lookup_name_simple): Likewise.
  2249. * pt.c (tsubst_qualified_id): Handle ambiguous results.
  2250. (tsubst_expr): Likewise.
  2251. * semantics.c (qualified_name_lookup_error): Add decl paramter.
  2252. For ambiguous lookups, print candidates.
  2253. 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2254. PR c++/6749
  2255. * pt.c (instantiate_pending_templates): Add int parameter. Don't
  2256. return anything.
  2257. * cp-tree.h (instantiate_pending_templates): Adjust prototype.
  2258. * decl2.c (finish_file): Adjust call to
  2259. instantiate_pending_templates.
  2260. 2004-08-15 Roger Sayle <roger@eyesopen.com>
  2261. * call.c (build_vfield_ref, build_call, build_conditional_expr,
  2262. convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
  2263. build_java_interface_fn_ref, build_special_member_call,
  2264. build_new_method_call, initialize_reference): Replace calls to
  2265. build with calls to buildN.
  2266. * class.c (build_base_path, convert_to_base_statically,
  2267. build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
  2268. build_vtbl_initializer): Likewise.
  2269. * cp-gimplify.c (genericize_try_block, genericize_catch_block,
  2270. gimplify_if_stmt, cp_genericize_r): Likewise.
  2271. * cvt.c (convert_to_void): Likewise.
  2272. * decl.c (check_initializer, finish_constructor_body,
  2273. finish_destructor_body): Likewise.
  2274. * error.c (dump_expr): Likewise.
  2275. * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
  2276. Likewise.
  2277. * init.c (perform_member_init, expand_virtual_init,
  2278. expand_cleanup_for_base, build_init, expand_default_init,
  2279. build_offset_ref, decl_constant_value, build_new, build_new_1,
  2280. build_vec_delete_1, build_vec_init, build_delete,
  2281. push_base_cleanups, build_vec_delete): Likewise.
  2282. * mangle.c (write_integer_cst): Likewise.
  2283. * method.c (thunk_adjust, do_build_copy_constructor,
  2284. do_build_assign_ref): Likewise.
  2285. * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
  2286. unify, build_non_dependent_expr): Likewise.
  2287. * rtti.c (build_headof, build_typeid, ifnonnull,
  2288. build_dyanmic_cast_1, tinfo_base_init): Likewise.
  2289. * semantics.c (begin_compound_stmt, finish_call_expr,
  2290. finish_pseudo_destructor_expr, finish_id_expression,
  2291. simplify_aggr_init_expr, finalize_nrv_r): Likewise.
  2292. * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
  2293. array_type_nelts_total, stabilize_call): Likewise.
  2294. * typeck.c (decay_conversion, build_class_member_access_expr,
  2295. lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
  2296. get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
  2297. build_x_unary_op, build_unary_op, unary_complex_lvalue,
  2298. build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
  2299. check_return_expr): Likewise.
  2300. * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
  2301. split_nonconstant_init, store_init_value, build_m_component_ref):
  2302. Likewise.
  2303. 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
  2304. * call.c (convert_class_to_reference,
  2305. build_user_type_conversion_1, convert_like_real,
  2306. build_java_interface_fn_ref, build_special_member_call): Use
  2307. build_int_cst.
  2308. * class.c (build_vtbl_initializer): Likewise.
  2309. * cp-gimplify.c (cp_gimplify_expr): Likewise.
  2310. * cvt.c (cp_convert_to_pointer): Likewise.
  2311. * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
  2312. * decl2.c (start_static_initialization_or_destruction,
  2313. generate_ctor_or_dtor_function): Likewise.
  2314. * except.c (build_throw): Likewise.
  2315. * lex.c (cxx_init): Likewise.
  2316. * mangle.c (write_integer_cst): Likewise.
  2317. * rtti.c (build_headof, get_tinfo_decl_dynamic,
  2318. build_dynamic_cast_1, ptr_initializer, ptm_initializer,
  2319. get_pseudo_ti_init): Likewise.
  2320. * search.c (get_dynamic_cast_base_type): Likewise.
  2321. * tree.c (build_shared_int_cst): Likewise.
  2322. 2004-08-12 Mark Mitchell <mark@codesourcery.com>
  2323. PR c++/16273
  2324. * class.c (count_depth_data): New type.
  2325. (dfs_depth_post): New function.
  2326. (dfs_depth_q): Likewise.
  2327. (find_final_overrider_data_s): Change type of vpath.
  2328. Add vpath_list.
  2329. (dfs_find_final_overrider_1): New function.
  2330. (dfs_find_final_overrider): Use it.
  2331. (dfs_find_final_overrider_q): Adjust use of vpath.
  2332. (dfs_find_final_overrider_post): Likewise.
  2333. (find_final_overrider): Use dfs_depth. Allocate and deallocate
  2334. vpath_list.
  2335. 2004-08-12 Jan Beulich <jbeulich@novell.com>
  2336. * parser.c (cp_parser_asm_definition): Properly consume scope operator
  2337. tokens preceding the clobbers. Don't check for scope operator
  2338. following inputs. Simplify inputs handling to match that now used for
  2339. clobbers.
  2340. 2004-08-11 Mark Mitchell <mark@codesourcery.com>
  2341. PR c++/16698
  2342. * except.c (build_throw): Allocate cleanup_type and the function
  2343. for __cxa_throw separately.
  2344. PR c++/16853
  2345. * call.c (standard_conversion): Do not accept conversions between
  2346. pointers to members if the class types are unrelated.
  2347. PR c++/16618
  2348. * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
  2349. char &" instead of just "char &".
  2350. PR c++/16870
  2351. * pt.c (tsubst): Just return the unknown_type_node.
  2352. 2004-08-11 Mark Mitchell <mark@codesourcery.com>
  2353. PR c++/16964
  2354. * parser.c (cp_parser_class_specifier): Robustify.
  2355. PR c++/16904
  2356. * pt.c (tsubst_copy_and_build): Complain about invalid
  2357. qualification.
  2358. PR c++/16929
  2359. * pt.c (tsubst_default_argument): Clear out current_class_ptr and
  2360. current_class_ref while tsubsting.
  2361. 2004-08-10 Mark Mitchell <mark@codesourcery.com>
  2362. PR c++/16971
  2363. * parser.c (cp_parser_init_declarator): Robustify.
  2364. 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
  2365. * typeck2.c (process_init_constructor): Guard the missing field warning
  2366. with warn_missing_field_initializers rather than extra_warnings.
  2367. 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
  2368. * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
  2369. 2004-08-05 Mark Mitchell <mark@codesourcery.com>
  2370. * decl.c (start_preparsed_function): Move determine_visibility
  2371. call.
  2372. * decl2.c (determine_visibility): Incorporate dllexport testing.
  2373. 2004-08-05 Geoffrey Keating <geoffk@apple.com>
  2374. * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
  2375. means that libstdc++ is needed.
  2376. 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
  2377. * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
  2378. 2004-08-04 Geoffrey Keating <geoffk@apple.com>
  2379. * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
  2380. than passing it as a parameter to rest_of_decl_compilation.
  2381. * decl2.c (grokfield): Use set_user_assembler_name.
  2382. 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
  2383. * decl.c (complete_array_type): Don't gratuitously copy
  2384. maxindex. Its type is always set.
  2385. 2004-08-04 Paul Brook <paul@codesourcery.com>
  2386. * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
  2387. * cp-tree.h (struct language_function): Rename x_dtor_label to
  2388. x_cdtor_label.
  2389. (dtor_label): Rename ...
  2390. (cdtor_label): ... to this.
  2391. * decl.c (begin_constructor_body): Remove.
  2392. (check_special_function_return_type): Maybe change the return type.
  2393. (grokdeclarator): Pass the class type.
  2394. (start_preparsed_function): Constructors may need a return label.
  2395. (finish_constructor_body, finish_destructor_body): Set the return
  2396. value.
  2397. (begin_function_body): Don't call begin_constructor_body.
  2398. (finish_function): Don't warn for constructors or destructors.
  2399. (implicitly_declare_fn): Maybe change the return type.
  2400. * optimize.c: Include target.h.
  2401. (maybe_clone_body): Remap the function result.
  2402. * semantics.c: Include target.h.
  2403. (finish_return_stmt): Maybe jump to return label for constructors.
  2404. 2004-08-03 Mark Mitchell <mark@codesourcery.com>
  2405. * class.c (build_vtable): Do not set DECL_VISIBILITY here.
  2406. (check_field_decls): Or here.
  2407. (check_methods): Or here.
  2408. (initialize_array): Don't mess with DECL_CONTEXT.
  2409. * cp-tree.h (start_decl): Adjust prototype.
  2410. (determine_visibility): New function.
  2411. * decl.c (duplicate_decls): Remove checks for hidden "operator
  2412. new".
  2413. (build_library_fn_1): Give all library functions default
  2414. visibility.
  2415. (start_decl): Add pop_scope_p parameter. Tidy.
  2416. (cp_finish_decl): Do not pop scopes here. Call
  2417. determine_visibility for variable definitions.
  2418. (start_preparsed_function): Call determine_visibility.
  2419. * decl2.c (determine_visibility): New function.
  2420. * method.c (use_thunk): Fix formatting.
  2421. * parser.c (cp_parser_condition): Adjust calls to start_decl.
  2422. (cp_parser_init_declarator): Likewise.
  2423. * pt.c (instantiate_decl): Always call pop_nested_class.
  2424. * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
  2425. (tinfo_base_init): Likewise.
  2426. 2004-08-02 Mark Mitchell <mark@codesourcery.com>
  2427. PR c++/16707
  2428. * name-lookup.c (validate_nonmember_using_decl): Robustify.
  2429. 2004-08-01 Mark Mitchell <mark@codesourcery.com>
  2430. PR c++/16224
  2431. * name-lookup.c (decl_namespace): Remove.
  2432. (current_decl_namespace): Use decl_namespace_context instead of
  2433. decl_namespace.
  2434. (push_decl_namespace): Likewise.
  2435. (arg_assoc_class): Likewise.
  2436. (arg_assoc_type): Likewise.
  2437. * pt.c (check_specialization_namespace): New function.
  2438. (maybe_process_partial_specialization): Use it.
  2439. (register_specialization): Likewise.
  2440. PR c++/16489
  2441. * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
  2442. * call.c (null_ptr_cst_p): Handle variables with constant
  2443. initializers.
  2444. * pt.c (convert_nontype_argument): Use
  2445. DECL_INTEGRAL_CONSTANT_VAR_P.
  2446. * semantics.c (finish_id_expression): Likewise.
  2447. PR c++/16529
  2448. * decl.c (duplicate_decls): Reject duplicate namespace
  2449. declarations.
  2450. PR c++/16810
  2451. * typeck.c (build_ptrmemfunc): Loosen assertion.
  2452. 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2453. * call.c (z_candidate::template_decl): Rename from template.
  2454. (add_template_candidate_real): Adjust member reference.
  2455. (joust): Likewise.
  2456. 2004-07-29 Mark Mitchell <mark@codesourcery.com>
  2457. * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
  2458. (lang_decl_flags): Narrow the width of "languages". Add
  2459. repo_available_p.
  2460. (DECL_NEEDED_P): Remove.
  2461. (FOR_EACH_CLONE): New macro.
  2462. (DECL_REPO_AVAILABLE_P): Likewise.
  2463. (DECL_TINFO_P): Likewise.
  2464. (set_linkage_according_to_type): Declare.
  2465. (import_export_vtable): Remove.
  2466. (import_export_tinfo): Likewise.
  2467. (mark_needed): New function.
  2468. (decl_needed_p): Likewise.
  2469. (note_vauge_linkage_fn): Likewise.
  2470. (init_repo): Change prototype.
  2471. (repo_template_used): Remove.
  2472. (repo_template_instantiated): Likewise.
  2473. (repo_emit_p): New function.
  2474. (repo_export_class_p): Likewise.
  2475. (no_linkage_check): Change prototype.
  2476. * class.c (set_linkage_according_to_type): New function.
  2477. (build_vtable): Use it. Do not call import_export_vtable. Set
  2478. DECL_IGNORED_P if appropriate.
  2479. * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
  2480. (make_rtL_for_nonlocal_decls): Check for template instantiations
  2481. explicitly.
  2482. (grokfndecl): Adjust call to no_linkage_check.
  2483. (set_linkage_for_static_data_member): New function.
  2484. (grokvardecl): Use it. Adjust call to no_linkage_check.
  2485. (grokdeclarator): Use set_linkage_for_static_data_member.
  2486. * decl2.c (note_vague_linkage_fn): New function.
  2487. (note_vague_linkage_var): Likewise.
  2488. (finish_static_data_member_decl): Use it.
  2489. (import_export_vtable): Remove.
  2490. (import_export_class): Use repo_export_class_p.
  2491. (var_finalized_p): Simplify.
  2492. (maybe_emit_vtables): Simplify.
  2493. (mark_needed): New function.
  2494. (decl_needed_p): Likewise.
  2495. (import_export_decl): Add documentation and consistency checks.
  2496. Use repo_emit_p. Handle virtual tables and RTTI information
  2497. here.
  2498. (import_export_tinfo): Remove.
  2499. (write_out_vars): Call import_export_decl.
  2500. (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
  2501. whenever one is.
  2502. (finish_file): Use decl_needed_p. Do not call import_export_decl
  2503. for undefined static data members. Do not warn about undefined
  2504. inlines when using a repository.
  2505. (mark_used): Use note_vague_linkage_fn. Always defer template
  2506. instantiations.
  2507. * lex.c (cxx_init): Adjust call to init_repo. Always set
  2508. flag_unit_at_a-time.
  2509. * method.c (synthesize_method): Remove unncessary
  2510. import_export_decl call.
  2511. (implicitly_declare_fn): Use set_linkage_according_to_type.
  2512. * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
  2513. * pt.c (instantiate_class_template): Don't redundantly add classes
  2514. to keyed_classes. Don't call repo_template_used.
  2515. (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
  2516. templates with internal linkage.
  2517. (check_instantiated_args): Adjust call to no_linkage_check.
  2518. (instantiate_template): Use FOR_EACH_CLONE.
  2519. (mark_definable): New function.
  2520. (mark_decl_instantiated): Use it.
  2521. (do_decl_instantiation): Adjust tests for explicit instantiation
  2522. after "extern template".
  2523. (instantiate_class_member): Do not use repo_template_instantiated.
  2524. (do_type_instantiation): Simplify.
  2525. (instantiate_decl): Use mark_definable. Check repo_emit_p.
  2526. Simplify.
  2527. * repo.c (repo_get_id): Remove.
  2528. (original_repo): Remove.
  2529. (IDENTIFIER_REPO_USED): Remove.
  2530. (IDENTIFIER_REPO_CHOSEN): Remove.
  2531. Remove all #if 0'd code.
  2532. (repo_template_used): Remove.
  2533. (repo_template_instantiated): Remove.
  2534. (temporary_obstack_initialized_p): New variable.
  2535. (init_repo): Register with lang_post_pch_load. Avoid creating
  2536. identifiers unnecessarily. Don't use original_repo. Close the
  2537. file here.
  2538. (reopen_repo_file_for_write): Not here.
  2539. (finish_repo): Always write out a new repository file.
  2540. (repo_emit_p): New function.
  2541. (repo_export_class_p): Likewise.
  2542. * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
  2543. (involves_incomplete_p): New function.
  2544. (tinfo_base_init): Use it.
  2545. (ptr_initializer): Remove non_public_ptr parameter.
  2546. (ptm_initializer): Likewise.
  2547. (get_pseudo_ti_init): Likewise.
  2548. (unemitted_tinfo_decl_p): Remove.
  2549. (emit_tinfo_decl): Use import_export_decl.
  2550. * semantics.c (expand_body): Move updates of static_ctors and
  2551. static_dtors to ...
  2552. (expand_or_defer_fn): ... here.
  2553. * tree.c (no_linkage_check): Add relaxed_p parameter.
  2554. 2004-07-28 Eric Christopher <echristo@redhat.com>
  2555. * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
  2556. 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
  2557. * cp-tree.h (struct tree_pair_s): New.
  2558. (typedef tree_pair_p): New.
  2559. (DEF_VEC_O(tree_pair_s)): New.
  2560. (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
  2561. (CLASSTYPE_VCALL_INDICES): Update documentation.
  2562. * class.c (get_vcall_index): Adjust.
  2563. (add_vcall_offset): Adjust.
  2564. 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
  2565. * pt.c, typeck.c: Remove spurious carriage returns.
  2566. 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2567. PR c++/14429
  2568. * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
  2569. when the type of ARG is not dependent.
  2570. 2004-07-26 Geoffrey Keating <geoffk@apple.com>
  2571. * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
  2572. (lang_specific_driver): If the C++ or math library options don't
  2573. start with '-l', don't count them as added libraries.
  2574. 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
  2575. * decl.c (xref_basetypes): Adjust base access vector creation.
  2576. * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
  2577. access accesses.
  2578. * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
  2579. 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
  2580. Brian Ryner <bryner@brianryner.com>
  2581. PR c++/15000
  2582. PR c++/9283
  2583. * class.c (check_field_decls): Apply hidden visibility if
  2584. -fvisibility-inlines-hidden and inlined unless otherwise specified
  2585. (build_vtable): Set vtable visibility to class visibility.
  2586. (check_field_decls): Default static member visibility to class
  2587. visibility.
  2588. (check_methods): Default method visibility to class visibility.
  2589. * cp-tree.h: Added CLASSTYPE_VISIBILITY and
  2590. CLASSTYPE_VISIBILITY_SPECIFIED macro.
  2591. * decl.c (duplicate_decls): New logic for merging definition decls
  2592. with declaration decls. Added ignore & warning when non default
  2593. applied to global operator new or delete.
  2594. * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
  2595. wherever VISIBILITY was changed
  2596. * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
  2597. visibility.
  2598. (tinfo_base_init): Set typeinfo name visibility to class visibility.
  2599. 2004-07-25 Bernardo Innocenti <bernie@develer.com>
  2600. * decl.c: Rename all identifiers named `class' to `cl'.
  2601. * cp-tree.h: Likewise.
  2602. 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2603. * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
  2604. * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
  2605. * name-lookup.c (binding_entry_make): Use GGC_NEW.
  2606. (binding_table_construct): Use GGC_CNEWVEC.
  2607. (binding_table_new): Use GGC_NEW.
  2608. (cxx_binding_make): Likewise.
  2609. (begin_scope): Likewise.
  2610. (push_to_top_level): Use GCC_CNEW.
  2611. * parser.c (cp_token_cache_new): Likewise.
  2612. (cp_token_cache_push_token): Likewise.
  2613. (cp_lexer_new_main): Likewise.
  2614. (cp_lexer_new_from_tokens): Likewise.
  2615. (cp_parser_context_new): Likewise.
  2616. (cp_parser_new): Likewise.
  2617. (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
  2618. * lex.c (cxx_make_type): Use GGC_CNEW.
  2619. (retrofit_lang_decl): Use GGC_NEWVAR.
  2620. (cxx_dup_lang_specific_decl): Likewise.
  2621. (copy_lang_type): Likewise.
  2622. * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
  2623. (save_function_data): Likewise.
  2624. (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
  2625. (cxx_push_function_context): Likewise.
  2626. 2004-07-25 Richard Henderson <rth@redhat.com>
  2627. * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
  2628. DECL_IGNORED_P on RESULT_DECL.
  2629. * semantics.c (finalize_nrv): Copy them too.
  2630. 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
  2631. * search.c (lookup_conversion_operator): Avoid two loops.
  2632. (add_conversions): Remove.
  2633. (check_hidden_convs, split_conversions,
  2634. lookup_conversions_r): New.
  2635. (lookup_conversions): Use lookup_conversions_r.
  2636. 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
  2637. * pt.c (get_template_base): Check type is completable.
  2638. 2004-07-21 Eric Christopher <echristo@redhat.com>
  2639. * decl.c (poplevel): Inline unused variable checking.
  2640. Change formatting.
  2641. 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
  2642. * typeck.c (build_binary_op): Do not use RDIV_EXPR for
  2643. integer vectors.
  2644. 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  2645. PR c++/14497
  2646. * pt.c (check_explicit_specialization): Remove extension to accept
  2647. specializations without template headers. Fall-through to normal
  2648. processing.
  2649. 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  2650. PR c++/509
  2651. * pt.c (determine_specialization): New parameter template_count.
  2652. Disambiguate between member templates and member functions counting
  2653. the template headers.
  2654. (check_explicit_specialization): Update caller.
  2655. (tsubst_friend_function): Likewise.
  2656. 2004-07-20 Steven Bosscher <stevenb@suse.de>
  2657. * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
  2658. * cp-tree.h (tinst_level_t): New tree type.
  2659. (union lang_tree_node): Handle it.
  2660. (TINST_LOCATION): New accessor macro.
  2661. (make_tinst_level): New prototype.
  2662. * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
  2663. * decl.c (cp_tree_node_structure): Likewise.
  2664. * error.c (print_instantiation_full_context): Use TINST_LOCATION.
  2665. (print_instantiation_partial_context): Likewise.
  2666. * pt.c (pop_tinst_level): Likewise.
  2667. (push_tinst_level): Use make_tinst_level.
  2668. * tree.c (make_tinst_level): New function.
  2669. (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
  2670. 2004-07-20 Mark Mitchell <mark@codesourcery.com>
  2671. * parser.c (cp_parser_simple_type_specifier): Fix typo.
  2672. PR c++/16637
  2673. * parser.c (cp_parser_simple_type_specifier): Do not record usage
  2674. of globally-qualified names.
  2675. 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2676. PR c++/16175
  2677. * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
  2678. cv qualifier.
  2679. 2004-07-19 Mark Mitchell <mark@codesourcery.com>
  2680. PR c++/16623
  2681. * cp-tree.h (lang_type_class): Add lazy_assignment_op.
  2682. (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
  2683. * class.c (add_implicitly_declared_members): Use
  2684. CLASSTYPE_LAZY_ASSIGNMENT_OP.
  2685. * method.c (lazily_declare_fn): Clear
  2686. CLASSTYPE_LAZY_ASSIGNMENT_OP.
  2687. * search.c (lookup_fnfields_1): Check it.
  2688. 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
  2689. * cp-tree.h (vec_binfo_member): Remove.
  2690. * tree.c (vec_binfo_member): Remove.
  2691. * cp-tree.h (struct lang_type_class): Remove vfields field.
  2692. (CLASSTYPE_VFIELDS): Remove.
  2693. (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
  2694. * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
  2695. handling.
  2696. (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
  2697. (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
  2698. * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
  2699. 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
  2700. * cp-tree.h (DEF_VEC_P(tree)): Remove here.
  2701. (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
  2702. Moved to common.
  2703. (BINFO_LANG_SLOTS): Remove.
  2704. * tree.c (copy_binfo): Adjust BINFO creation and accessors.
  2705. * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
  2706. * class.c (check_bases): Adjust BINFO accessors.
  2707. (determine_primary_base, finish_struct_bits,
  2708. maybe_warn_about_overly_private_class, warn_hidden,
  2709. walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
  2710. warn_about_ambiguous_bases, get_vfield_name,
  2711. dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
  2712. add_vcall_offset_vtbl_entries_r): Likewise.
  2713. * dump.c (cp_dump_tree): Likewise.
  2714. * init.c (sort_mem_initializers, expand_member_init, build_delete,
  2715. push_base_cleanups): Likewise.
  2716. * method.c (do_build_copy_constructor, do_build_assign_ref,
  2717. synthesize_exception_spec): Likewise.
  2718. name-lookup.c (arg_assoc_class): Likewise.
  2719. * pt.c (instantiate_class_template,
  2720. get_template_base_recursive): Likewise.
  2721. * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
  2722. * typeck2.c (process_init_constructor): Likewise.
  2723. * search.c (lookup_base_r, dynamic_cast_base_recurse,
  2724. dfs_access_in_type, dfs_walk_real, look_for_overrides,
  2725. types_overlap_p, copied_binfo, original_binfo): Likewise.
  2726. (binfo_for_vtable): Remove
  2727. 2004-07-20 Steven Bosscher <stevenb@suse.de>
  2728. * cp-tree.h (struct lang_decl_flags): Unify the template_info and
  2729. thunk_alias, and the access and virtual_offset fields.
  2730. (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
  2731. * decl.c (finish_case_label): Update c_add_case_node call.
  2732. 2004-07-19 Mark Mitchell <mark@codesourcery.com>
  2733. Revert patch for PR c++/16623.
  2734. 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
  2735. * except.c: Remove two spurious carriage returns.
  2736. 2004-07-19 Mark Mitchell <mark@codesourcery.com>
  2737. PR c++/16623
  2738. * cp-tree.h (lang_type_class): Add lazy_assignment_op.
  2739. (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
  2740. * class.c (add_implicitly_declared_members): Use
  2741. CLASSTYPE_LAZY_ASSIGNMENT_OP.
  2742. * method.c (lazily_declare_fn): Clear
  2743. CLASSTYPE_LAZY_ASSIGNMENT_OP.
  2744. * search.c (lookup_fnfields_1): Check it.
  2745. 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
  2746. * class.c (add_method): Delay adding the slot until the end.
  2747. (determine_primary_base): Adjust VEC_iterate invokation.
  2748. (resort_type_method_vec, finish_struct_methods, warn_hidden,
  2749. walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
  2750. build_vtbl_initializer): Likewise.
  2751. * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
  2752. build_vbase_delete): Likewise.
  2753. * method.c (do_build_copy_constructor): Likewise.
  2754. * name-lookup.c (new_class_binding, print_binding_level,
  2755. poplevel_class, store_class_bindings, push_to_top_level,
  2756. pop_from_top_level): Likewise.
  2757. * pt.c (check_explicit_specialization): Likewise.
  2758. * search.c (lookup_conversion_operator, lookup_fnfields_1,
  2759. get_pure_virtuals, add_conversions, dfs_check_overlap,
  2760. binfo_for_vbase): Likewise.
  2761. 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2762. PR c++/12170
  2763. * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
  2764. innermost set of template arguments during deduction. Simplify.
  2765. 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
  2766. * typeck.c (build_modify_expr, build_x_modify_expr): Set
  2767. TREE_NO_WARNING on assignments with an operator other than '='.
  2768. 2004-07-10 Steven Bosscher <stevenb@suse.de>
  2769. Joseph S. Myers <jsm@polyomino.org.uk>
  2770. * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
  2771. * decl2.c (grokfield): Don't check current_class_depth via
  2772. unused TREE_COMPLEXITY.
  2773. * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
  2774. to avoid the missing parentheses warning.
  2775. Don't set C_SET_EXP_ORIGINAL_CODE.
  2776. 2004-07-18 Mark Mitchell <mark@codesourcery.com>
  2777. * tree.c (no_linkage_helper): Remove.
  2778. (no_linkage_check): Don't use walk_tree_without_duplicates.
  2779. * mangle.c (write_expression): Issue a sorry for zero-operand
  2780. functional casts.
  2781. 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2782. PR c++/13092
  2783. * init.c (build_offset_ref): Build SCOPE_REF with non-null
  2784. TREE_TYPE for non-dependent names.
  2785. * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
  2786. * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
  2787. unknown_type_node as its TREE_TYPE.
  2788. * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
  2789. * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
  2790. (dump_expr) <SCOPE_REF case>: Likewise.
  2791. 2004-07-17 Jason Merrill <jason@redhat.com>
  2792. PR c++/16115
  2793. * call.c (type_passed_as): Make the invisible reference type
  2794. __restrict.
  2795. * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
  2796. cp_genericize_r. Handle invisible reference lowering.
  2797. (is_invisiref_parm): New fn.
  2798. (cp_genericize): Adjust the types of invisible reference parms.
  2799. Don't repeat the walk for clones.
  2800. * decl.c (store_parm_decls): Don't generate any code for clones.
  2801. 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
  2802. * cp-tree.h (builtin_function): Declare.
  2803. 2004-07-16 Mark Mitchell <mark@codesourcery.com>
  2804. * class.c (finish_struct_methods): Remove unncessary code.
  2805. (add_implicitly_declared_members): Create declarations for default
  2806. constructors and copy constructors lazily.
  2807. * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
  2808. lazy_copy_ctor.
  2809. (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
  2810. (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
  2811. * decl2.c (check_classfn): Robustify.
  2812. (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
  2813. (locate_ctor): Handle lazy default constructors.
  2814. (locate_copy): Handle lazy copy constructors.
  2815. (implicitly_declare_fn): Make sure we're looking at the
  2816. TYPE_MAIN_VARIANT for a class before creating functions. Don't
  2817. set TYPE_HAS_CONSTRUCTOR.
  2818. (lazily_declare_fn): New function.
  2819. * name-lookup.c (constructor_name_full): Simplify.
  2820. * search.c (lookup_fnfields_1): Lazily create methods, as
  2821. necessary.
  2822. (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
  2823. 2004-07-16 Steven Bosscher <stevenb@suse.de>
  2824. * cp-tree.h (struct lang_type): Don't have three GTY options on a
  2825. single bit GTY desc.
  2826. 2004-07-16 Richard Henderson <rth@redhat.com>
  2827. * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
  2828. * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
  2829. * tree.c (cp_copy_res_decl_for_inlining): Remove.
  2830. 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
  2831. * class.c (finish_struct_bits): Use for loop.
  2832. (propagate_binfo_offsets): Do primary binfo outside of loop.
  2833. PR c++/16583
  2834. * dump.c (cp_dump_tree): Don't dump the bases if there's no
  2835. binfo.
  2836. * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
  2837. 2004-07-15 Mark Mitchell <mark@codesourcery.com>
  2838. * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
  2839. has_abstract_assign_ref. Make methods a VEC(tree) *.
  2840. (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
  2841. (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
  2842. (CLASSTYPE_DESTRUCTORS): Likewise.
  2843. (TYPE_HAS_REAL_ASSIGN_REF): Remove.
  2844. (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
  2845. (add_method): Change prototoype.
  2846. * class.c (add_method): Remove error_p parameter. Adjust for
  2847. changes to CLASSTYPE_METHOD_VEC.
  2848. (handle_using_decl): Adjust call to add_method.
  2849. (maybe_warn_about_overly_private_class): Adjust for
  2850. changes to CLASSTYPE_METHOD_VEC.
  2851. (resort_type_method_vec): Likewise.
  2852. (finish_struct_methods): Likewise.
  2853. (check_for_override): Likewise.
  2854. (warn_hidden): Likewise.
  2855. (add_implicitly_declared_members): Defer creation of assignment
  2856. operators. Adjust call to add_method.
  2857. (clone_function_decl): Adjust call to add_method.
  2858. (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
  2859. (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
  2860. * decl.c (grok_special_member_properties): Don't set
  2861. TYPE_HAS_ABSTRACT_ASSIGN_REF.
  2862. * decl2.c (check_classfn): Adjust for
  2863. changes to CLASSTYPE_METHOD_VEC.
  2864. * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
  2865. (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
  2866. (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
  2867. (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
  2868. cp_finish_decl.
  2869. * pt.c (check_explicit_specialization): Adjust for
  2870. changes to CLASSTYPE_METHOD_VEC.
  2871. (instantiate_class_template): Do not set
  2872. TYPE_HAS_ABSTRACT_ASSIGN_REF.
  2873. * ptree.c (cxx_print_type): Don't try to print
  2874. CLASSTYPE_METHOD_VEC.
  2875. * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
  2876. * search.c (lookup_field_r): Adjust for
  2877. changes to CLASSTYPE_METHOD_VEC.
  2878. (lookup_fnfields): Likewise.
  2879. (lookup_conversion_operator): Likewise.
  2880. (lookup_fnfields_1): Likewise. Create assignment operators
  2881. lazily.
  2882. (look_for_overrides_here): Adjust for
  2883. changes to CLASSTYPE_METHOD_VEC.
  2884. (add_conversions): Likewise.
  2885. * semantics.c (finish_member_declaration): Adjust call to add_method.
  2886. 2004-07-15 Jason Merrill <jason@redhat.com>
  2887. * cp-lang.c (cxx_types_compatible_p): To the middle-end,
  2888. references and pointers are compatible.
  2889. 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
  2890. * decl.c (xref_basetypes): Refactor.
  2891. * tree.c (copy_base_binfos): Replace with ...
  2892. (copy_binfo): ... this. Deep copy the given binfo, (not the just
  2893. bases of the given base).
  2894. * cp-tree.h (copy_base_binfo): Remove.
  2895. (copy_binfo): Declare.
  2896. 2004-07-15 Mark Mitchell <mark@codesourcery.com>
  2897. * name-lookup.c (set_inherited_value_binding_p): Add class_type
  2898. parameter.
  2899. (get_class_binding): Adjust.
  2900. (push_class_level_binding): Don't use set_inherited_value_binding_p.
  2901. 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
  2902. * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
  2903. * decl.c (xref_basetypes): Set it here.
  2904. * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
  2905. Don't check for incomplete base.
  2906. (get_vfield_name): Simplify while loop.
  2907. * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
  2908. 2004-07-14 Mark Mitchell <mark@codesourcery.com>
  2909. * lex.c (cxx_make_type): Remove call to get_pointer_type.
  2910. * cp-tree.h (IDENTIFIER_VALUE): Remove.
  2911. (BINFO_PUSHDECLS_MARKED): Likewise.
  2912. (maybe_inject_for_scope_var): Likewise.
  2913. (push_class_decls): Likewise.
  2914. * name-lookup.h (push_class_binding): Remove.
  2915. (innermost_non_namespace_value): New function.
  2916. (outer_binding): Likewise.
  2917. * class.c (add_method): Push bindings before adding to
  2918. TYPE_METHODS.
  2919. (restore_class_cache): Do not restore class_shadowed.
  2920. (pushclass): Do not add USING_DECLs. Do not call
  2921. push_class_decls.
  2922. * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
  2923. * decl.c (pushdecl): Use outer_binding.
  2924. (poplevel): Set the scope for an out-of-scope for-loop declaration
  2925. appropriately.
  2926. (cp_finish_decl): Don't call maybe_inject_for_scope_var.
  2927. * name-lookup.c (new_class_binding): New function.
  2928. (push_binding): Use it.
  2929. (pushdecl): Use innermost_non_namespace_value.
  2930. (maybe_inject_for_scope_var): Remove.
  2931. (push_class_binding): Remove.
  2932. (set_inherited_value_binding_p): New function.
  2933. (get_class_binding): New function.
  2934. (push_class_level_binding): Assert that the current_class_type is
  2935. being defined.
  2936. (outer_binding): New function.
  2937. (innermost_non_namespace_value): Likewise.
  2938. (lookup_name_real): Use outer_binding.
  2939. (lookup_name_current_level): Ignore out-of-scope variables.
  2940. * pt.c (check_template_shadow): Use innermost_non_namespace_value.
  2941. (lookup_template_class): Likewise.
  2942. * search.c (dfs_push_type_decls): Remove.
  2943. (dfs_push_decls): Likewise.
  2944. (setup_class_bindings): Likewise.
  2945. (lookup_field_1): Handle USING_DECLs from dependent scopes.
  2946. (marked_pushdecls_p): Remove.
  2947. (unmarked_pushdecls_p): Remove.
  2948. (marked_identifiers): Remove.
  2949. (setup_class_bindings): Remove.
  2950. (dfs_push_type_decls): Remove.
  2951. (dfs_push_decls): Remove.
  2952. (push_class_decls): Remove.
  2953. 2004-07-13 Mark Mitchell <mark@codesourcery.com>
  2954. PR c++/16518
  2955. PR c++/16337
  2956. * decl.c (grokvardecl): Make declspecs parameter const.
  2957. (grokdeclarator): Likewise. Adjust accordingly.
  2958. * decl.h (grokdeclarator): Adjust declaration.
  2959. * parser.c (cp_parser_init_declarator): Do not clear
  2960. decl_specifiers->attributes.
  2961. * cp-tree.h (lang_identifier): Remove class_value.
  2962. (IDENTIFIER_CLASS_VALUE): Remove.
  2963. (pop_class_decls): Likewise.
  2964. (init_search_processing): Likewise.
  2965. * class.c (handle_using_decl): Use lookup_member, not
  2966. IDENTIFIER_CLASS_VALUE.
  2967. (restore_class_cache): New function, split out from ...
  2968. (pushclass): ... here. Do not call clear_identifier_class_values.
  2969. (invalidate_class_lookup_cache): Do not clear
  2970. IDENTIFIER_CLASS_VALUE.
  2971. (popclass): Do not call pop_class_decls.
  2972. (maybe_note_name_used_in_class): Do not save names looked up after
  2973. the class is complete. Use lookup_member, not
  2974. IDENTIFIER_CLASS_VALUE.
  2975. * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
  2976. * decl.c (cxx_init_decl_processing): Do not call
  2977. init_search_processing.
  2978. * method.c (do_build_copy_constructor): Remove unnecessary code.
  2979. (do_build_assign_ref): Likewise.
  2980. * name-lookup.c (pushdecl): Use lookup_member, not
  2981. IDENTIFIER_CLASS_VALUE.
  2982. (set_identifier_type_value_with_scope): Set TREE_TYPE on the
  2983. type_shadowed list.
  2984. (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
  2985. (push_class_binding): Do not set it.
  2986. (clear_identifier_class_values): Remove.
  2987. (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
  2988. (store_binding): Do not save it.
  2989. (pop_from_top_level): Do not restore it.
  2990. * name-lookup.h (cxx_saved_binding): Remove class_value.
  2991. (clear_identifier_class_values): Remove.
  2992. * ptree.c (cxx_print_identifier): Do not print
  2993. IDENTIFIER_CLASS_VALUE.
  2994. * search.c (search_obstack): Remove.
  2995. (push_stack_level): Remove.
  2996. (pop_stack_level): Remove.
  2997. (search_level): Remove.
  2998. (search_stack): Remove.
  2999. (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
  3000. (setup_class_bindings): Use IDENTIFIER_MARKED, not
  3001. IDENTIFIER_CLASS_VALUE.
  3002. (marked_identifiers): New variable.
  3003. (push_class_decls): Clear IDENTIFIER_MARKED.
  3004. (pop_class_decls): Don't call pop_search_level.
  3005. (init_search_processing): Remove.
  3006. 2004-07-12 Mark Mitchell <mark@codesourcery.com>
  3007. * cp-tree.h (get_aggr_typedef): Remove.
  3008. * init.c (get_aggr_typedef): Likewise.
  3009. * name-lookup.c (push_class_level_binding): Simplify.
  3010. 2004-07-12 Andrew Pinski <apinski@apple.com>
  3011. PR c++/16475
  3012. Revert:
  3013. 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
  3014. PR c++/16276
  3015. * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
  3016. is not public.
  3017. 2004-07-12 Eric Christopher <echristo@redhat.com>
  3018. * parser.c (cp_parser_class_head): Remove unused variable.
  3019. 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3020. * decl.c (grok_op_properties): Reject [de-]allocation functions
  3021. declared in a namespace, or declared as static.
  3022. 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
  3023. * cp-tree.h (make_binfo): Remove.
  3024. * decl.c (xref_basetypes): Use make_tree_binfo directly.
  3025. * tree.h (copy_base_binfos): Likewise.
  3026. (make_binfo): Remove.
  3027. * call.c (build_user_type_conversion_1, build_new_op,
  3028. check_constructor_callable, build_temp,
  3029. perform_direct_initialization_of_possible): Pass type directly to
  3030. lookup_fnfields & build_special_member_call.
  3031. (build_special_member_call): Accept a type, and complete it.
  3032. * class.c (finish_stuct_bits): Copy the BINFOs here.
  3033. * cvt.c (ocp_convert): Pass type directly to
  3034. build_special_member_call.
  3035. * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
  3036. (xref_basetypes): Allocate the binfo here. Adjust.
  3037. * init.c (build_init, build_new_1): Pass type directly to
  3038. build_special_member_call.
  3039. * lex.c (cxx_make_type): Do not allocate binfo here.
  3040. * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
  3041. * parser.c (cp_parser_class_head): Always call xref_basetypes.
  3042. * pt.c (instantiate_class_template): Likewise. Inhibit access
  3043. checking for template friends.
  3044. * ptree.c (cxx_print_type): Adjust record printing.
  3045. * search.c (lookup_base): When taking a type, complete it before
  3046. looking for a binfo.
  3047. (lookup_member): Delay completing a type.
  3048. (push_class_decls): Don't walk an incomplete type.
  3049. (lookup_conversions): Likewise.
  3050. * semantics.c (finish_stmt_expr_expr): Pass type directly to
  3051. build_special_member_call.
  3052. * tree.c (copy_base_binfos): Adjust.
  3053. (make_binfo): Likewise.
  3054. * typeck.c (build_modify_expr): Pass type directly to
  3055. build_special_member_call.
  3056. * typeck2.c (process_init_constructor): Check a binfo exists.
  3057. (build_m_component_ref): Allow accessing an incomplete type.
  3058. (build_functional_cast): Pass type directly to
  3059. build_special_member_call.
  3060. 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3061. PR c++/2204
  3062. * config-lang.in (gtfiles): Add typeck2.c.
  3063. * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
  3064. gt-cp-typeck2.h.
  3065. * cp-tree.h: Declare complete_type_check_abstract.
  3066. * typeck2.c (pat_calc_hash, pat_compare,
  3067. complete_type_check_abstract): New functions.
  3068. (abstract_virtuals_error): If the type is abstract, register the
  3069. declaration within abstract_pending_vars for further checks.
  3070. Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
  3071. * decl.c (cp_finish_decl): Do not strip array types.
  3072. (create_array_type_for_decl): Check for abstractness of the element
  3073. type.
  3074. (complete_vars): Call complete_type_check_abstract.
  3075. * class.c (finish_struct): Prepare a list of virtual functions for
  3076. template types, and call complete_vars on it to check for abstractness.
  3077. 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
  3078. PR tree-optimization/14107
  3079. * decl.c (finish_function): Remove temporary band-aid.
  3080. 2004-07-11 Mark Mitchell <mark@codesourcery.com>
  3081. * call.c (build_operator_new_call): Avoid using push_to_top_level.
  3082. (build_new_op): Adjust call to lookup_function_nonclass.
  3083. * name-lookup.c (identifier_type_value): Adjust call to
  3084. lookup_name_real.
  3085. (lookup_name_real): Add block_p parameter.
  3086. (lookup_name_nonclass): Adjust call to lookup_name_real.
  3087. (lookup_function_nonclass): Likewise.
  3088. (lookup_name): Likewise.
  3089. * name-lookup.h (lookup_name_real): Change prototype.
  3090. (lookup_name_nonclass): Likewise.
  3091. * parser.c (cp_parser_lookup_name): Likewise.
  3092. * cp-tree.h (saved_scope): Make old_bindings a vector.
  3093. (unuse_fields): Remove.
  3094. * name-lookup.h (cxx_saved_binding): Define it.
  3095. * class.c (pushclass): Don't use unuse_fields.
  3096. * name-lookup.c (cxx_saved_binding_make): Remove.
  3097. (store_binding): Add new bindings to a vector, using an
  3098. accumulator style, rather than adding them to a list.
  3099. (store_bindings): Adjust accordingly.
  3100. (store_class_bindings): Likewise.
  3101. (push_to_top_level): Likewise.
  3102. (pop_from_top_level): Likewise.
  3103. * optimize.c (maybe_clone_body): Must push_to_top_level and
  3104. pop_from_top_level calls outside of loop.
  3105. * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
  3106. calls here from cp_parser_late_parsing_default_args.
  3107. (cp_parser_save_default_args): Record the class type in which the
  3108. function is declared.
  3109. (cp_parser_late_parsing_default_args): Do not call
  3110. push_nested_class/pop_nested_class.
  3111. * search.c (dfs_unuse_fields): Remove.
  3112. (unuse_fields): Remove.
  3113. 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
  3114. * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
  3115. LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
  3116. * cp-tree.h (poplevel): Declare.
  3117. (set_block): Remove.
  3118. * decl.c (set_block): Remove.
  3119. 2004-07-10 Mike Stump <mrs@apple.com>
  3120. * decl2.c (import_export_class): Never export/import vtables
  3121. with inline key functions.
  3122. 2004-07-09 Steven Bosscher <stevenb@suse.de>
  3123. * typeck.c (c_expand_asm_operands): Remove.
  3124. 2004-07-09 Mike Stump <mrs@apple.com>
  3125. * typeck.c (build_class_member_access_expr): Skip null deref
  3126. warning when we don't dereference it.
  3127. 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3128. PR c++/8211
  3129. PR c++/16165
  3130. * class.c (check_field_decls): Improve -Weffc++ warning: do not
  3131. warn for pointers to functions/members, or for classes without
  3132. destructors.
  3133. 2004-07-08 Mark Mitchell <mark@codesourcery.com>
  3134. * name-lookup.h (struct cp_binding_level): Update documentation
  3135. for class_shadowed.
  3136. 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3137. PR c++/16169
  3138. * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
  3139. returning CALL_EXPR, and non-reference return type.
  3140. 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
  3141. * name-lookup.c (push_binding): Use VEC_reserve.
  3142. 2004-07-08 Richard Henderson <rth@redhat.com>
  3143. * cp-tree.h (expand_eh_spec_block): Remove.
  3144. 2004-07-07 Mark Mitchell <mark@codesourcery.com>
  3145. * cp-tree.h (saved_scope): Remove x_previous_class_type and
  3146. x_previous_class_values; add x_previous_class_level.
  3147. (previous_class_type): Remove.
  3148. (previous_class_values): Remove.
  3149. (previous_class_level): New macro.
  3150. * class.c (pushclass): Restore the identifier cache more
  3151. expeditiously.
  3152. (invalidate_class_lookup_cache): Use vector for class_shadowed and
  3153. previous_class_values.
  3154. * decl.c (poplevel): Likewise.
  3155. * name-lookup.c (cxx_binding_init): New function.
  3156. (cxx_binding_make): Use it.
  3157. (push_binding): For a binding in a class level, use a vector of
  3158. cp_class_binding nodes.
  3159. (push_binding_level): New function.
  3160. (begin_scope): Use it.
  3161. (leave_scope): Do not put class binding levels on the free list.
  3162. (print_binding_level): Adjust for the fact that class_shadowed is
  3163. a vector.
  3164. (poplevel_class): Likewise.
  3165. (clear_identifier_class_values): Likewise.
  3166. (push_class_level_binding): Likewise.
  3167. (set_class_shadows): Remove.
  3168. (store_binding): New function.
  3169. (store_class_bindings): New function.
  3170. (push_to_top_level): Use store_class_bindings as appropriate.
  3171. (pop_from_top_level): Use previous_class_level, not
  3172. previous_class_type.
  3173. * name-lookup.h (cp_class_binding): New type.
  3174. (cp_binding_level): Use a vector object for class_shadowed.
  3175. (push_binding_level): Declare.
  3176. (set_class_shadows): Remove.
  3177. 2004-07-07 Andrew Pinski <apinski@apple.com>
  3178. * class.c (instantiate_type): BUFFER_REF is dead.
  3179. * lex.c (init_operators): IN_EXPR is dead.
  3180. 2004-07-07 Jason Merrill <jason@redhat.com>
  3181. PR c++/16334
  3182. * call.c (build_new_op): Give overload warnings for built-in
  3183. candidates.
  3184. 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
  3185. PR c++/16276
  3186. * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
  3187. is not public.
  3188. 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
  3189. * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
  3190. * class.c (build_primary_vtable, check_bases,
  3191. determine_primary_base, finish_struct_bits,
  3192. maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
  3193. get_basefndecls, warn_hidden, walk_subobject_offsets,
  3194. build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
  3195. layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
  3196. finish_struct_1, get_vfield_name, contains_empty_class_p,
  3197. dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
  3198. dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
  3199. add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
  3200. BINFO macros.
  3201. * decl.c (xref_basetypes): Likewise.
  3202. * dump.c (cp_dump_tree): Likewise.
  3203. * error.c (dump_expr): Likewise.
  3204. * init.c (sort_mem_initializers, expand_member_init,
  3205. push_base_cleanups): Likewise.
  3206. * method.c (do_build_copy_constructor, do_build_assign_reg,
  3207. synthesize_exception_spec): Likewise.
  3208. * name-lookup.c (arg_assoc_class): Likewise.
  3209. * pt.c (instantiate_class_template, tsubst,
  3210. get_template_base_recursive): Likewise.
  3211. * ptree.c (cxx_print_type): Likewise.
  3212. * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
  3213. * search.c (lookup_base_r, dynamic_cast_base_recurse,
  3214. dfs_access_in_type, access_in_type, lookup_field_queue_p,
  3215. bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
  3216. marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
  3217. dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
  3218. binfo_for_vtable, copied_binfo, original_binfo): Likewise
  3219. * tree.c (copy_base_binfos, make_binfo): Likewise.
  3220. * typeck.c (commmon_base_type): Likewise
  3221. * typeck2.c (process_init_constructor): Likewise
  3222. 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
  3223. * decl.c (check_tag_decl): Name redeclared type in diagnostic.
  3224. 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3225. PR c++/3671
  3226. * pt.c (convert_nontype_argument): Disallow conversions between
  3227. different enumeration types.
  3228. 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
  3229. * cp-tree.h (BINFO_MARKED): Remove.
  3230. (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
  3231. BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
  3232. BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
  3233. (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
  3234. * class.c (build_base_path): Use BINFO_VIRTUAL_P.
  3235. (mark_primary_bases, determine_primary_base, base_derived_from,
  3236. dfs_find_final_overrider, dfs_find_final_overrider_q,
  3237. dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
  3238. dfs_modify_vtables, walk_subobject_offsets,
  3239. layout_nonempty_base_or_field, build_base_field,
  3240. build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
  3241. end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
  3242. finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
  3243. build_ctor_vtbl_group, accumulate_vtble_inits,
  3244. dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
  3245. build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
  3246. add_vcall_offset_vtbl_entries_1): Likewise.
  3247. * decl.c (xref_basetypes): Incoming virtual base indicated by
  3248. TREE_TYPE. Adjust.
  3249. * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
  3250. * init.c (finish_init_stmts, sort_mem_initializers,
  3251. emit_mem_initializers, build_vtble_address, expand_member_init,
  3252. push_base_cleanups): Likewise.
  3253. * method.c (do_build_copy_constructor): Likewise.
  3254. * pt.c (instantiate_class_template,
  3255. get_template_base_recursive): Likewise.
  3256. * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
  3257. get_pseudo_ti_desc): Likewise.
  3258. * search.c (lookup_base_r, dynamic_cast_base_recurse,
  3259. binfo_from_vbase, binfo_via_virtual, copied_binfo,
  3260. original_binfo): Likewise.
  3261. * semantics.c (finish_base_specifier): Virtualness is indicated
  3262. by TREE_TYPE.
  3263. * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
  3264. 2004-07-06 Mark Mitchell <mark@codesourcery.com>
  3265. Revert:
  3266. 2004-06-24 Jason Merrill <jason@redhat.com>
  3267. PR c++/16115
  3268. * decl.c (grokparms): Give the PARM_DECL reference type if the
  3269. parameter is passed by invisible reference.
  3270. 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  3271. * cp-lang.c (cp_var_mod_type_p): Add extra arg.
  3272. * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
  3273. * pt.c (check_instantiated_args, unify): Likewise.
  3274. 2004-07-05 Phil Edwards <phil@codesourcery.com>
  3275. * Make-lang.in (check-c++, lang_checks): Add some comments.
  3276. 2004-07-05 Zack Weinberg <zack@codesourcery.com>
  3277. * cp-mudflap.c: Delete file.
  3278. * Makefile.in: Remove all references to cp-mudflap.o.
  3279. 2004-07-05 Zack Weinberg <zack@codesourcery.com>
  3280. * decl.c (cxx_init_decl_processing): Call
  3281. build_common_tree_nodes before creating the global NAMESPACE_DECL.
  3282. 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3283. PR c++/2518
  3284. * call.c (build_operator_new_call): Look only at global scope.
  3285. 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
  3286. * call.c (enforce_access): Expect TREE_BINFO.
  3287. * class.c (binfo_ctor_vtable): Check TREE_BINFO.
  3288. * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
  3289. (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
  3290. Adjust.
  3291. (BINFO_LANG_ELTS): Remove.
  3292. (BINFO_LANG_SLOTS): New.
  3293. (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
  3294. (CLASSTYPE_TEMPLATE_INFO): Adjust.
  3295. * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
  3296. * search.c (lookup_member): Check TREE_BINFO.
  3297. * semantics.c (perform_or_defer_access_check): Likewise.
  3298. (check_accessibility_of_qualified_id): Check
  3299. deferred_access_no_check.
  3300. * tree.c (make_binfo): Use make_tree_binfo.
  3301. 2004-07-04 Mark Mitchell <mark@codesourcery.com>
  3302. * method.c (implicitly_declare_fn): Set linkage of generated
  3303. functions.
  3304. 2004-07-04 Richard Henderson <rth@redhat.com>
  3305. * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
  3306. 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
  3307. PR c++/3761
  3308. * name-lookup.c (push_class_level_binding): Don't pass a
  3309. TREE_LIST of ambiguous names to check_template_shadow as it
  3310. only handles declarations. Instead, pull the declaration
  3311. out and pass that.
  3312. 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3313. PR c++/14971
  3314. * pt.c (check_explicit_specialization): Clarify error message.
  3315. 2004-07-02 Richard Henderson <rth@redhat.com>
  3316. * tree.c (cp_unsave_r): Update remap_save_expr call.
  3317. 2004-07-02 Mark Mitchell <mark@codesourcery.com>
  3318. PR c++/16240
  3319. * mangle.c (write_template_arg): Correct mangling.
  3320. PR c++/16297
  3321. * decl.c (grokdeclarator): Robustify.
  3322. 2004-07-01 Richard Henderson <rth@redhat.com>
  3323. * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
  3324. * method.c (synthesize_method): Don't clear_last_expr.
  3325. * name-lookup.c (maybe_push_cleanup_level): Likewise.
  3326. 2004-07-01 Nick Clifton <nickc@redhat.com>
  3327. * decl2.c (import_export_class): Invoke the
  3328. import_export_class field in the gcc_target structure if it is not
  3329. empty.
  3330. 2004-06-30 Richard Henderson (rth@redhat.com>
  3331. * decl.c (start_preparsed_function): Don't set immediate_size_expand.
  3332. * method.c (use_thunk): Likewise.
  3333. 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
  3334. * call.c (build_over_call), typeck.c (build_function_call): Call
  3335. check_function_arguments instead of check_function_format.
  3336. 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
  3337. * call.c (build_over_call), typeck.c (build_function_call): Update
  3338. calls to check_function_format.
  3339. 2004-06-30 Richard Henderson <rth@redhat.com>
  3340. * call.c (build_over_call): Use __builtin_memcpy for copying
  3341. CLASS_AS_BASE rather than funny casting.
  3342. 2004-06-30 Richard Henderson <rth@redhat.com>
  3343. * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
  3344. TYPE_SIZE_UNIT of full_type.
  3345. 2004-06-30 Per Bothner <per@bothner.com>
  3346. Conditionally compile support for --enable-mapped_location.
  3347. * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
  3348. * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
  3349. adjustments - which I don't understand.
  3350. * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
  3351. * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
  3352. (print_instantiation_partial_context): Use expand_location.
  3353. * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
  3354. * name-lookup.c: Likewise.
  3355. * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
  3356. * name-lookup.c: Use input_line macro.
  3357. * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
  3358. (cp_parser_statement): Rename locaal variable statement_locus to
  3359. statement_location and use SET_EXPR_LOCATION macro.
  3360. * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
  3361. * tree.c (cp_walk_subtrees): Likewise.
  3362. 2004-06-29 Per Bothner <per@bothner.com>
  3363. * tree.c (build_min_nt, build_min, build_min_non_dep):
  3364. Don't set TREE_COMPLEXITY from input_line.
  3365. 2004-06-29 Paul Brook <paul@codesourcery.com>
  3366. * init.c: Include target.h.
  3367. (get_cookie_size): Remove and replace with target hook.
  3368. Update callers.
  3369. (build_new_1): Store the element size in the cookie.
  3370. 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
  3371. PR c++/16260
  3372. * parser.c (cp_parser_template_declaration_after_export): Disable
  3373. access checks here ...
  3374. (cp_parser_class_specifier): ... not here.
  3375. 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
  3376. * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
  3377. VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
  3378. BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
  3379. TREE_CHECK macro.
  3380. 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
  3381. * cp-tree.h (struct deferred_access): Move to ...
  3382. * semantics.c (struct deferred_access): ... here. Adjust.
  3383. (deferred_access_stack): Make a VEC(deferred_access),
  3384. (deferred_access_free_list): Remove.
  3385. (deferred_access_no_check): New.
  3386. (push_deferring_access_checks, resume_deferring_access_checks,
  3387. stop_deferring_access_checks, pop_deferring_access_checks,
  3388. get_deferred_access_checks, pop_to_parent_deferring_access_checks,
  3389. perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
  3390. 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
  3391. PR c++/16174
  3392. * call.c (build_temp): Declare.
  3393. (check_constructor_callable): New.
  3394. (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
  3395. CONSTRUCTOR_CALLABLE.
  3396. (convert_like_real, initialize_reference): Use
  3397. check_constructor_callable.
  3398. * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
  3399. (LOOKUP_*): Renumber.
  3400. 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
  3401. * friend.c (add_friend): Only perform access checks when context
  3402. is a class.
  3403. * lex.c (cxx_make_type): Only create a binfo for aggregate types.
  3404. * parser.c (cp_parser_class_specifier): Disable access checks here
  3405. when parsing the body of a templated class.
  3406. * semantics.c (perform_or_defer_access_checks): Reorder to allow
  3407. NULL binfos when not checking access.
  3408. 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
  3409. Use vector API for vbase list.
  3410. * cp-tree.h: Include vec.h
  3411. (DEF_VEC_P (tree)): New type.
  3412. (struct lang_type_class): Change vbase's member type.
  3413. (binfo_for_vbase): Declare.
  3414. * class.c (determine_primary_base, base_derived_from,
  3415. update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
  3416. warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
  3417. build_vtbl_initializer): Adjust.
  3418. * decl.c (xref_basetypes): Adjust, accumulate upper bound of
  3419. vbases.
  3420. * init.c (sort_mem_initializers, expand_member_init,
  3421. push_base_cleanups): Adjust.
  3422. * method.c (do_build_copy_constructor): Adjust.
  3423. * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
  3424. (binfo_for_vbase): New.
  3425. * tree.c (copy_base_binfos): Adjust.
  3426. 2004-06-28 Mark Mitchell <mark@codesourcery.com>
  3427. * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
  3428. 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3429. PR c++/14123
  3430. * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
  3431. paranthesis in case of pointers to array members.
  3432. * error.c (dump_type_prefix): Likewise.
  3433. (dump_type_suffix): Maybe issue a whitespace when printing
  3434. ARRAY_TYPE.
  3435. 2004-06-27 Mark Mitchell <mark@codesourcery.com>
  3436. PR c++/16193
  3437. * parser.c (cp_parser_set_decl_spec_type): Refine test for
  3438. redefinition of built-in types.
  3439. 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3440. * error.c (pp_template_argument_list_start): Remove.
  3441. (pp_template_argument_list_end): Likewise.
  3442. (pp_separate_with_comma): Use pp_cxx_separate_with.
  3443. (reinit_global_formatting_buffer): Remove.
  3444. (pp_non_consecutive_character): Likewise.
  3445. (dump_scope): Use pp_cxx_colon_colon.
  3446. (dump_template_parameter): Use pp_cxx_identifier,
  3447. pp_cxx_tree_identifier and pp_cxx_whitespace.
  3448. (dump_templat_bindings): Replace use of pp_string with sequence
  3449. of pp_cxx_whitespace and pp_equal.
  3450. (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
  3451. pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
  3452. padding here.
  3453. (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
  3454. (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
  3455. pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
  3456. (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
  3457. pp_cxx_right_bracket, pp_cxx_identifier throughout,
  3458. (dump_decl): Likewise.
  3459. (dump_template_decl): Likewise.
  3460. (dump_function_decl): Likewise. Set padding as appropriate.
  3461. (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
  3462. pp_cxx_right_paren.
  3463. (dump_exception_spec): Likewise.
  3464. (dump_function_name): Use pp_cxx_tree_identifier and
  3465. pp_cxx_identifier.
  3466. (dump_template_parms): Use pp_cxx_begin_template_argument_list and
  3467. pp_cxx_end_template_argument_list.
  3468. (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
  3469. pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
  3470. pp_cxx_whitespace throughout.
  3471. (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
  3472. pp_cxx_right_paren.
  3473. (dump_unary_op): Likewise.
  3474. (reinit_cxx_pp): New function.
  3475. (type_as_string); Use it.
  3476. (expr_as_string): Likewise.
  3477. (decl_as_string); Likewise.
  3478. (context_as_string): Likewise.
  3479. (lang_decl_name): Likewise.
  3480. (decl_to_string): Likewise.
  3481. (expr_to_string): Likewise.
  3482. (parm_to_string): Likewise.
  3483. (type_to_string): Likewise.
  3484. (args_to_string): Likewise.
  3485. (cv_to_string): Likewise.
  3486. 2004-06-26 Mark Mitchell <mark@codesourcery.com>
  3487. * cp-tree.h (cp_cv_quals): New type.
  3488. (cp_declarator): Use it instead of "tree" as appropriate.
  3489. (grok_method_quals): Adjust prototype.
  3490. (grokclassfn): Likewise.
  3491. (do_friend): Likewise.
  3492. * decl.c (grokfndecl): Use cp_cv_quals, not tree.
  3493. (grokdeclarator): Likewise.
  3494. * decl2.c (grok_method_quals): Likewise.
  3495. (grokclassfn): Likewise.
  3496. * friend.c (do_friend): Likewise.
  3497. * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
  3498. * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
  3499. (make_pointer_declarator): Likewise.
  3500. (make_reference_declarator): Likewise.
  3501. (make_ptrmem_declarator): Likewise.
  3502. (cp_parser_ptr_operator): Likewise.
  3503. (cp_parser_cv_qualifier_seq_opt): Likewise.
  3504. (cp_parser_cv_qualifier_opt): Remove.
  3505. (cp_parser_new_declarator_opt): Adjust call to
  3506. cp_parser_ptr_operator.
  3507. (cp_parser_conversion_declaration_opt): Likewise.
  3508. (cp_parser_declarator): Use cp_cv_quals, not tree.
  3509. (cp_parser_direct_declarator): Likewise.
  3510. 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  3511. * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
  3512. Rename DECL_STMT to DECL_EXPR.
  3513. * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
  3514. * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
  3515. * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
  3516. 2004-06-26 Jan Hubicka <jh@suse.cz>
  3517. PR C++/14865
  3518. * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
  3519. reachability analysis.
  3520. 2004-06-25 Mark Mitchell <mark@codesourcery.com>
  3521. * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
  3522. 2004-06-23 change.
  3523. 2004-06-25 Paul Brook <paul@codesourcery.com>
  3524. * decl2.c (get_guard): Call targetm.cxx.guard_type.
  3525. (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
  3526. 2004-06-24 Mark Mitchell <mark@codesourcery.com>
  3527. * decl.c (grokdeclarator): Restore error messages about __thread.
  3528. * parser.c (cp_parser_decl_specifier_seq): Likewise.
  3529. 2004-06-24 Jason Merrill <jason@redhat.com>
  3530. PR c++/16115
  3531. * decl.c (grokparms): Give the PARM_DECL reference type if the
  3532. parameter is passed by invisible reference.
  3533. 2004-06-24 Andreas Schwab <schwab@suse.de>
  3534. * cp-tree.h (enum cp_storage_class): Remove trailing comma.
  3535. 2004-06-23 Mark Mitchell <mark@codesourcery.com>
  3536. * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
  3537. (cp/decl.o): Likewise.
  3538. (cp/decl2.o): Likewise.
  3539. (cp/pt.o): Likewise.
  3540. (cp/semantics.o): Likewise.
  3541. * config-lang.in (gtfiles): Do not reference cp/lex.h.
  3542. * class.c: Do not include lex.h.
  3543. (add_implicitly_declared_members): Do not use
  3544. adding_implicit_members.
  3545. (check_bases_and_members): Do not talk about grok_x_components.
  3546. * cp/cp-tree.h (adding_implicit_members): Remove.
  3547. (cp_storage_class): New type.
  3548. (cp_decl_spec): Likewise.
  3549. (cp_decl_specifier_seq): Likewise.
  3550. (cp_parameter_declarator): Use it for the decl_specifiers field.
  3551. (check_tag_decl): Adjust prototype.
  3552. (shadow_tag): Likewise.
  3553. (groktypename): Likewise.
  3554. (start_decl): Likewise.
  3555. (start_function): Likewise.
  3556. (start_method): Likewise.
  3557. (grok_x_components): Remove.
  3558. (grokfield): Adjust prototype.
  3559. (grokbitfield): Likewise.
  3560. (finish_member_class_template): Remove.
  3561. * decl.c: Do not include lex.h.
  3562. (adding_implicit_members): Do not define.
  3563. (check_tag_decl): Do not use trees to represent decl-specifiers.
  3564. (shadow_tag): Likewise.
  3565. (groktypename): Likewise.
  3566. (start_decl): Likewise.
  3567. (grokvardecl): Likewise.
  3568. (grokdeclarator): Likewise.
  3569. (grokparms): Likewise.
  3570. (start_function): Likewise.
  3571. (start_method): Likewise.
  3572. * decl.h (grokdeclarator): Adjust prototype.
  3573. * decl2.c: Do not include lex.h.
  3574. (grok_x_components): Remove.
  3575. (grokfield): Do not use trees to represent decl-specifiers.
  3576. (grokbitfield): Likewise.
  3577. * lex.c: Do not include lex.h.
  3578. * lex.h: Remove.
  3579. * parser.c: Include target.h.
  3580. (clear_decl_specs): New function.
  3581. (cp_parser_translation_unit): Do not use trees to represent
  3582. decl-specifiers.
  3583. (cp_parser_postfix_expression): Likewise.
  3584. (cp_parser_new_type_id): Likewise.
  3585. (cp_parser_condition): Likewise.
  3586. (cp_parser_simple_declaration): Likewise.
  3587. (cp_parser_decl_specifier_seq): Likewise.
  3588. (cp_parser_function_specifier_opt): Likewise.
  3589. (cp_parser_conversion_type_id): Likewise.
  3590. (cp_parser_template_parameter): Likewise.
  3591. (cp_parser_explicit_instantiation): Likewise.
  3592. (cp_parser_type_specifier): Likewise.
  3593. (cp_parser_simple_type_specifier): Likewise.
  3594. (cp_parser_init_declarator): Likewise.
  3595. (cp_parser_type_id): Likewise.
  3596. (cp_parser_type_specifier_seq): Likewise.
  3597. (cp_parser_parameter_declaration): Likewise.
  3598. (cp_parser_member_declaration): Likewise.
  3599. (cp_parser_exception_declaration): Likewise.
  3600. (cp_parser_function_definition_from_specifiers_and_declarator):
  3601. Likewise.
  3602. (cp_parser_single_declaration): Likewise.
  3603. (cp_parser_save_member_function_body): Likewise.
  3604. (cp_parser_friend_p): Likewise.
  3605. (cp_parser_set_storage_class): New function.
  3606. (cp_parser_set_decl_spec_type): Likewise.
  3607. * pt.c: Do not include lex.h.
  3608. * semantics.c: Likewise.
  3609. (finish_member_class_template): Remove.
  3610. 2004-06-23 Roger Sayle <roger@eyesopen.com>
  3611. * call.c (build_cxx_call): Don't call expand_tree_builtin. No
  3612. longer take both "args" and "convert_args" as arguments.
  3613. (build_op_delete_call): Update call to build_cxx_call.
  3614. (build_over_call): Likewise, update call to build_cxx_call.
  3615. * cp-tree.h (build_cxx_call): Update funtion prototype.
  3616. * typeck.c (build_function_call): Don't call expand_tree_builtin.
  3617. * rtti.c (throw_bad_cast): Update call to build_cxx_call.
  3618. (throw_bad_typeid): Likewise.
  3619. (build_dynamic_cast_1): Likewise.
  3620. 2004-06-22 Richard Henderson <rth@redhat.com>
  3621. * class.c (build_vfn_ref): Take a pointer not object. Build
  3622. an OBJ_TYPE_REF.
  3623. (cp_fold_obj_type_ref): New.
  3624. * call.c (build_over_call): Update build_vfn_ref call.
  3625. * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
  3626. * cp-tree.h (cp_fold_obj_type_ref): Declare.
  3627. 2004-06-21 Jason Merrill <jason@redhat.com>
  3628. PR c++/16112
  3629. * cp-gimplify.c (cp_gimplify_init_expr): Look through
  3630. CLEANUP_POINT_EXPR.
  3631. 2004-06-21 Mark Mitchell <mark@codesourcery.com>
  3632. * cp-tree.def (NEW_EXPR): Add a fourth slot.
  3633. * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
  3634. (TREE_PARMLIST): Likewise.
  3635. (CALL_DECLARATOR_PARMS): Likewise.
  3636. (CALL_DECLARATOR_QUALS): Likewise.
  3637. (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
  3638. (cp_declarator_kind): New type.
  3639. (cp_parameter_declarator): Likewise.
  3640. (cp_declarator): Likewise.
  3641. (cp_error_declarator): Likewise.
  3642. (no_parameters): Likewise.
  3643. (groktypename): Change prototype.
  3644. (start_decl): Likewise.
  3645. (start_handler_parms): Likewise.
  3646. (get_scope_of_declarator): Likewise.
  3647. (start_function): Likewise.
  3648. (start_preparsed_function): New function.
  3649. (start_function): Change prototype.
  3650. (start_method): Likewise.
  3651. (grokfield): Likewise.
  3652. (grokbitfield): Likewise.
  3653. (build_new): Likewise.
  3654. (make_pointer_declarator): Remove.
  3655. (make_reference_declarator): Likewise.
  3656. (make_call_declarator): Likewise.
  3657. (set_quals_and_spec): Likewise.
  3658. (process_template_parm): Change prototype.
  3659. (begin_function_definition): Remove.
  3660. (finish_parmlist): Remove.
  3661. * decl.c (groktypename): Do not use trees to represent
  3662. declarators.
  3663. (start_decl): Likewise.
  3664. (start_handler_parms): Remove.
  3665. (get_scope_of_declarator): Reimplement.
  3666. (grokdeclarator): Do not use trees to represent declarators.
  3667. (grokparms): Likewise.
  3668. (start_function): Likewise.
  3669. (start_method): Likewise.
  3670. (build_void_list_mode): Do not use TREE_PARMLIST.
  3671. * decl.h (grokdeclarator): Change prototype.
  3672. * decl2.c (grok_method_quals): Robustify.
  3673. (grok_x_components): Do not use trees to represent declarators.
  3674. (grokfield): Likewise.
  3675. (grokbitfield): Likewise.
  3676. (start_objects): Build FUNCTION_DECLs, not declarators.
  3677. (start_static_storage_duration_function): Likewise.
  3678. * init.c (build_new): Simplify.
  3679. * lex.c (make_pointer_declarator): Remove.
  3680. (make_reference_declarator): Likewise.
  3681. (make_call_declarator): Likewise.
  3682. (set_quals_and_spec): Likewise.
  3683. * method.c (use_thunk): Use start_preparsed_function.
  3684. (synthesize_method): Likewise.
  3685. (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
  3686. * optimize.c (maybe_clone_body): Use start_preparsed_function.
  3687. * parser.c (cp_error_declarator): New variable.
  3688. (declarator_obstack): Likewise.
  3689. (alloc_declarator): New function.
  3690. (make_declarator): Likewise.
  3691. (make_id_declarator): Likewise.
  3692. (make_pointer_declarator): Likewise.
  3693. (make_reference_declarator): Likewise.
  3694. (make_ptrmem_declarator): Likewise.
  3695. (make_call_declarator): Likewise.
  3696. (make_array_declarator): Likewise.
  3697. (no_parameters): New variable.
  3698. (make_parameter_declarator): Likewise.
  3699. (cp_parser_check_for_definition_in_return_type): Do not use trees
  3700. to represent declarators.
  3701. (cp_parser_translation_unit): Likewise.
  3702. (cp_parser_new_expression): Likewise.
  3703. (cp_parser_new_type_id): Likewise.
  3704. (cp_parser_new_declarator_opt): Likewise.
  3705. (cp_parser_direct_new_declarator): Likewise.
  3706. (cp_parser_condition): Likewise.
  3707. (cp_parser_declaration_statement): Likewise.
  3708. (cp_parser_declaration): Likewise.
  3709. (cp_parser_conversion_type_id): Likewise.
  3710. (cp_parser_conversion_declarator_opt): Likewise.
  3711. (cp_parser_template_parameter_list): Likewise.
  3712. (cp_parser_template_parameter): Likewise.
  3713. (cp_parser_explicit_instantiation): Likewise.
  3714. (cp_parser_init_declarator): Likewise.
  3715. (cp_parser_declarator): Likewise.
  3716. (cp_parser_direct_declarator): Likewise.
  3717. (cp_parser_type_id): Likewise.
  3718. (cp_parser_parameter_declaration_clause): Likewise.
  3719. (cp_parser_parameter_declaration_list): Likewise.
  3720. (cp_parser_parameter_declaration): Likewise.
  3721. (cp_parser_member_declaration): Likewise.
  3722. (cp_parser_exception_declaration): Likewise.
  3723. (cp_parser_check_declarator_template_parameters): Likewise.
  3724. (cp_parser_function_definition_from_specifiers_and_declarator):
  3725. Likewise.
  3726. (cp_parser_save_member_function_body): Likewise.
  3727. * pt.c (process_template_parm): Add is_non_type parameter.
  3728. (convert_template_argument): Adjust call to groktypename.
  3729. (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
  3730. (tsubst): Do not expect declarators.
  3731. (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
  3732. argument.
  3733. (instantiate_decl): Use start_preparsed_function.
  3734. * semantics.c (begin_function_definition): Remove.
  3735. (finish_parmlist): Remove.
  3736. * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
  3737. declarators.
  3738. 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  3739. * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
  3740. (build_new_method_call): Likewise.
  3741. * decl.c (local_variable_p_walkfn): Don't walk into types.
  3742. * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
  3743. (build_anon_union_vars): Add new operand for COMPONENT_REF.
  3744. * init.c (buld_new): Add new operand for ARRAY_REF.
  3745. * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
  3746. (do_build_assign_ref): Likewise.
  3747. * parser.c (cp_parser_direct_new_declarator): Add new operands
  3748. for ARRAY_REF.
  3749. (cp_parser_direct_declarator): Likewise.
  3750. * pt.c (tsubst): Likewise.
  3751. (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
  3752. for COMPONENT_REF.
  3753. * semantics.c (finish_non_static_data_member): Add new operand
  3754. for COMPONENT_REF.
  3755. * typeck.c (build_class_member_access_expr): Likewise.
  3756. (build_class_member_access_expr, finish_class_member_access_expr):
  3757. Likewise.
  3758. (build_ptrmemfunc_access_expr): Likewise.
  3759. (build_array_ref): Add new operands for ARRAY_REF.
  3760. * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
  3761. * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
  3762. 2004-06-21 Richard Henderson <rth@redhat.com>
  3763. * dump.c (cp_dump_tree): Don't use dump_next_stmt.
  3764. * parser.c (cp_parser_jump_statement): Update commentary.
  3765. * pt.c (tsubst_expr): Use RETURN_EXPR.
  3766. * semantics.c (finish_return_stmt): Likewise.
  3767. (finalize_nrv_r): Likewise.
  3768. * typeck.c, typeck2.c: Update file start commentary.
  3769. 2004-06-21 Richard Henderson <rth@redhat.com>
  3770. * semantics.c (finish_expr_stmt): Call verify_sequence_points.
  3771. 2004-06-20 Richard Henderson <rth@redhat.com>
  3772. * cp-tree.h (add_decl_stmt): Declare.
  3773. * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
  3774. * semantics.c (maybe_cleanup_point_expr): New.
  3775. (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
  3776. finish_for_expr, finish_switch_cond): Use it.
  3777. (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
  3778. 2004-06-20 Richard Henderson <rth@redhat.com>
  3779. * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
  3780. * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
  3781. (cp_gimplify_expr): Call it.
  3782. (gimplify_cleanup_stmt): Move from c-gimplify.c.
  3783. (cp_genericize): New.
  3784. * decl.c (finish_function): Call it.
  3785. * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
  3786. (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
  3787. (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
  3788. (cp_genericize): Declare.
  3789. * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
  3790. * dump.c (cp_dump_tree): Likewise.
  3791. * semantics.c (push_cleanup): Move from c-semantics.c.
  3792. 2004-06-20 Zack Weinberg <zack@codesourcery.com>
  3793. * cp-lang.c (has_c_linkage): Implement.
  3794. * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
  3795. * decl.c (duplicate_decls): Use COPY_DECL_RTL.
  3796. (builtin_function_1): Don't call make_decl_rtl.
  3797. (build_cp_library_fn): Don't call set_mangled_name_for_decl.
  3798. (grokvardecl): Don't call mangle_decl.
  3799. * except.c (nothrow_libfn_p): Look at DECL_NAME, not
  3800. DECL_ASSEMBLER_NAME.
  3801. * method.c (set_mangled_name_for_decl): Delete.
  3802. * name-lookup.c (pushdecl): When a local extern shadows a
  3803. file-scope declaration of the same object, give both DECLs the
  3804. same DECL_UID.
  3805. * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
  3806. on DECL_ASSEMBLER_NAME.
  3807. 2004-06-19 Richard Henderson <rth@redhat.com>
  3808. * cp-gimplify.c: Remove unnecessary prototypes.
  3809. (cp_gimplify_stmt): Merge into ...
  3810. (cp_gimplify_expr): ... here. Move to end of file. Handle
  3811. stmts_are_full_exprs_p frobbing.
  3812. * cp-tree.h (cp_gimplify_stmt): Remove.
  3813. * pt.c (tsubst_expr): Merge prep_stmt and unify.
  3814. * tree.c (init_tree): Don't set lang_gimplify_stmt.
  3815. 2004-06-18 Richard Henderson <rth@redhat.com>
  3816. PR c++/16034
  3817. * semantics.c (begin_cond): New.
  3818. (finish_cond): Rewrite to handle template DECL_STMTs specially.
  3819. Assume that non-template decls go land before the conditional.
  3820. (simplify_loop_decl_cond): Likewise.
  3821. (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
  3822. finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
  3823. begin_switch_stmt, finish_switch_cond): Update to match.
  3824. 2004-06-17 Jason Merrill <jason@redhat.com>
  3825. PR c++/16015
  3826. * semantics.c (simplify_aggr_init_expr): Don't return the slot.
  3827. (finish_stmt_expr_expr): Update type after conversions.
  3828. (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
  3829. Handle void initializer.
  3830. * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
  3831. 2004-06-17 Geoffrey Keating <geoffk@apple.com>
  3832. * class.c (build_clone): Don't call defer_fn, let mark_used do it.
  3833. * cp-tree.h (defer_fn): Delete.
  3834. * decl2.c (defer_fn): Delete.
  3835. (finish_file): Simplify deferred_fns loops; check that
  3836. only used inline functions get into deferred_fns.
  3837. (mark_used): Inline previous contents of defer_fn.
  3838. 2004-06-16 Richard Henderson <rth@redhat.com>
  3839. * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
  3840. (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
  3841. * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
  3842. of CTOR_INITIALIZER ...
  3843. (pp_cxx_statement): ... here.
  3844. * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
  3845. (finish_function): Use alloc_stmt_list to zap entire function.
  3846. * parser.c (cp_parser_compound_statement): Update commentary.
  3847. * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
  3848. * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
  3849. (finish_stmt_expr): Don't look through COMPOUND_STMT.
  3850. 2004-06-16 Geoffrey Keating <geoffk@apple.com>
  3851. * pt.c (mark_decl_instantiated): Don't call defer_fn.
  3852. 2004-06-16 Richard Henderson <rth@redhat.com>
  3853. * parser.c (cp_parser_labeled_statement): Update commentary.
  3854. * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
  3855. * tree.c (mark_local_for_remap_r): Likewise.
  3856. 2004-06-16 Richard Henderson <rth@redhat.com>
  3857. * parser.c (cp_parser_asm_definition): Update commentary.
  3858. * pt.c (tsubst_expr): Use ASM_EXPR.
  3859. * semantics.c (finish_asm_stmt): Likewise.
  3860. 2004-06-16 Richard Henderson <rth@redhat.com>
  3861. * decl.c (finish_destructor_body): Use LABEL_EXPR.
  3862. * parser.c (cp_parser_statement): Update commentary.
  3863. * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
  3864. * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
  3865. * tree.c (mark_local_for_remap_r): Likewise.
  3866. 2004-06-16 Richard Henderson <rth@redhat.com>
  3867. PR c++/16012
  3868. * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
  3869. statement in FOR_INIT_STMT for templates.
  3870. 2004-06-15 Richard Henderson <rth@redhat.com>
  3871. * call.c (initialize_reference): Don't build CLEANUP_STMT here.
  3872. * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
  3873. (genericize_try_block): Use gimplify_stmt.
  3874. (genericize_catch_block, genericize_eh_spec_block): Likewise.
  3875. (cp_gimplify_init_expr): Remove STMT_EXPR special case.
  3876. (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
  3877. * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
  3878. (cp_tree_chain_matters_p): Remove.
  3879. * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
  3880. (COMPOUND_STMT_BODY_BLOCK): New.
  3881. (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
  3882. (EXPR_STMT_STMT_EXPR_RESULT): New.
  3883. (building_stmt_tree): Check cur_stmt_list.
  3884. (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
  3885. (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
  3886. * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
  3887. (cp_finish_decl): Use push_cleanup.
  3888. (start_function, finish_function): Use statement lists.
  3889. (finish_stmt): Do nothing.
  3890. * except.c (begin_eh_spec_block): Use statement lists.
  3891. (check_handlers_1, check_handlers): Likewise.
  3892. * init.c (construct_virtual_base): Don't add extra compound stmts.
  3893. (build_vec_init): Likewise.
  3894. * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
  3895. * name-lookup.h (struct cp_binding_level): Add statement_list.
  3896. * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
  3897. (cp_parser_labeled_statement, cp_parser_expression_statement,
  3898. cp_parser_statement_seq_opt): Likewise.
  3899. (cp_parser_compound_statement): Likewise. Take bool for try block.
  3900. (cp_parser_selection_statement): Tidy if processing.
  3901. (cp_parser_already_scoped_statement): Rewrite to do what it says.
  3902. * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
  3903. (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
  3904. Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
  3905. * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
  3906. (finish_cond): New, rewritten from FINISH_COND.
  3907. (simplify_loop_decl_cond): New.
  3908. (finish_expr_stmt): Avoid nested EXPR_STMTs.
  3909. (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
  3910. begin_else_clause, finish_else_clause, finish_if_stmt,
  3911. begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
  3912. begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
  3913. finish_for_cond, finish_for_stmt, begin_switch_stmt,
  3914. finish_switch_cond, finish_switch_stmt, begin_try_block,
  3915. finish_try_block, finish_cleanup_try_block, finish_function_try_block,
  3916. finish_handler_sequence, finish_function_handler_sequence,
  3917. begin_handler, finish_handler_parms, finish_handler,
  3918. begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
  3919. using statement lists.
  3920. (begin_compound_stmt): Replace has_no_scope argument with flags.
  3921. Update all callers. Use statement lists.
  3922. (finish_compound_stmt): Likewise.
  3923. (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
  3924. (current_scope_stmt_stack): Remove.
  3925. (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
  3926. * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
  3927. Rewrite with statement lists.
  3928. 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
  3929. * parser.c: Change all assignments of c_lex_string_translate
  3930. to true and false to 1 and 0.
  3931. (cp_lexer_read_token): Convert type of the translated string.
  3932. (cp_parser_skip_to_closing_parentheses): Preserve original
  3933. value of c_lex_string_translate, and set it to -1 while
  3934. running.
  3935. (cp_parser_cache_group): Likewise.
  3936. (cp_parser_cache_group_1): Renamed.
  3937. (cp_parser_asm_operand_list): Remove redundant setting of
  3938. c_lex_string_translate.
  3939. (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
  3940. Handle chained strings.
  3941. 2004-06-12 Andrew Pinski <apinski@apple.com>
  3942. PR c++/14639
  3943. Revert:
  3944. 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
  3945. * cp-tree.h: Fix typo.
  3946. * cp-tree.h: Include cgraph.h
  3947. (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
  3948. TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
  3949. 2004-06-12 Jason Merrill <jason@redhat.com>
  3950. PR tree-optimization/14107
  3951. * decl.c (finish_function): Warn about no return in all functions.
  3952. 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
  3953. * cp-tree.h (struct language_function): Remove cannot_inline.
  3954. * decl.c (save_function_data): cannot_inline is no more.
  3955. (cxx_push_function_context): Likewise.
  3956. * decl2.c (start_objects, start_static_storage_duration_function):
  3957. Reset DECL_INLINE, set DECL_UNINLINABLE.
  3958. 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3959. PR c++/15967
  3960. * search.c (lookup_field): Propagate the ambiguity list.
  3961. (lookup_fnfields): Likewise.
  3962. 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3963. PR c++/15947
  3964. * parser.c (cp_parser_template_name): Ctors/dtors never need a
  3965. template keyword to disambiguate.
  3966. 2004-06-14 Mark Mitchell <mark@codesourcery.com>
  3967. PR c++/15096
  3968. * decl.c (grokdeclarator): Ignore pointer-to-members when
  3969. computing template depth.
  3970. PR c++/14930
  3971. * name-lookup.c (pushtag): Do not try to put class declarations in
  3972. explicit specialization scopes.
  3973. 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
  3974. * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
  3975. 2004-06-11 Mark Mitchell <mark@codesourcery.com>
  3976. PR c++/15862
  3977. * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
  3978. bindings for undeclared built-ins.
  3979. 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  3980. * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
  3981. appear at the correct location.
  3982. 2004-06-10 Jason Merrill <jason@redhat.com>
  3983. PR c++/15875
  3984. Revert:
  3985. 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3986. * init.c (build_offset_ref): Build SCOPE_REF with non-null
  3987. TREE_TYPE for non-dependent names.
  3988. * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
  3989. unknown_type_node as its TREE_TYPE.
  3990. * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
  3991. * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
  3992. (dump_expr) <SCOPE_REF case>: Likewise.
  3993. 2004-06-10 Mark Mitchell <mark@codesourcery.com>
  3994. PR c++/15227
  3995. * parser.c (cp_parser_direct_declarator): Robustify.
  3996. PR c++/15877
  3997. * pt.c (tsubst_copy): Use decl_constant_value on enumeration
  3998. constants in non-dependent contexts.
  3999. PR c++/14211
  4000. PR c++/15076
  4001. * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
  4002. necessary.
  4003. 2004-06-10 Jakub Jelinek <jakub@redhat.com>
  4004. PR c++/14791
  4005. * decl.c (duplicate_decls): Handle fileptr_type_node arguments
  4006. specially.
  4007. 2004-06-09 Mark Mitchell <mark@codesourcery.com>
  4008. Revert:
  4009. PR c++/15815
  4010. 2004-06-07 Mark Mitchell <mark@codesourcery.com>
  4011. * lex.c (handle_pragma_interface): Deprecate.
  4012. (handle_pragma_implementation): Likewise.
  4013. 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
  4014. * g++spec.c (lang_specific_driver): Remove check for -lm
  4015. and -lmath when check it see if it was the math library.
  4016. 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4017. PR c++/7841
  4018. * parser.c (cp_parser_direct_declarator): Reject constructor named
  4019. as qualified template-id.
  4020. 2004-06-07 Mark Mitchell <mark@codesourcery.com>
  4021. PR c++/15815
  4022. * lex.c (handle_pragma_interface): Deprecate.
  4023. (handle_pragma_implementation): Likewise.
  4024. 2004-06-07 Mark Mitchell <mark@codesourcery.com>
  4025. PR c++/15766
  4026. * parser.c (cp_parser_iteration_statement): Fix typo in error
  4027. message.
  4028. PR c++/14777
  4029. * pt.c (tsubst_default_argument): Do not defer access checks
  4030. while substituting into the default argument.
  4031. PR c++/15554
  4032. * pt.c (tsubst_copy): Do not try to substitute for an enumeration
  4033. constant in a non-dependent context.
  4034. PR c++/15057
  4035. * except.c (build_throw): Ensure that temp_expr has been
  4036. initialized.
  4037. 2004-06-06 Roger Sayle <roger@eyesopen.com>
  4038. * cp/cp-tree.h (lvalue_or_else): Add function prototype.
  4039. 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4040. PR c++/15503
  4041. * parser.c (cp_parser_mem_initializer_id): Gracefully reject
  4042. 'typename', and accept 'template'.
  4043. 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
  4044. Jan Hubicka <jh@suse.cz>
  4045. PR c++/14639
  4046. * method.c (use_think): Do not mark thunk as referenced.
  4047. 2004-06-03 Matt Austern <austern@apple.com>
  4048. PR c++/15428
  4049. * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
  4050. is nonzero, and if we see a noninline definition of a key method,
  4051. make the vtables nonweak.
  4052. 2004-06-02 Matt Austern <austern@apple.com>
  4053. * cp-tree.h (instantiate_decl): new boolean parameter,
  4054. undefined_ok. Current behavior is equivalent to its being 0.
  4055. * decl2.c (mark_used): Add new argument when calling instantiate_decl
  4056. * pt.c (mark_decl_instantiated): Unconditionally make
  4057. instantiations explicit unconditionally
  4058. (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
  4059. since mark_decl_instantiated now does it.
  4060. (instantiate_class_member): New. Instantiate a member of an
  4061. explicitly instantiated class template.
  4062. (do_type_instantiation): Explicitly instantiate members of an
  4063. explicitly instantiated class template.
  4064. (instantiate_decl): if undefined_ok is nonzero, and if we're
  4065. trying to explicitly instantiated a template with no definition,
  4066. change it to an implicit instantiation.
  4067. (instantiate_pending_templates): Add new argument to instantiate_decl.
  4068. * tree.c (cp_cannot_inline_tree_fn): Likewise.
  4069. 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
  4070. * cp-tree.h: Fix typo.
  4071. * cp-tree.h: Include cgraph.h
  4072. (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
  4073. TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
  4074. 2004-06-01 Jason Merrill <jason@redhat.com>
  4075. PR c++/15142
  4076. * call.c (call_builtin_trap): Remove type parm.
  4077. (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
  4078. (build_x_va_arg): Dereference a null pointer for a non-POD argument.
  4079. 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4080. PR c++/13092
  4081. * init.c (build_offset_ref): Build SCOPE_REF with non-null
  4082. TREE_TYPE for non-dependent names.
  4083. * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
  4084. unknown_type_node as its TREE_TYPE.
  4085. * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
  4086. * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
  4087. (dump_expr) <SCOPE_REF case>: Likewise.
  4088. 2004-06-01 Richard Henderson <rth@redhat.com>
  4089. Andrew Pinski <pinskia@physics.uc.edu>
  4090. * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
  4091. * parser.c (struct cp_parser): Remove in_offsetof.
  4092. (cp_parser_new): Don't set it.
  4093. (cp_parser_unary_expression): Don't check it.
  4094. (cp_parser_postfix_open_square_expression): Split out from ...
  4095. (cp_parser_postfix_expression): ... here.
  4096. (cp_parser_postfix_dot_deref_expression): Likewise.
  4097. (cp_parser_builtin_offsetof): New.
  4098. (cp_parser_primary_expression): Use it.
  4099. 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4100. PR c++/14932
  4101. * parser.c (cp_parser_postfix_expression): Allow subscript
  4102. operator in offsetof.
  4103. 2004-05-31 Mark Mitchell <mark@codesourcery.com>
  4104. PR c++/15701
  4105. * friend.c (add_friend): Do not try to perform access checks for
  4106. functions from dependent classes.
  4107. 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4108. * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
  4109. (pp_cxx_begin_template_argument_list): Turn into a function.
  4110. (pp_cxx_end_template_argument_list): Likewise.
  4111. (pp_cxx_separate_with): Define.
  4112. (pp_cxx_unqualified_id): Tidy.
  4113. (pp_cxx_primary_expression): Likewise.
  4114. (pp_cxx_postfix_expression): Likewise.
  4115. (pp_cxx_expression): Likewise.
  4116. (pp_cxx_simple_type_specifier): Likewise.
  4117. (pp_cxx_type_specifier_seq): Likewise.
  4118. (pp_cxx_parameter_declaration_clause): Likewise.
  4119. (pp_cxx_exception_specification): Likewise.
  4120. (pp_cxx_direct_declarator): Likewise.
  4121. (pp_cxx_type_id): Likewise.
  4122. * cxx-pretty-print.h (pp_cxx_whitespace): Export from
  4123. cxx-pretty-print.c.
  4124. (pp_cxx_left_paren): Likewise.
  4125. (pp_cxx_right_paren): Likewise.
  4126. (pp_cxx_left_brace): Likewise.
  4127. (pp_cxx_right_brace): Likewise.
  4128. (pp_cxx_left_bracket): Likewise.
  4129. (pp_cxx_right_bracket): Likewise.
  4130. (pp_cxx_dot): Likewise.
  4131. (pp_cxx_identifier): Likewise.
  4132. (pp_cxx_tree_identifier): Likewise.
  4133. (pp_cxx_ampersand): New macro.
  4134. (pp_cxx_star): Likewise.
  4135. (pp_cxx_arrow): Likewise.
  4136. (pp_cxx_semicolon): Likewise.
  4137. (pp_cxx_complement): Likewise.
  4138. (pp_cxx_begin_template_argument_list): Declaree.
  4139. (pp_cxx_end_template_argument_list): Likewise.
  4140. (pp_cxx_colon_colon): likewise.
  4141. 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
  4142. * parser.c (cp_parser_simple_type_specifier): Explicitly test
  4143. against NULL_TREE.
  4144. 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
  4145. * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
  4146. typeck.c: Fix comment formatting.
  4147. 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
  4148. * cp-lang.c (cp_expand_decl): Remove.
  4149. (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
  4150. 2004-05-30 Andreas Jaeger <aj@suse.de>
  4151. * lang-specs.h: Add missing initializers for .ii.
  4152. 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
  4153. * decl.c (cp_make_fname_decl): Free return value from
  4154. fname_as_string.
  4155. 2004-05-28 Mark Mitchell <mark@codesourcery.com>
  4156. PR c++/15083
  4157. * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
  4158. even in a templat.e
  4159. * init.c (build_new): Likewise.
  4160. PR c++/15640
  4161. * name-lookup.c (arg_assoc): Robustify.
  4162. PR c++/15471
  4163. * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
  4164. when determining the scope to use for a pointer to member.
  4165. (lookup_anon_field): Give it external linkage.
  4166. * cp-tree.h (lookup_anon_field): Declare it.
  4167. * expr.c (cplus_expand_constant): Use it.
  4168. 2004-05-28 Mark Mitchell <mark@codesourcery.com>
  4169. PR c++/14668
  4170. * parser.c (cp_parser_simple_type_specifier): Call
  4171. maybe_note_name_used_in_class.
  4172. 2004-05-28 Tom Marshall <tmarshall@real.com>
  4173. PR c++/15214
  4174. * class.c (finish_struct_1): Warn only if the dtor is non-private or
  4175. the class has friends.
  4176. 2004-05-27 Adam Nemet <anemet@lnxw.com>
  4177. PR c++/12883
  4178. * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
  4179. TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
  4180. 2004-05-24 Geoffrey Keating <geoffk@apple.com>
  4181. * method.c (implicitly_declare_fn): Don't call defer_fn; abort
  4182. if it might be needed.
  4183. * pt.c (mark_decl_instantiated): Only call defer_fn if
  4184. the function actually needs processing in finish_file.
  4185. * decl2.c (finish_file): Add check that elements in
  4186. deferred_fns_used are really needed there. Remove unnecessary
  4187. test of DECL_SAVED_TREE.
  4188. 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
  4189. * Make-lang.in: No need to specify $(LIBCPP).
  4190. 2004-05-23 Mark Mitchell <mark@codesourcery.com>
  4191. PR c++/15044
  4192. * parser.c (cp_parser_class_head): Robustify.
  4193. PR c++/15317
  4194. * parser.c (cp_parser_decl_specifier_seq): Correct error in
  4195. comment.
  4196. (cp_parser_constructor_declarator_p): Treat attributes
  4197. as decl-specifiers.
  4198. PR c++/15329
  4199. * typeck.c (build_unary_op): Do not attempt to resolve casts to
  4200. base classes in templates.
  4201. 2004-05-23 Mark Mitchell <mark@codesourcery.com>
  4202. PR c++/15165
  4203. * pt.c (instantiate_template): Robustify.
  4204. 2004-05-23 Mark Mitchell <mark@codesourcery.com>
  4205. PR c++/15025
  4206. * decl.c (xref_tag): Issue errors about redeclaring template
  4207. classes as non-template classes.
  4208. 2004-05-23 Mark Mitchell <mark@codesourcery.com>
  4209. PR c++/14821
  4210. * name-lookup.c (supplement_binding): Allow redefinitions of
  4211. namespace aliases.
  4212. PR c++/14883
  4213. * parser.c (cp_parser_template_argument): Robustify.
  4214. 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4215. * class.c (alter_access): Use %E format specifier to print an
  4216. identifier node. Avoid looking at the IDENTIFIER_POINTER.
  4217. (push_lang_context): Likewise.
  4218. * decl.c (lookup_label): Likewise.
  4219. (grokdeclarator): Likewise.
  4220. * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
  4221. * pt.c (do_type_instantiation): Likewise.
  4222. * tree.c (handle_java_interface_attribute): Likewise.
  4223. (handle_com_interface_attribute): Likewise.
  4224. (handle_init_priority_attribute): Likewise.
  4225. 2004-05-22 Mark Mitchell <mark@codesourcery.com>
  4226. PR c++/15285
  4227. PR c++/15299
  4228. * pt.c (build_non_dependent_expr): Expand the set of tree nodes
  4229. recognized as overloaded functions.
  4230. 2004-05-22 Mark Mitchell <mark@codesourcery.com>
  4231. PR c++/15507
  4232. * class.c (layout_nonempty_base_or_field): Do not try to avoid
  4233. layout conflicts for unions.
  4234. PR c++/15542
  4235. * typeck.c (build_x_unary_op): Instantiate template class
  4236. specializations before looking for "operator &".
  4237. PR c++/15427
  4238. * typeck.c (complete_type): Layout non-dependent array types, even
  4239. in templates.
  4240. PR c++/15287
  4241. * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
  4242. template.
  4243. 2004-05-22 Roger Sayle <roger@eyesopen.com>
  4244. * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
  4245. returning when TREE_TYPE is error_mark_node.
  4246. * typeck.c (require_complete_type): Return error_mark_node if
  4247. value's type is an error_mark_node.
  4248. 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
  4249. * optimize.c (calls_setjmp_r): Remove.
  4250. (calls_setjmp_p): Remove.
  4251. * cp-tree.c (calls_setjmp_p): Remove.
  4252. * decl.c (finish_function): Do not call calls_setjmp_p.
  4253. 2004-05-18 Zack Weinberg <zack@codesourcery.com>
  4254. * decl.c (cp_finish_decl): Use mark_decl_referenced.
  4255. * decl2.c (maybe_make_one_only): Likewise.
  4256. * method.c (use_thunk): Likewise.
  4257. 2004-05-18 Jason Merrill <jason@redhat.com>
  4258. * class.c (build_base_path): Tidy a bit.
  4259. 2004-05-14 Geoffrey Keating <geoffk@apple.com>
  4260. * name-lookup.c (struct scope_binding): New.
  4261. (EMPTY_SCOPE_BINDING): New.
  4262. (lookup_using_namespace): Take a scope_binding instead of a
  4263. cxx_binding.
  4264. (qualified_lookup_using_namespace): Likewise.
  4265. (cxx_binding_clear): Delete.
  4266. (do_nonmember_using_decl): Use a scope_binding instead of a
  4267. cxx_binding.
  4268. (lookup_tag): Don't call select_decl.
  4269. (ambiguous_decl): Don't return anything (and change callers to match).
  4270. Take a scope_binding as the second parameter.
  4271. (lookup_namespace_name): Use a scope_binding instead of a
  4272. cxx_binding.
  4273. (unqualified_namespace_lookup): Likewise.
  4274. (lookup_qualified_name): Likewise.
  4275. (select_decl): Take a scope_binding instead of a cxx_binding.
  4276. Use macros rather than hand-coding tests for type-ness.
  4277. 2004-05-13 Diego Novillo <dnovillo@redhat.com>
  4278. * cp-gimplify.c: Rename from cp-simplify.c.
  4279. * Make-lang.in, optimize.c: Update.
  4280. 2004-05-13 Diego Novillo <dnovillo@redhat.com>
  4281. Merge from tree-ssa-20020619-branch. See
  4282. ChangeLog.tree-ssa for details.
  4283. * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
  4284. cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
  4285. expr.c, init.c, name-lookup.h, optimize.c, parser.c,
  4286. pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
  4287. Merged.
  4288. * cp-mudflap.c: New file.
  4289. * cp-simplify.c:: New file.
  4290. 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4291. PR c++/14389
  4292. * decl2.c (check_classfn): For member templates, compare also the
  4293. template parameters to match the declaration.
  4294. * cp-tree.h: Adjust declaration of check_classfn.
  4295. * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
  4296. * friend.c (do_friend): Likewise.
  4297. * pt.c (tsubst_friend_function): Likewise.
  4298. 2004-05-01 Zack Weinberg <zack@codesourcery.com>
  4299. * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
  4300. Instead, dig into the representation type to find the array bound.
  4301. 2004-04-30 Jason Merrill <jason@redhat.com>
  4302. Refer to base members using COMPONENT_REFs where possible.
  4303. * class.c (build_simple_base_path): New fn.
  4304. (build_base_path): Use it for non-virtual base references.
  4305. (layout_class_type): Change base fields to their real type
  4306. after layout is done.
  4307. * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
  4308. * cp-lang.c (cxx_get_alias_set): Use it.
  4309. 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
  4310. * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
  4311. comment typos.
  4312. 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4313. PR c++/15064
  4314. * parser.c (cp_parser_postfix_expression): typeid operator cannot be
  4315. used in integral constant expressions.
  4316. 2004-04-22 Mark Mitchell <mark@codesourcery.com>
  4317. * init.c (build_aggr_init): Fix accidental use of C99 construct in
  4318. previous change.
  4319. * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
  4320. braced initializer.
  4321. * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
  4322. * decl.c (reshape_init): Use it.
  4323. * init.c (perform_member_init): Remove redundant condition.
  4324. (build_aggr_init): Adjust to handle brace-enclosed initializers
  4325. correctly.
  4326. (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
  4327. * parser.c (cp_parser_initializer_clause): Do not set
  4328. TREE_HAS_CONSTRUCTOR on the initializer.
  4329. * rtti.c (tinfo_base_init): Likewise.
  4330. (generic_initializer): Likewise.
  4331. (ptr_initializer): Likewise.
  4332. (ptm_initializer): Likewise.
  4333. (class_initializer): Likewise.
  4334. (get_pseudo_ti_init): Likewise.
  4335. * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
  4336. 2004-04-22 Alan Modra <amodra@bigpond.net.au>
  4337. * name-lookup.c (anonymous_namespace_name): Make static.
  4338. 2004-04-19 Roger Sayle <roger@eyesopen.com>
  4339. PR middle-end/14531
  4340. * class.c (build_base_path): Call fold whilst building the NULL
  4341. pointer check expression trees.
  4342. 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
  4343. * init.c (build_new_1): Don't use type size argument for Java
  4344. _Jv_AllocObject call.
  4345. 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
  4346. * method.c (make_alias_for_thunk): Remove preprocessor guard on
  4347. declaration and definition.
  4348. 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
  4349. PR c++/14808
  4350. * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
  4351. than ASM_OUTPUT_DEF.
  4352. 2004-04-08 Jakub Jelinek <jakub@redhat.com>
  4353. * decl2.c (mark_used): Don't segfault if cfun != NULL but
  4354. current_function_decl == NULL.
  4355. 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
  4356. PR c++/3518
  4357. * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
  4358. level.
  4359. 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4360. * init.c (decl_constant_value): Don't look at DECL_INITIAL
  4361. of PARM_DECL.
  4362. * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
  4363. or TREE_SIDE_EFFECTS of a type.
  4364. 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
  4365. PR c++/14007
  4366. * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
  4367. cv-qualifier unification.
  4368. * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
  4369. 2004-04-02 Jan Hubicka <jh@suse.cz>
  4370. * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
  4371. * cp-tree.h (cp_update_decl_after_saving): Declare.
  4372. * tree.c (cp_update_decl_after_saving): Define.
  4373. 2004-04-01 Mark Mitchell <mark@codesourcery.com>
  4374. PR c++/14803
  4375. * typeck.c (get_delta_difference): Call fold before returning the
  4376. value.
  4377. 2004-04-01 Richard Henderson <rth@redhat.com>
  4378. PR c++/14804
  4379. * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
  4380. * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
  4381. 2004-04-01 Mark Mitchell <mark@codesourcery.com>
  4382. PR c++/14810
  4383. * name-lookup.c (maybe_push_cleanup_level): Robustify.
  4384. 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4385. * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
  4386. 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4387. * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
  4388. * class.c (check_bitfield_decl): Likewise.
  4389. * cvt.c (type_promotes_to): Likewise.
  4390. * decl.c (finish_enum): Likewise.
  4391. * mangle.c (write_builtin_type): Likewise.
  4392. * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
  4393. * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
  4394. (build_binary_op): Likewise.
  4395. 2004-03-31 Jan Hubicka <jh@suse.cz>
  4396. * tree.h (optimize_function): Kill prototype.
  4397. * optimize.c (dump_function, optimize_function, dump_finction): Kill.
  4398. * semantics.c (expand_body): Kill.
  4399. 2004-03-30 Mark Mitchell <mark@codesourcery.com>
  4400. PR c++/14724
  4401. * decl.c (start_decl_1): Do not decide whether or not to create a
  4402. new cleanup level until after the type has been completed.
  4403. PR c++/14763
  4404. * pt.c (tsubst_default_argument): Clear current_function_decl.
  4405. 2004-03-30 Zack Weinberg <zack@codesourcery.com>
  4406. * name-lookup.c, parser.c: Use new shorter form of GTY markers.
  4407. 2004-03-29 Zack Weinberg <zack@codesourcery.com>
  4408. * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
  4409. is null, just print the literal name and return.
  4410. 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
  4411. * cxx-pretty-print.c: Fix comment typos.
  4412. 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
  4413. * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
  4414. Update copyright.
  4415. 2004-03-23 Ziemowit Laski <zlaski@apple.com>
  4416. * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
  4417. * mangle.c (write_type): Add call to 'mangle_fundamental_type'
  4418. target hook.
  4419. 2004-03-23 Zack Weinberg <zack@codesourcery.com>
  4420. PR 12267, 12391, 12560, 13129, 14114, 14133
  4421. * cp-lang.c (c_reset_state): Delete.
  4422. (push_file_scope, pop_file_scope): New stubs.
  4423. * parser.c (c_parse_file): Call sorry() here if called more than once.
  4424. 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4425. * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
  4426. for INTEGER_CST.
  4427. 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4428. * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
  4429. 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4430. * error.c (enum pad): Remove.
  4431. (dump_qualifiers): Likewise.
  4432. (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
  4433. (dump_aggr_type): Likewise.
  4434. (dump_type_suffix): Likewise.
  4435. (dump_simple_decl): Likewise.
  4436. (dump_function_decl): Likewise.
  4437. (cv_to_string): Likewise.
  4438. (dump_type_prefix): Likewise. Adjust return void.
  4439. * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
  4440. cxx_pretty_print.h.
  4441. (pp_cxx_template_keyword_if_needed): Document.
  4442. (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
  4443. (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
  4444. MUST_NOT_THROW_EXPR.
  4445. 2004-03-21 Mark Mitchell <mark@codesourcery.com>
  4446. PR c++/14616
  4447. * decl.c (cp_finish_decl): Compute the size of arrays declared in
  4448. templates, if their type is non-dependent.
  4449. 2004-03-19 Mark Mitchell <mark@codesourcery.com>
  4450. * call.c (build_op_delete_call): Do not forget the placement
  4451. arguments when iterating through mutiple delete operators.
  4452. * cp-tree.h (svaed_scope): Remove last_parms.
  4453. (NEW_DELETE_OPNAME_P): New macro.
  4454. (last_function_parms): Remove.
  4455. (do_friend): Adjust prototype.
  4456. * decl.c (grokparms): Return the PARM_DECLs directly, rather than
  4457. using last_function_parms.
  4458. (grokfndecl): Take the PARM_DECLs as an argument, rather than
  4459. using last_function_parms.
  4460. (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
  4461. for class-specific operator new and operator delete.
  4462. (grok_op_properties): Do not look for allocation functions with
  4463. METHOD_TYPEs.
  4464. (start_function): Use DECL_ARGUMENTS instead of
  4465. last_function_parms.
  4466. * decl.h (last_function_parms): Do not declare.
  4467. * decl2.c (grokclassfn): Do not use last_function_parms.
  4468. * friend.c (do_friend): Remove parmdecls parameter.
  4469. * name-lookup.c (push_to_top_level): Do not save last_function_parms.
  4470. (pop_from_top_level): Do not restore it.
  4471. * pt.c (check_explicit_specialization): Do not adjust
  4472. last_function_parms.
  4473. * name-lookup.c (do_local_using_decl): Create a local binding for
  4474. types brought in via using declarations.
  4475. * name-lookup.c (lookup_arg_dependent): Handle block-scope
  4476. function declarations correctly.
  4477. * semantics.c (finish_id_expression): Correct handling of
  4478. conversion operators to dependent types.
  4479. * typeck.c (lookup_destructor): Allow the use of destructors from
  4480. base classes.
  4481. 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4482. * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
  4483. TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
  4484. * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
  4485. the field is named TEMPLATE_TYPE_PARM_INDEX.
  4486. 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4487. PR c++/14545
  4488. * parser.c (cp_parser_functional_cast): A cast to anything
  4489. but integral or enumaration type is not an integral constant
  4490. expression.
  4491. * pt.c (value_dependent_expression_p): Handle cast expressions
  4492. without operands (such as "int()").
  4493. 2004-03-18 Mark Mitchell <mark@codesourcery.com>
  4494. * semantics.c (finish_pseudo_destructor_expr): Allow differing
  4495. cv-qualification between the type named by the
  4496. pseudo-destructor-name and the object-type.
  4497. * search.c (accessible_base_p): Handle non-proper bases.
  4498. * name-lookup.c (do_nonmember_using_decl): If a using declaration
  4499. refers to a single overloaded function, set the type of the
  4500. function.
  4501. * tree.c (lvalue_type): Simplify.
  4502. * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
  4503. unknown type.
  4504. (build_unary_op): Handle OVERLOADs with known types.
  4505. * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
  4506. function templates.
  4507. * parser.c (cp_parser_postfix_expression): Handle the use of
  4508. "typename" in non-dependent contexts. Convert appropriately when
  4509. when using a qualified name after "->" or ".".
  4510. * call.c (conditional_conversion): Honor the requirement that some
  4511. conversions refer to the original object.
  4512. 2004-03-18 Mark Mitchell <mark@codesourcery.com>
  4513. * call.c (build_conditional_expr): Do not call force_rvalue for
  4514. operands of void_type when the conditional expression itself has
  4515. void type.
  4516. * name-lookup.c (pushdecl): Don't consider a declaration of a
  4517. function named "main" to be an overload of a type named "main".
  4518. * parser.c (cp_parser_template_name): Perform name lookup when the
  4519. template name is proceeded by "template" if the qualifying scope
  4520. is non-dependent.
  4521. * typeck.c (composite_pointer_type_r): Correctly handle
  4522. pointer-to-member types.
  4523. (build_const_cast): Likewise.
  4524. 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
  4525. * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
  4526. * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
  4527. (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
  4528. (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
  4529. (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
  4530. (TYPEOF_TYPE_EXPR): New macro.
  4531. * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
  4532. * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
  4533. * pt.c (tsubst): Likewise.
  4534. * semantics.c (finish_typeof): Likewise.
  4535. * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
  4536. and TEMPLATE_TYPE_PARM.
  4537. * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
  4538. (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
  4539. 2004-03-16 Mark Mitchell <mark@codesourcery.com>
  4540. PR c++/14586
  4541. * cp-tree.h (build_new_op): Change prototype.
  4542. (build_x_binary_op): Likewise.
  4543. * call.c (build_new_op): Add overloaded_p parameter.
  4544. * decl2.c (grok_array_decl): Adjust call to build_new_op.
  4545. * parser.c (cp_parser_binary_expression): Note that uses of
  4546. overloaded operators prevents an expression from being considered
  4547. an integral constant.
  4548. * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
  4549. build_x_binary_op.
  4550. * semantics.c (finish_call_expr): Likewise.
  4551. * typeck.c (rationalize_conditional_expr): Likewise.
  4552. (build_x_indirect_ref): Likewise.
  4553. (build_x_binary_op): Likewise.
  4554. (build_x_unary_op): Likewise.
  4555. (build_x_compound_expr): Likewise.
  4556. (build_modify_expr): Likewise.
  4557. * typeck2.c (build_x_arrow): Likewise.
  4558. 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
  4559. * cp-lang.c, ptree.c: Update copyright.
  4560. 2004-03-13 Mark Mitchell <mark@codesourcery.com>
  4561. PR c++/14550
  4562. * parser.c (cp_parser_non_integral_constant_expression): Encode
  4563. more of the idiom that surrounded calls to this function within
  4564. the function itself
  4565. (cp_parser_primary_expression): Adjust accordingly.
  4566. (cp_parser_postfix_expression): Likewise.
  4567. (cp_parser_unary_expression): Likewise.
  4568. (cp_parser_cast_expression): Likewise.
  4569. (cp_parser_assignment_expression): Likewise.
  4570. (cp_parser_expression): Likewise.
  4571. (cp_parser_new_expression): Note that new-expressions are not
  4572. allowed in integral constant expressions.
  4573. (cp_parser_delete_expression): Likewise.
  4574. 2004-03-12 Matt Austern <austern@apple.com>
  4575. * decl2.c (maybe_make_one_only): Look at
  4576. TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
  4577. to make an explicit instantiation weak.
  4578. * method.c (use_thunk): Make sure we call comdat_linkage
  4579. when appropriate.
  4580. * pt.c (do_type_instantiation): On systems where weak symbols
  4581. don't go in a static archive's TOC, explicit instantiation of a
  4582. class must imply *explicit* instantiation of its memeber.
  4583. 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
  4584. * call.c, cp-tree.h, pt.c: Fix comment typos.
  4585. 2004-03-10 Mark Mitchell <mark@codesourcery.com>
  4586. PR c++/14510
  4587. * decl.c (xref_tag): Disregard non-type declarations when
  4588. looking up a tagged type.
  4589. 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
  4590. PR c++/14397
  4591. * call.c (convert_like_real): Build a const qualified temporary,
  4592. when testing ctor access.
  4593. 2004-03-09 Mark Mitchell <mark@codesourcery.com>
  4594. * call.c (initialize_reference): Fix typo.
  4595. 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4596. PR c++/14409
  4597. * pt.c (determine_specialization): For member templates, match also
  4598. constness.
  4599. PR c++/14448
  4600. * parser.c (cp_parser_initializer_clause): Fold initializer if it is
  4601. non-dependent.
  4602. * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
  4603. 2004-03-09 Mark Mitchell <mark@codesourcery.com>
  4604. PR c++/14230
  4605. * call.c (initialize_reference): Handle initializers that are
  4606. class-member access expressions applies to rvalues.
  4607. 2004-03-09 Mark Mitchell <mark@codesourcery.com>
  4608. PR c++/14432
  4609. * name-lookup.c (supplement_binding): Ignore functions that are
  4610. marked DECL_ANTICIPATED.
  4611. 2004-03-08 Mark Mitchell <mark@codesourcery.com>
  4612. PR c++/14401
  4613. * class.c (check_field_decls): Complain about non-static data
  4614. members of reference type in unions. Propagate
  4615. CLASSTYPE_REF_FIELDS_NEED_INIT and
  4616. CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
  4617. data members.
  4618. * init.c (perform_member_init): Complain about mbmers with const
  4619. type that are not explicitly initialized.
  4620. 2004-03-08 Mark Mitchell <mark@codesourcery.com>
  4621. * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
  4622. * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
  4623. (lang_identifier): Remove implicit_decl and error_locus.
  4624. (IDENTIFIER_IMPLICIT_DECL): Remove.
  4625. (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
  4626. (IDENTIFIER_ERROR_LOCUS): Likewise.
  4627. (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
  4628. (TYPE_ASSEMBLER_NAME_STRING): Likewise.
  4629. (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
  4630. (implicitly_declare): Remove.
  4631. * decl.c (warn_extern_redeclared_static): Remove check of
  4632. IDENTIFIER_IMPLICIT_DECL.
  4633. (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
  4634. (implicitly_declare): Remove.
  4635. (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
  4636. (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
  4637. (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
  4638. * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
  4639. in the innermost scope, rather than at namespace scope.
  4640. * name-lookup.c (push_local_binding): Give it external linkage.
  4641. (pushdecl): Remove dead code.
  4642. * name-lookup.h (push_local_binding): Declare it.
  4643. * ptree.c (cxx_print_identifier): Don't print
  4644. IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
  4645. * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
  4646. not IDENTIFIER_ERROR_LOCUS.
  4647. * typeck.c (build_function_call): Remove dead code.
  4648. 2004-03-08 Jason Merrill <jason@redhat.com>
  4649. PR c++/13170
  4650. * decl.c (xref_tag): Remove attribute handling.
  4651. * cp-tree.h: Adjust prototype.
  4652. * decl.c, parser.c, rtti.c: Adjust callers.
  4653. * parser.c (cp_parser_class_head): Pass back attributes in the
  4654. class head.
  4655. (cp_parser_class_specifier): Adjust.
  4656. 2004-03-08 Matt Austern <austern@apple.com>
  4657. PR debug/14079
  4658. * name-lookup.c (add_decl_to_level): Add extern variables, as well
  4659. as static, to static_decls array.
  4660. 2004-03-05 Jason Merrill <jason@redhat.com>
  4661. * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
  4662. 2004-03-04 Geoffrey Keating <geoffk@apple.com>
  4663. * decl.c (grokfndecl): Update old incorrect comment.
  4664. (grokvardecl): Diagnose C++ variables of type with no linkage.
  4665. 2004-03-01 Mark Mitchell <mark@codesourcery.com>
  4666. PR c++/14369
  4667. * pt.c (build_non_dependent_expr): Do not create a
  4668. NON_DEPENDENT_EXPR for a THROW_EXPR.
  4669. 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4670. PR c++/14369
  4671. * error.c (dump_expr): Handle THROW_EXPR.
  4672. 2004-03-01 Mark Mitchell <mark@codesourcery.com>
  4673. PR c++/14360
  4674. * parser.c (cp_parser_postfix_expression): Do not perform Koenig
  4675. lookup if ordinary name-lookup finds a non-function.
  4676. * pt.c (tsubst_copy_and_build): Likewise.
  4677. PR c++/14361
  4678. * parser.c (cp_parser_late_parsing_default_args): Check that there
  4679. are no extra tokens after the end of the default-argument
  4680. expression.
  4681. 2004-03-01 Mark Mitchell <mark@codesourcery.com>
  4682. PR c++/14324
  4683. * lex.c (retrofit_lang_decl): Treat entities with no linkage as
  4684. having C++ linkage for name-mangling purposes.
  4685. PR c++/14260
  4686. * parser.c (cp_parser_direct_declarator): Recognize constructor
  4687. declarators that use a template-id to name the class being
  4688. constructed.
  4689. PR c++/14337
  4690. * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
  4691. (tsubst_expr): Do not call tsubst_copy, even when
  4692. processing_template_decl.
  4693. 2004-03-01 Jeff Law <law@redhat.com>
  4694. * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
  4695. the proper type.
  4696. 2004-02-29 Mark Mitchell <mark@codesourcery.com>
  4697. PR c++/14138
  4698. * name-lookup.h (push_scope): Change prototype.
  4699. * name-lookup.c (push_scope): Do not reenter the current class
  4700. scope.
  4701. * decl.c (grokfndecl): Check return code from push_scope before
  4702. calling pop_scope.
  4703. * decl2.c (check_classfn): Likewise.
  4704. * parser.c (cp_parser_conversion_function_id): Likewise.
  4705. (cp_parser_init_declarator): Likewise.
  4706. (cp_parser_direct_declarator): Likewise.
  4707. (cp_parser_class_specifier): Likewise.
  4708. (cp_parser_class_head): Likewise.
  4709. (cp_parser_lookup_name): Likewise.
  4710. (cp_parser_constructor_declarator_p): Likewise.
  4711. * pt.c (instantiate_class_template): Likewise.
  4712. (resolve_typename_type): Likewise.
  4713. 2004-02-29 Mark Mitchell <mark@codesourcery.com>
  4714. PR c++/14267
  4715. * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
  4716. extension.
  4717. PR debug/12103
  4718. * class.c (update_vtable_entry_for_fn): Do not go through
  4719. covariance machinery if the type returned by an overrider is the
  4720. same as the original.
  4721. 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
  4722. * call.c: Fix a comment typo.
  4723. 2004-02-27 Ziemowit Laski <zlaski@apple.com>
  4724. * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
  4725. 2004-02-26 Mark Mitchell <mark@codesourcery.com>
  4726. PR c++/14278
  4727. * parser.c (cp_parser_parameter_declaration_list): Commit
  4728. to fewer tentative parses.
  4729. 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4730. PR c++/14284
  4731. * pt.c (dependent_type_p_r): A template template parameter is a
  4732. dependent type.
  4733. 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4734. PR c++/14246
  4735. * mangle.c (write_template_arg_literal): Don't rely on identity for
  4736. boolean constants.
  4737. 2004-02-24 Jason Merrill <jason@redhat.com>
  4738. * tree.c (build_exception_variant): Use check_qualified_type.
  4739. 2004-02-23 Zack Weinberg <zack@codesourcery.com>
  4740. Kazu Hirata <kazu@cs.umass.edu>
  4741. * decl.c (cxx_init_decl_processing): Don't check
  4742. flag_writable_strings.
  4743. 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
  4744. PR c++/14156
  4745. * typeck.c (maybe_warn_about_returning_address_of_location):
  4746. Change check for VAR_DECL to use DECL_P instead.
  4747. 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4748. PR c++/14250
  4749. * cvt.c (build_expr_type_conversion): Type must be complete before
  4750. looking up for conversions.
  4751. 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4752. PR c++/14143
  4753. * name-lookup.c (arg_assoc_class): Don't look into template
  4754. arguments if it is not a primary template.
  4755. 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
  4756. PR c++/12007
  4757. * method.c (use_thunk): Always clone function argument tree.
  4758. 2004-02-20 Mark Mitchell <mark@codesourcery.com>
  4759. PR c++/14199
  4760. * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
  4761. PR c++/14173
  4762. * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
  4763. for all type variants.
  4764. 2004-02-19 Mark Mitchell <mark@codesourcery.com>
  4765. PR c++/13927
  4766. * decl.c (duplicate_decls): Return error_mark_node for invalid
  4767. redeclarations.
  4768. * name-lookup.c (push_namespace): Ignore the return value from
  4769. pushdecl.
  4770. * pt.c (push_template_decl_real): Robustify.
  4771. PR c++/14186
  4772. * name-lookup.c (push_class_level_binding): Do not complain about
  4773. adding a binding for a member whose name is the same as the
  4774. enclosing class if the member is located in a base class of the
  4775. current class.
  4776. 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4777. PR c++/14181
  4778. * parser.c (cp_parser_new_expression): Parse an ill-formed
  4779. direct-new-declarator after a parenthesized type-id to emit good
  4780. diagnostic.
  4781. 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
  4782. * cp-tree.def, cvt.c: Update copyright.
  4783. 2004-02-17 Mark Mitchell <mark@codesourcery.com>
  4784. PR c++/11326
  4785. * cp-tree.h (abi_version_at_least): Remove.
  4786. * mangle.c: Include flags.h.
  4787. 2004-02-15 Mark Mitchell <mark@codesourcery.com>
  4788. PR c++/13971
  4789. * call.c (build_conditional_expr): Handle conversions between
  4790. class types which result in differently cv-qualified type
  4791. variants.
  4792. PR c++/14086
  4793. * class.c (delete_duplicate_fields_1): Remove.
  4794. (delete_duplicate_fields): Likewise.
  4795. (finish_struct_anon): Remove check for members with the same name
  4796. as their enclosing class.
  4797. (check_field_decls): Do not call duplicate_fields.
  4798. * decl.c (grokdeclarator): Remove check for static data members
  4799. with the same name as their enclosing class.
  4800. * name-lookup.c (push_class_level_binding): Check for members with
  4801. the same name as their enclosing class.
  4802. 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4803. PR c++/14085
  4804. * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
  4805. 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4806. PR c++/13635
  4807. * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
  4808. has full set of arguments.
  4809. 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4810. PR c++/13927
  4811. * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
  4812. 2004-02-13 Mark Mitchell <mark@codesourcery.com>
  4813. PR c++/14122
  4814. * cp-tree.h (delete_sanity): Change prototype.
  4815. * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
  4816. Remove dead code. Adjust code to warn about deleting an array.
  4817. * typekc.c (decay_conversion): Use build_address and build_nop.
  4818. PR c++/14108
  4819. * search.c (accessible_p): Do not check access in thunks.
  4820. PR c++/14083
  4821. * call.c (build_conditional_expr): Call force_rvalue on the
  4822. non-void operand in the case that one result is a throw-expression
  4823. and the other is not.
  4824. 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
  4825. PR c++/9851
  4826. * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
  4827. the type name and look ahead for ::~, and bail out early with a
  4828. better error message if the parse is going to fail.
  4829. 2004-02-12 Mark Mitchell <mark@codesourcery.com>
  4830. * call.c (conversion_kind): New type.
  4831. (conversion_rank): Likewise.
  4832. (conversion): Likewise.
  4833. (CONVERSION_RANK): New macro.
  4834. (conversion_obstack): New variable.
  4835. (obstack_initialized): Likewise.
  4836. (z_candidate): Change type of convs and second_conv.
  4837. (candidate_warning): New type.
  4838. (IDENTITY_RANK): Remove.
  4839. (EXACT_RANK): Likewise.
  4840. (PROMO_RANK): Likewise.
  4841. (STD_RANK): Likewise.
  4842. (PBOOL_RANK): Likewise.
  4843. (USER_RANK): Likewise.
  4844. (ELLIPSIS_RANK): Likewise.
  4845. (BAD_RANK): Likewise.
  4846. (ICS_RANK): Likewise.
  4847. (ICS_STD_RANK): Likewise.
  4848. (ICS_USER_FLAG): Likewise.
  4849. (ICS_ELLIPSIS_FLAG): Likewise.
  4850. (ICS_THIS_FLAG): Likewise.
  4851. (ICS_BAD_FLAG): Likewise.
  4852. (NEED_TEMPORARY_P): Likewise.
  4853. (CHECK_COPY_CONSTRUCTOR_P): Likewise.
  4854. (USER_CONV_CAND): Likewise.
  4855. (USER_CONV_FN): Likewise.
  4856. (conversion_obstack_alloc): New function.
  4857. (alloc_conversion): Likewise.
  4858. (validate_conversion_obstack): Likewise.
  4859. (alloc_conversions): Likewise.
  4860. (build_conv): Adjust to deal with new conversion data structures.
  4861. (build_identity_conv): New function.
  4862. (build_ambiguous_conv): Likewise.
  4863. (standard_conversion): Adjust to deal with new conversion data
  4864. structures.
  4865. (convert_class_to_reference): Likewise.
  4866. (direct_reference_binding): Likewise.
  4867. (reference_binding): Likewise.
  4868. (implicit_conversion): Likewise.
  4869. (add_candidate): Likewise.
  4870. (add_function_candidate): Likewise.
  4871. (add_conv_candidate): Likewise.
  4872. (build_builtin_candidate): Likewise.
  4873. (print_z_candidate): Likewise.
  4874. (merge_conversion_sequences): Likewise.
  4875. (build_user_type_conversion_1): Likewise.
  4876. (build_user_type_conversion): Likewise.
  4877. (build_new_function_call): Likewise.
  4878. (build_object_call): Likewise.
  4879. (conditional_conversion): Likewise.
  4880. (build_conditional_expr): Likewise.
  4881. (build_new_op): Likewise.
  4882. (build_op_delete_call): Likewise.
  4883. (convert_like_real): Likewise.
  4884. (build_over_call): Likewise.
  4885. (build_new_method_call): Likewise.
  4886. (is_subseq): Likewise.
  4887. (maybe_handle_implicit_object): Likewise.
  4888. (maybe_handle_ref_bind): Likewise.
  4889. (compare_ics): Likewise.
  4890. (source_type): Likewise.
  4891. (add_warning): Likewise.
  4892. (joust): Likewise.
  4893. (can_convert_arg): Likewise.
  4894. (can_convert_arg_bad): Likewise.
  4895. (perform_implicit_conversion): Likewise.
  4896. (perform_direct_initialization_if_possible): Likewise.
  4897. (initialize_reference): Likewise.
  4898. * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
  4899. * cp-tree.def (WRAPPER): Likewise.
  4900. (IDENTITY_CONV): Remove.
  4901. (LVALUE_CONV): Likewise.
  4902. (QUAL_CONV): Likewise.
  4903. (STD_CONV): Likewise.
  4904. (PTR_CONV): Likewise.
  4905. (PMEM_CONV): Likewise.
  4906. (BASE_CONV): Likewise.
  4907. (REF_BIND): Likewise.
  4908. (USER_CONV): Likewise.
  4909. (AMBIG_CONV): Likewise.
  4910. (RVALUE_CONV): Likewise.
  4911. * cp-tree.h (tree_wrapper): Remove.
  4912. (WRAPPER_ZC): Remove.
  4913. (lang_tree_node): Remove wrapper.
  4914. (LOOKUP_SPECULATIVELY): Remove.
  4915. (build_op_delete_call): Adjust prototype.
  4916. (validate_conversion_obstack): Declare.
  4917. (build_zc_wrapper): Remove.
  4918. * cvt.c (convert_to_reference): Remove dead code.
  4919. (ocp_convert): Likewise.
  4920. * decl.c (redeclaration_error_message): Correct handling of
  4921. templates.
  4922. (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
  4923. (cp_tree_node_structure): Remove WRAPPER case.
  4924. * decl2.c (finish_file): Call validate_conversion_obstack.
  4925. * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
  4926. (build_op_delete_call): Likewise.
  4927. (build_x_delete): Likewise.
  4928. (build_delete): Adjust call to build_op_delete_call.
  4929. * pt.c (tsubst_friend_declaration): Adjust code to determine
  4930. whether or not a friend template is a definition.
  4931. (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
  4932. * tree.c (build_zc_wrapper): Remove.
  4933. 2004-02-12 Zack Weinberg <zack@codesourcery.com>
  4934. * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
  4935. * cp-tree.h: Don't declare cxx_builtin_type_decls.
  4936. * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
  4937. (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
  4938. 2004-02-10 Mark Mitchell <mark@codesourcery.com>
  4939. * typeck.c (lookup_destructor): Fix typo in error message.
  4940. 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
  4941. * call.c, parser.c, tree.c: Fix comment typos.
  4942. 2004-02-07 Zack Weinberg <zack@codesourcery.com>
  4943. Bug 13856
  4944. * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
  4945. * decl.c (duplicate_decls, start_function): Likewise.
  4946. 2004-02-07 Zack Weinberg <zack@codesourcery.com>
  4947. * name-lookup.c (pushdecl): Issue shadow warnings directly.
  4948. * parser.c (free_parser_stacks): Delete.
  4949. 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
  4950. * rtti.c: Update copyright.
  4951. 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4952. PR c++/14033
  4953. * decl.c (require_complete_types_for_parms): Do not insert
  4954. error_mark_node in the parameter list.
  4955. 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4956. PR c++/14028
  4957. * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
  4958. error when terminator can not be found.
  4959. 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
  4960. Make-lang.in (po-generated): Delete.
  4961. 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
  4962. * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
  4963. targetm.calls.promote_prototypes.
  4964. 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  4965. PR middle-end/13750
  4966. Revert:
  4967. 2004-01-15 Geoffrey Keating <geoffk@apple.com>
  4968. PR pch/13361
  4969. * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
  4970. (handle_pragma_implementation): Likewise.
  4971. 2004-02-05 Mark Mitchell <mark@codesourcery.com>
  4972. PR c++/13714
  4973. * typeck.c (lookup_destructor): Tweak error message.
  4974. 2004-02-05 Jan Hubicka <jh@suse.cz>
  4975. * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
  4976. functions.
  4977. 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4978. PR c++/14008
  4979. * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
  4980. code, only emits the diagnostic now. Added lookup of the identifier
  4981. and support for qualified ids.
  4982. (cp_parser_parse_and_diagnose_invalid_type_name): New function.
  4983. Parse an (invalid) type name as id-expression within a declarator.
  4984. (cp_parser_simple_declaration): Use it.
  4985. (cp_parser_member_declaration): Likewise.
  4986. (cp_parser_make_typename_type): New function. Handle errors through
  4987. cp_parser_diagnose_invalid_typename.
  4988. (cp_parser_elaborated_type_specifier): Use it.
  4989. 2004-02-04 Mark Mitchell <mark@codesourcery.com>
  4990. PR c++/13932
  4991. * call.c (convert_like_real): Use "converting" rather than
  4992. "argument" as the descriptive keyword to
  4993. dubious_conversion_warnings.
  4994. * typeck.c (convert_for_assignment): Do not call
  4995. dubious_conversion_warnings.
  4996. 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  4997. PR c++/13086
  4998. * init.c (build_delete): Emit a more informative error message in
  4999. case of an incomplete type, and on the correct source line.
  5000. 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
  5001. * error.c, search.c: Update copyright.
  5002. 2004-02-04 Mark Mitchell <mark@codesourcery.com>
  5003. PR c++/9941
  5004. * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
  5005. linkage for the typeinfo name string.
  5006. 2004-02-04 Mark Mitchell <mark@codesourcery.com>
  5007. PR c++/13969
  5008. * cp-tree.h (fold_non_dependent_expr): New function.
  5009. * parser.c (cp_parser_fold_non_dependent_expr): Remove.
  5010. (cp_parser_template_argument): Use fold_non_dependent_expr.
  5011. (cp_parser_direct_declarator): Likewise.
  5012. * pt.c (fold_non_dependent_expr): New function.
  5013. (convert_nontype_argument): Use it.
  5014. (tsubst_qualified_id): Simplify.
  5015. (tsubst_copy_and_build): Likewise.
  5016. 2004-02-04 Mark Mitchell <mark@codesourcery.com>
  5017. * decl.c (cxx_push_function_context): Do not set
  5018. current_function_is_thunk.
  5019. * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
  5020. actual function.
  5021. 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5022. PR c++/13997
  5023. * pt.c (more_specialized_class): Increase processing_template_decl
  5024. while partial ordering.
  5025. 2004-02-03 Mark Mitchell <mark@codesourcery.com>
  5026. PR c++/13925
  5027. * decl.c (start_function): Do not call pushdecl for any
  5028. instantiation or specialization of a primary template.
  5029. 2004-02-03 Mark Mitchell <mark@codesourcery.com>
  5030. PR c++/13950
  5031. * parser.c (cp_parser_class_name): Robustify.
  5032. PR c++/13970
  5033. * parser.c (cp_parser_cache_group): Do not consume the EOF token.
  5034. PR c++/14002
  5035. * semantics.c (finish_id_expression): Do not return an
  5036. IDENTIFIER_NODE when lookup finds a PARM_DECL.
  5037. 2004-02-03 Mark Mitchell <mark@codesourcery.com>
  5038. PR c++/13978
  5039. * pt.c (build_non_dependent_expr): Do not build
  5040. NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
  5041. PR c++/13968
  5042. * semantics.c (finish_id_expression): Do not return an
  5043. IDENTIFIER_NODE when lookup finds a VAR_DECL.
  5044. PR c++/13975
  5045. * parser.c (cp_parser_simple_declaration): When skipping to the
  5046. end of the statement swallow the terminating semicolon.
  5047. 2004-02-02 Mark Mitchell <mark@codesourcery.com>
  5048. PR c++/13113
  5049. * init.c (build_offset_ref): Improve error recovery for invalid
  5050. uses of non-static member functions.
  5051. PR c++/13854
  5052. * cp-tree.h (cp_build_type_attribute_variant): New function.
  5053. * class.c (build_clone): Use cp_build_type_attribute_variant.
  5054. * decl.c (duplicate_decls): Likewise.
  5055. * pt.c (copy_default_args_to_explicit_spec): Likewise.
  5056. (tsubst_function_type): Likewise.
  5057. * tree.c (build_exception_variant): Check attributes before
  5058. concluding that two types are the same.
  5059. (cp_build_type-attribute_variant): New method.
  5060. * typeck.c (merge_types): Use cp_build_type_attribute_variant.
  5061. PR c++/13907
  5062. * call.c (convert_class_to_reference): Keep better track of
  5063. pedantically invalid user-defined conversions.
  5064. 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5065. PR c++/13957
  5066. * pt.c (tsubst_qualified_id): Improved error message when a type
  5067. is expected but not found.
  5068. 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
  5069. * class.c: Fix comment typos.
  5070. * decl.c: Likewise.
  5071. * error.c: Likewise.
  5072. * parser.c: Likewise.
  5073. * pt.c: Likewise.
  5074. * search.c: Likewise.
  5075. * typeck.c: Likewise.
  5076. 2004-01-30 Richard Henderson <rth@redhat.com>
  5077. PR c++/13693
  5078. * method.c (use_thunk): Don't force_target_expr for void thunks.
  5079. * tree.c (build_target_expr_with_type): Assert non-void type.
  5080. (force_target_expr): Likewise.
  5081. 2004-01-30 Michael Matz <matz@suse.de>
  5082. * parser.c (cp_parser_labeled_statement): Accept case ranges.
  5083. 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5084. DR206
  5085. PR c++/13813
  5086. * decl.c (grokdeclarator): Check immediatly type completeness for
  5087. non-dependent types.
  5088. 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5089. PR c++/13683
  5090. * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
  5091. a sizeof expression.block
  5092. 2004-01-29 Mark Mitchell <mark@codesourcery.com>
  5093. PR c++/13883
  5094. * mangle.c (write_encoding): Correct encoding of member template
  5095. constructors.
  5096. 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5097. * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
  5098. template name as it was `<::' (digraph typo).
  5099. (cp_parser_nth_token_starts_template_argument_list_p): New function.
  5100. (cp_parser_id_expression): Use it.
  5101. (cp_parser_nested_name_specifier_opt): Likewise.
  5102. (cp_parser_template_name): Likewise.
  5103. (cp_parser_class_name): Likewise.
  5104. (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
  5105. 2004-01-28 Mark Mitchell <mark@codesourcery.com>
  5106. PR c++/13791
  5107. * typeck.c (merge_types): Do not merge attributes into
  5108. TYPENAME_TYPEs.
  5109. PR c++/13736
  5110. * parser.c (cp_parser_direct_declarator): Do not prevent
  5111. backtracking inside a parenthesized declarator.
  5112. (cp_parser_parameter_declaration): Fix typo in comment.
  5113. 2004-01-28 Jan Hubicka <jh@suse.cz>
  5114. * semantics.c (expand_body) Do emit_associated_thunks before
  5115. expansion.
  5116. 2004-01-27 Devang Patel <dpatel@apple.com>
  5117. * name-lookup.c: Include "debug.h"
  5118. (do_namespace_alias): Invoke debug_hooks to emit debug info
  5119. for namespace alias.
  5120. (do_local_using_decl): Invoke debug_hooks to emit debug info
  5121. for using decl.
  5122. (do_class_using_decl): Same.
  5123. (do_toplevel_using_decl): Same.
  5124. (do_using_directive): Same.
  5125. (cp_emit_debug_info_for_using): New function.
  5126. * Make-lang.in (cp/parser.o): Depend on debug.h
  5127. (cp/name-lookup.o): Same.
  5128. 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5129. * cp-tree.h (language_function, lang_type_header): Use
  5130. BOOL_BITFIELD.
  5131. * name-lookup.h (cp_binding_level): Likewise.
  5132. 2004-01-26 Mark Mitchell <mark@codesourcery.com>
  5133. PR c++/13663
  5134. * semantics.c (finish_for_expr): Check for unresolved overloaded
  5135. functions.
  5136. * class.c (add_method): Just check processing_template_decl to
  5137. determine whether or not we are within a template.
  5138. * decl2.c (maybe_retrofit_in_chrg): Likewise.
  5139. * init.c (decl_constant_value): Check the type of the declaration,
  5140. not TREE_READONLY.
  5141. * name-lookup.c (maybe_push_to_top_level): Rename to ...
  5142. (push_to_top_level): ... this.
  5143. * name-lookup.h (maybe_push_to_top_level): Do not declare it.
  5144. * pt.c (push_template_decl_real): Reorder condition for speed.
  5145. (convert_template_argument): Use dependency-checking functions in
  5146. place of uses_template_parms.
  5147. (lookup_template_class): Avoid calling uses_template_parms more
  5148. than once.
  5149. (uses_template_parms): Reimplement, using dependency-checking
  5150. functions.
  5151. (instantiate_class_template): Use push_to_top_level, not
  5152. maybe_push_to_top_level.
  5153. (type_unification_real): Simplify.
  5154. (type_dependent_expression_p): Handle OFFSET_REFs and
  5155. TEMPLATE_DECLs.
  5156. (any_dependent_template_arguments_p): Handle multiple levels of
  5157. template argument.
  5158. * semantics.c (expand_or_defer_fn): Do not check
  5159. uses_template_parms for template instantiations.
  5160. * typeck.c (comptypes): Avoid calling cp_type_quals.
  5161. 2004-01-25 Mark Mitchell <mark@codesourcery.com>
  5162. PR c++/13833
  5163. * call.c (build_over_call): Do not convert arguments when
  5164. processing a template.
  5165. * pt.c (build_non_dependent_expr): Do not build a
  5166. NON_DEPENDENT_EXPR for arithmetic constants.
  5167. 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5168. PR c++/13810
  5169. * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
  5170. returns a TYPE_DECL. no further lookup is required.
  5171. * semantics.c (check_template_template_default_arg): A TYPE_DECL
  5172. is invalid. Rework to give better diagnostics.
  5173. 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5174. PR c++/13797
  5175. * pt.c (instantiate_class_template): Add an error_mark_node
  5176. check.
  5177. (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
  5178. 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
  5179. PR c++/13701
  5180. * decl.c (finish_function): Move the call to
  5181. finish_fname_decls below the call to
  5182. finish_eh_spec_block.
  5183. 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
  5184. * optimize.c, typeck2.c: Update copyright.
  5185. 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
  5186. * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
  5187. init.c, mangle.c, typeck.c: Update copyright.
  5188. 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
  5189. * parser.c (cp_parser_class_specifier): Prevent garbage collection.
  5190. 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
  5191. * Make-lang.in: Replace $(docdir) with doc.
  5192. (c++.info, c++.srcinfo): Dummy entry.
  5193. (c++.man, c++.srcman): New rules.
  5194. (c++.install-man): Revamp rule.
  5195. 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
  5196. * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
  5197. CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
  5198. immediate $(shell) instead of deferred backquote.
  5199. 2004-01-19 Mark Mitchell <mark@codesourcery.com>
  5200. PR c++/13651
  5201. * parser.c (cp_parser_postfix_expression): When encountering
  5202. incomplete type on left-hand side of "->" or ".", treat the entire
  5203. expression as erroneous.
  5204. PR c++/13592
  5205. * call.c (build_field_call): Remove.
  5206. (n_build_method_call): Likewise.
  5207. (build_method_call): Likewise.
  5208. (build_new_method_call): Do not call build_field_call.
  5209. * class.c (n_build_method_call): Remove.
  5210. (print_class_statistics): Do not print it.
  5211. * cp-tree.h (build_method_call): Remove declaration.
  5212. (finish_object_call_expr): Likewise.
  5213. (build_new_1): Do not use build_method_call.
  5214. * parser.c (cp_parser_postfix_expression): Use finish_call_expr
  5215. when the function appearing on the right-hand-side of "." or "->"
  5216. is not actually a function.
  5217. * pt.c (tsubst_copy_and_build): Likewise.
  5218. * semantics.c (finish_object_call_expr): Remove.
  5219. 2004-01-18 Mark Mitchell <mark@codesourcery.com>
  5220. PR c++/13710
  5221. * pt.c (tsubst): Use finish_typeof.
  5222. 2004-01-18 Jason Merrill <jason@redhat.com>
  5223. PR c++/11725
  5224. * except.c (build_throw): In a template, set
  5225. current_function_returns_abnormally.
  5226. 2004-01-17 Fred Fish <fnf@intrinsity.com>
  5227. PR c++/11895
  5228. * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
  5229. except don't call array_type_nelts() with a VECTOR_TYPE.
  5230. 2004-01-16 Jan Hubicka <jh@suse.cz>
  5231. * mangle.c (write_mangled_name): Remove inline modifier.
  5232. 2004-01-16 Mark Mitchell <mark@codesourcery.com>
  5233. PR c++/13574
  5234. * decl.c (compute_array_index_type): Fix grammar in comment.
  5235. * init.c (build_zero_init): Handle zero-sized arrays correctly.
  5236. PR c++/13178
  5237. * call.c (name_as_c_string): Print conversion operator names
  5238. correctly.
  5239. PR c++/13478
  5240. * call.c (initialize_reference): Pass -1 for inner parameter to
  5241. convert_like_real.
  5242. 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5243. PR c++/13407
  5244. * parser.c (cp_parser_base_specifier): Check for an invalid
  5245. keyword `typename' and emit an user-friendly error message.
  5246. 2004-01-15 Geoffrey Keating <geoffk@apple.com>
  5247. PR pch/13361
  5248. * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
  5249. (handle_pragma_implementation): Likewise.
  5250. 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5251. PR c++/9259
  5252. * typeck.c (build_class_member_access_expr): Allow to access members
  5253. of the currently open class.
  5254. (finish_class_member_access_expr): Likewise.
  5255. 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
  5256. PR c++/13659
  5257. * name-lookup.c (validate_nonmember_using_decl): Take scope and
  5258. name by value, instead of computing them.
  5259. (do_local_using_decl, do_toplevel_using_decl): Add scope and name
  5260. arguments. Pass them to validate_nonmember_using_decl.
  5261. * name-lookup.h (do_local_using_decl): Adjust.
  5262. (do_toplevel_using_decl): Likewise.
  5263. * parser.c (cp_parser_using_declaration): Likewise.
  5264. * pt.c (tsubst_expr): Likewise.
  5265. 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
  5266. PR c++/13594
  5267. PR c++/13658
  5268. * name-lookup.c (qualified_lookup_using_namespace): Search
  5269. strongly-associated namespaces first, and only then try other
  5270. namespaces.
  5271. 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
  5272. * Make-lang.in (c++.srcextra): Dummy entry.
  5273. 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5274. PR c++/8856
  5275. * parser.c (cp_parser_template_name): Don't try to parse a
  5276. conversion-function-id, as it cannot be a template-name.
  5277. (cp_parser_simple_type_specifier): Check for invalid template-ids
  5278. even after a built-in type.
  5279. 2004-01-14 Jan Hubicka <jh@suse.cz>
  5280. PR c++/12850
  5281. * pt.c (instantiate_decl): Do not increase function_depth.
  5282. 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
  5283. PR c++/9021
  5284. PR c++/11005
  5285. * parser.c (cp_parser_elaborated_type_specifier): Warn about
  5286. attributes and discard.
  5287. * decl.c (xref_tag): Don't overwite existing attributes with
  5288. NULL_TREE.
  5289. 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5290. PR c++/12335
  5291. * parser.c (cp_parser_lookup_name): Return error_mark_node if there
  5292. is no destructor while looking up a BIT_NOT_EXPR.
  5293. 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
  5294. * cxxfilt.c: Remove unused file.
  5295. 2004-01-14 Jan Hubicka <jh@suse.cz>
  5296. Partial fix to PR c++/12850
  5297. * decl2.c (mark_used): Do not proactively instantiate templates
  5298. when compiling in unit-at-a-time or not optimizing.
  5299. * optimize.c (maybe_clone_body): Do not increase function depth.
  5300. 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5301. PR c++/13474
  5302. * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
  5303. 2004-01-12 Steven Bosscher <stevenb@suse.de>
  5304. PR c++/13558
  5305. * parser.c (cp_parser_member_declaration): Any non-type is also
  5306. not a class or a function.
  5307. 2004-01-12 Jason Merrill <jason@redhat.com>
  5308. PR c++/12815
  5309. * class.c (build_base_path): Do not mark vtable references as
  5310. TREE_CONSTANT.
  5311. (build_vtbl_ref_1): Likewise.
  5312. 2004-01-12 Richard Henderson <rth@redhat.com>
  5313. PR opt/10776
  5314. * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
  5315. (store_init_value): Use it.
  5316. * decl.c (check_initializer): Expect full initialization code
  5317. from store_init_value.
  5318. * init.c (expand_aggr_init_1): Likewise.
  5319. * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
  5320. 2004-01-12 Mark Mitchell <mark@codesourcery.com>
  5321. * class.c (layout_class_type): For non-POD class types, also copy
  5322. the DECL_SIZE and DECL_MODE of fields to the base class type.
  5323. 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5324. PR c++/13289
  5325. * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
  5326. calling regenerate_decl_from_template.
  5327. 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
  5328. PR c++/4100
  5329. * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
  5330. decl-specifier occurring along with a class definition.
  5331. 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
  5332. * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
  5333. clauses to comments describing declares_class_or_enum.
  5334. (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
  5335. false.
  5336. 2004-01-12 Jan Hubicka <jh@suse.cz>
  5337. * pt.c (for_each_template_parm): Do not check for duplicates.
  5338. (for_each_template_parm): Use walk_tree duplicate checking code.
  5339. 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
  5340. PR c++/3478
  5341. * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
  5342. is error_mark_node, don't add any more decl_specs.
  5343. (cp_parser_init_declarator): After committing to a declaration, if
  5344. the decl_specifiers start with error_mark_node, issue an error and
  5345. change the type to "int".
  5346. 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
  5347. PR bootstrap/7817
  5348. * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
  5349. 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5350. DR 337
  5351. PR c++/9256
  5352. * pt.c (tsubst): Substitution must fail if we are attempting to
  5353. create an array with element type that is an abstract class type.
  5354. * decl.c (cp_finish_decl): Strip pointers and array types recursively
  5355. before calling abstract_virtuals_error.
  5356. 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
  5357. * name-lookup.c (qualified_lookup_using_namespace): Consider
  5358. strong using directives even if we've already found a binding.
  5359. 2004-01-09 Mark Mitchell <mark@codesourcery.com>
  5360. * cp-tree.h (cxx_expand_expr): Change prototype.
  5361. * expr.c (cxx_expand_expr): Add alt_rtl parameter.
  5362. 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  5363. PR c++/12573
  5364. * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
  5365. looking into them recursively. They can be there because of the
  5366. new __offsetof__ extension.
  5367. 2004-01-07 Zack Weinberg <zack@codesourcery.com>
  5368. * parser.c (cp_parser_save_member_function_body): Mark the
  5369. definition static.
  5370. 2004-01-05 Mark Mitchell <mark@codesourcery.com>
  5371. PR c++/13057
  5372. * class.c (build_clone): Copy type attributes from the original
  5373. function to the clone.
  5374. PR c++/12815
  5375. * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
  5376. references as constant.
  5377. PR c++/12132
  5378. * parser.c (cp_parser_explicit_instantiation): Improve error
  5379. recovery.
  5380. (cp_parser_require): Improve indication of the error location.
  5381. PR c++/13451
  5382. * parser.c (cp_parser_class_head): Reorder logic to check for
  5383. invalid qualification.
  5384. 2004-01-04 Mark Mitchell <mark@codesourcery.com>
  5385. PR c++/13157
  5386. * name-lookup.c (lookup_using_namespace): Remove spacesp
  5387. parameter.
  5388. (unqualified_namespace_lookup): Likewise.
  5389. (lookup_qualified_name): Adjust accordingly.
  5390. (lookup_name_real): Likewise.
  5391. (lookup_arg_dependent): Do not eliminate the namespace of the
  5392. functions found by unqualified name lookup unless that is the
  5393. current namespace.
  5394. 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
  5395. * semantics.c (push_deferring_access_checks): Fix format.
  5396. (resume_deferring_access_checks): Likewise.
  5397. (stop_deferring_access_checks): Likewise.
  5398. (pop_deferring_access_checks): Likewise.
  5399. (get_deferred_access_checks): Likewise.
  5400. (pop_to_parent_deferring_access_checks): Likewise.
  5401. (perform_deferred_access_checks): Likewise.
  5402. (perform_or_defer_access_check): Likewise.
  5403. 2004-01-04 Richard Henderson <rth@redhat.com>
  5404. * call.c (build_over_call): Don't create a save_expr of an
  5405. aggregate, but rather its address.
  5406. 2004-01-04 Mark Mitchell <mark@codesourcery.com>
  5407. PR c++/13529
  5408. * parser.c (cp_parser_postfix_expression): Allow "." to appear in
  5409. an offsetof expression.
  5410. * parser.c (cp_parser_parameter_declaration): Fix comment.
  5411. PR c++/12226
  5412. * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
  5413. (reference_binding): Set it when appropriate.
  5414. (build_temp): New function, split out from ...
  5415. (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
  5416. (initialize_reference): Likewise.
  5417. PR c++/13536
  5418. * parser.c (cp_parser): Add in_type_id_in_expr_p.
  5419. (cp_parser_new): Initialize it.
  5420. (cp_parser_postfix_expression): Set it.
  5421. (cp_parser_sizeof_operand): Likewise.
  5422. (cp_parser_parameteR_declaration): Do not commit early to tenative
  5423. parsers when in_type_id_in_expr_p is set.
  5424. 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5425. PR c++/13094
  5426. * parser.c (cp_parser_template_argument): Don't call
  5427. make_unbound_class_template directly.
  5428. (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
  5429. UNBOUND_CLASS_TEMPLATE tree node.
  5430. 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
  5431. PR target/12729
  5432. * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
  5433. 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5434. PR c++/13520
  5435. * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
  5436. (DECL_FUNCTION_TEMPLATE_P): Use it.
  5437. (DECL_CLASS_TEMPLATE_P): Likewise.
  5438. * parser.c (cp_parser_lookup_name): Add is_template parameter.
  5439. (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
  5440. (cp_parser_template_name): Likewise.
  5441. (cp_parser_elaborated_type_specifier): Likewise.
  5442. (cp_parser_namespace_name): Likewise.
  5443. (cp_parser_class_name): Likewise.
  5444. (cp_parser_lookup_name_simple): Likewise.
  5445. Copyright (C) 2004 Free Software Foundation, Inc.
  5446. Copying and distribution of this file, with or without modification,
  5447. are permitted in any medium without royalty provided the copyright
  5448. notice and this notice are preserved.