ChangeLog-2003 232 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913
  1. 2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
  2. PR c++/13507
  3. * decl.c (duplicate_decls): Use build_type_attribute_variant to
  4. merge attributes.
  5. PR c++/13494
  6. * tree.c (build_cplus_array_type_1): Only build a minimal array
  7. type for dependent types or domains.
  8. 2003-12-29 Nathan Sidwell <nathan@codesourcery.com>
  9. PR c++/12774
  10. * typeck.c (comp_array_types): Fold non-dependent domains for
  11. ABI-1.
  12. 2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  13. PR c++/13289
  14. * semantics.c (finish_id_expression): Only check if the type of
  15. a template argument is integral or enumeration when it is not
  16. dependent.
  17. 2003-12-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  18. PR c++/12403
  19. * parser.c (cp_parser_template_declaration_after_export): Set up
  20. template specialization scope in case of explicit specialization.
  21. 2003-12-28 Mark Mitchell <mark@codesourcery.com>
  22. PR c++/13081
  23. * decl.c (duplicate_decls): Preserve inline-ness when redeclaring
  24. a function template.
  25. PR c++/12613
  26. * decl.c (reshape_init): Reject GNU colon-style designated
  27. initializers in arrays.
  28. PR c++/13009
  29. * call.c (build_special_member_call): Do not assume that we have a
  30. pointer to the complete object in an assignment operator.
  31. 2003-12-28 Roger Sayle <roger@eyesopen.com>
  32. PR c++/13070
  33. * decl.c (duplicate_decls): When setting the type of an anticipated
  34. declaration, merge the existing type attributes.
  35. 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
  36. PR c++/13268, c++/13339
  37. * class.c (add_method): Return early when method is error_mark_node.
  38. * pt.c (tsubst_friend_function): Return early when new_friend is
  39. error_mark_node.
  40. 2003-12-23 Mark Mitchell <mark@codesourcery.com>
  41. * cp-lang.c (cp_expr_size): Return zero for empty classes.
  42. * cp-tree.h (warn_if_uknown_interface): Remove unused function.
  43. * decl2.c (warn_if_unknown_interface): Likewise.
  44. 2003-12-23 Nathan Sidwell <nathan@codesourcery.com>
  45. PR c++/13387
  46. * cp-lang.c (cxx_get_alias_set): Correct logic for a base type.
  47. 2003-12-22 Mark Mitchell <mark@codesourcery.com>
  48. * decl.c (start_function): Do not check
  49. flag_alt_external_templates or flag_external_templates.
  50. * decl2.c (warn_if_unknown_interface): Likewise.
  51. * lex.c (extract_interface_info): Likewise.
  52. * pt.c (lookup_template_class): Likewise.
  53. PR c++/12862
  54. * name-lookup.c (pushdecl): Look up all namespace-scope entities
  55. in their corresponding namespace.
  56. PR c++/12397
  57. * typeck.c (finish_class_member_access_expr): Don't tree
  58. IDENTIFIER_NODEs as non-dependent expressions.
  59. 2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
  60. PR c++/5050
  61. * tree.c (cp_start_inlining): Remove.
  62. (cp_end_inlining): Remove.
  63. * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Do not define.
  64. (LANG_HOOKS_TREE_INLINING_END_INLINING): Do not define.
  65. * cp-tree.h (cp_start_inlining): Do not declare.
  66. (cp_end_inlining): Do not declare.
  67. 2003-12-22 Mark Mitchell <mark@codesourcery.com>
  68. PR c++/12479
  69. * parser.c (cp_parser_declaration_seq_opt): Only issue "extra ;"
  70. pedwarn when not in a system header.
  71. 2003-12-21 Mark Mitchell <mark@codesourcery.com>
  72. * cp-tree.h (cp_tree_index): Remove CPTI_RECORD_TYPE,
  73. CPTI_UNION_TYPE, CPTI_ENUM_TYPE.
  74. (record_type_node): Remove.
  75. (union_type_node): Likewise.
  76. (enum_type_node): Likewise.
  77. * decl.c: Remove mention of above tree nodes in comment.
  78. * lex.c (cxx_init): Do not assign to record_type_node,
  79. union_type_node, or enum_type_node. Simplify handling of
  80. class_type_node.
  81. PR c++/11554
  82. * init.c (sort_mem_initializers): Add warning.
  83. 2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
  84. * call.c: Fix comment formatting.
  85. * class.c: Likewise.
  86. * cp-tree.h: Likewise.
  87. * cvt.c: Likewise.
  88. * cxx-pretty-print.c: Likewise.
  89. * decl.c: Likewise.
  90. * decl2.c: Likewise.
  91. * error.c: Likewise.
  92. * except.c: Likewise.
  93. * init.c: Likewise.
  94. * name-lookup.c: Likewise.
  95. * parser.c: Likewise.
  96. * pt.c: Likewise.
  97. * rtti.c: Likewise.
  98. * semantics.c: Likewise.
  99. * typeck.c: Likewise.
  100. * typeck2.c: Likewise.
  101. 2003-12-19 Kazu Hirata <kazu@cs.umass.edu>
  102. * cvt.c: Remove uses of "register" specifier in
  103. declarations of arguments and local variables.
  104. * decl.c: Likewise.
  105. * decl2.c: Likewise.
  106. * expr.c: Likewise.
  107. * friend.c: Likewise.
  108. * lex.c: Likewise.
  109. * name-lookup.c: Likewise.
  110. * repo.c: Likewise.
  111. * search.c: Likewise.
  112. * tree.c: Likewise.
  113. * typeck.c: Likewise.
  114. * typeck2.c: Likewise.
  115. 2003-12-19 Mark Mitchell <mark@codesourcery.com>
  116. PR c++/12795
  117. * name-lookup.c (pushdecl): Do not treated any functions as being
  118. "nested" in C++.
  119. 2003-12-19 Jason Merrill <jason@redhat.com>
  120. PR c++/13371
  121. * typeck.c (build_modify_expr): Stabilize lhs if we're narrowing.
  122. * cvt.c (convert_to_void): Don't warn about the RHS of a comma
  123. being useless if TREE_NO_UNUSED_WARNING is set.
  124. 2003-12-18 Richard Henderson <rth@redhat.com>
  125. * cp-tree.h (struct lang_type_header): Remove __extension__.
  126. 2003-12-18 Jason Merrill <jason@redhat.com>
  127. PR c++/12253
  128. * init.c (build_vec_init): Initialization of an element from
  129. an initializer list is also a full-expression.
  130. * parser.c, pt.c, semantics.c: Rename constant_expression_p
  131. to integral_constant_expression_p.
  132. 2003-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  133. PR c++/13262
  134. * pt.c (instantiate_decl): Wrap push_nested_class and
  135. pop_nested_class around cp_finish_decl call for static member
  136. variable.
  137. 2003-12-18 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  138. PR c++/9154
  139. * parser.c (cp_parser_template_argument): A type-id followed by '>>'
  140. is just an user typo, and should be accepted as last resort if any
  141. other parsing fails.
  142. (cp_parser_enclosed_template_argument_list): If the argument list is
  143. parsed correctly, but the next token is '>>', emit a diagnostic.
  144. (cp_parser_next_token_ends_template_argument): Accept '>>' as
  145. delimiter of template argument, it will be later detected as a typo.
  146. 2003-12-17 Kelley Cook <kcook@gcc.gnu.org>
  147. * Make-lang.in: Replace cp/g++.1 with $(docobjdir)/g++.1.
  148. 2003-12-17 Mark Mitchell <mark@codesourcery.com>
  149. PR c++/10603
  150. PR c++/12827
  151. * parser.c (cp_parser_error): Help c_parse_error print good
  152. messages if the next token is a keyword.
  153. (cp_parser_parameter_declaration_list): When resynchronizing after
  154. a bad parameter declaration, stop if a comma is found.
  155. (cp_parser_parameter_declaration): Avoid backtracking.
  156. 2003-12-16 Mark Mitchell <mark@codesourcery.com>
  157. PR c++/12696
  158. * decl.c (reshape_init): Recover quickly from errors.
  159. 2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
  160. PR c++/9043
  161. C++ ABI change: Mangling array indices in templates.
  162. * decl.c (compute_array_index_type): Reorganize for earlier
  163. template errors. Use value_dependent_expression_p for abi-2.
  164. * mangle.c (write_array_type): Check broken mangling for
  165. expression indices on abi-1
  166. 2003-12-16 Mark Mitchell <mark@codesourcery.com>
  167. PR c++/12696
  168. * decl.c (reshape_init): Recover quickly from errors.
  169. PR c++/13275
  170. * lex.c (reswords): Add "__offsetof" and "__offsetof__".
  171. * parser.c (cp_parser): Add in_offsetof_p.
  172. (cp_parser_new): Initialize it.
  173. (cp_parser_primary_expression): Handle __offsetof__ (...).
  174. (cp_parser_postfix_expression): Allow casts to pointer type and
  175. uses of "->" in a constant expression if implementing offsetof.
  176. (cp_parser_unary_expression): Allow the use of "&" in a constant
  177. expression if implementing offsetof.
  178. 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  179. PR c++/2294
  180. * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
  181. if the declaration comes from an using declaration.
  182. 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  183. * semantics.c (finish_id_expression): Refactor the code to handle
  184. template parameters, and emit a more informative error message
  185. when they are used within an integral constant expression.
  186. 2003-12-16 Nathan Sidwell <nathan@codesourcery.com>
  187. PR c++/13387
  188. * class.c (finish_struct_1): Compute mode and alias set for
  189. CLASSTYPE_AS_BASE.
  190. * call.c (build_over_call): Use CLASSTYPE_AS_BASE for trivial
  191. assignment of a class, as necessary.
  192. * cp-lang.c (cxx_get_alias_set): The alias set as a base is the
  193. same as for the complete type.
  194. PR c++/13242
  195. C++ ABI change. Mangling template parameters of reference type
  196. * mangle.c (write_template_args): Remove unreachable code.
  197. (write_template_arg): Look through an argument of reference type.
  198. 2003-12-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  199. PR c++/2294
  200. * name-lookup.c (push_overloaded_decl): always construct an OVERLOAD
  201. if the declaration comes from an using declaration.
  202. 2003-12-15 Mark Mitchell <mark@codesourcery.com>
  203. PR c++/10926
  204. * decl2.c (grokfield): Robustify.
  205. PR c++/11116
  206. * parser.c (cp_parser_throw_expression): Determine whether or not
  207. an assignment-expression is present by doing one-token lookahead.
  208. PR c++/13269
  209. * parser.c (cp_parser_function_definition_after_declarator): Stop
  210. scanning tokens when reaching EOF.
  211. PR c++/12989
  212. * typeck.c (cxx_sizeof_or_alignof_expr): Robustify.
  213. PR c++/13310
  214. * pt.c (dependent_template_p): Handle OVERLOADs.
  215. 2003-12-15 Mark Mitchell <mark@codesourcery.com>
  216. PR c++/13243
  217. PR c++/12573
  218. * parser.c (cp_parser_postfix_expression): Tighten handling of
  219. integral constant expressions.
  220. (cp_parser_unary_expression): Likewise.
  221. * pt.c (value_dependent_expression_p): Remove handling for
  222. COMPONENT_REFs.
  223. 2003-12-15 Nathan Sidwell <nathan@codesourcery.com>
  224. * class.c (add_method): Disallow destructor for java classes.
  225. * decl.c (xref_basetypes): Check java class inheritance.
  226. * decl2.c (check_java_method): Skip artificial params.
  227. PR c++/13241
  228. C++ ABI change. Mangling of symbols in expressions.
  229. * mangle.c (write_mangled_name): Add top_level flag. Rework for
  230. nested and unnested mangling. Deal with abi version 1 and version
  231. 2 differences.
  232. (write_expression): Adjust write_mangled_name call.
  233. (mangle_decl_string): Use write_mangled_name for all non-type decls.
  234. 2003-12-14 Mark Mitchell <mark@codesourcery.com>
  235. PR c++/10779
  236. PR c++/12160
  237. * parser.c (struct cp_parser): Add in_template_argument_list_p.
  238. (cp_parser_error): Use c_parse_error.
  239. (cp_parser_name_lookup_error): New function.
  240. (cp_parser_new): Initialize it.
  241. (cp_parser_declarator): Add parenthesized_p parameter.
  242. (cp_parser_nested_name_specifier_opt): Use
  243. cp_parser_name_lookup_error.
  244. (cp_parser_parenthesized_expression_list): Improve comments.
  245. (cp_parser_condition): Adjust call to cp_parser_declarator.
  246. (cp_parser_template_parameter): Adjust call to
  247. cp_parser_parameter_declaration.
  248. (cp_parser_template_argument_list): Set
  249. in_template_argument_list_p.
  250. (cp_parser_explicit_instantiation): Adjust call to
  251. cp_parser_declarator.
  252. (cp_parser_simple_type_specifier): Remove unncessary code.
  253. (cp_parser_using_declaration): Use cp_parser_name_lookup_error.
  254. (cp_parser_init_declarator): Handle member function definitions.
  255. (cp_parser_direct_declarator): Adjust call to
  256. cp_parser_declarator.
  257. (cp_parser_type_id): Adjust call to cp_parser_declarator.
  258. (cp_parser_parameter_declaration_list): Avoid backtracking where
  259. possible.
  260. (cp_parser_parameter_declaration): Add parenthesized_p parameter.
  261. (cp_parser_function_definition): Remove.
  262. (cp_parser_member_declaration): Do not backtrack to look for
  263. function definitions.
  264. (cp_parser_exception_declaration): Adjust call to
  265. cp_parser_declarator.
  266. (cp_parser_single_declaration): Handle function definitions via
  267. cp_parser_init_declarator.
  268. (cp_parser_save_member_function_body): New function.
  269. 2003-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  270. PR c++/13106
  271. * decl.c (finish_function): Check if return type is dependent before
  272. issuing no return statement warning.
  273. 2003-12-12 Nathan Sidwell <nathan@codesourcery.com>
  274. PR c++/13118
  275. * cp-tree.h (lang_decl_u): Add thunk_alias member.
  276. (THUNK_VIRTUAL_OFFSET): Must be a FUNCTION_DECL.
  277. (THUNK_ALIAS_P): Remove.
  278. (THUNK_ALIAS): Adjust.
  279. * class.c (update_vtable_entry_for_fn): Get the vbase within the
  280. overriding function's return type.
  281. (dump_thunk): Adjust THUNK_ALIAS printing.
  282. (build_vtbl_initializer): Adjust THUNK_ALIAS use.
  283. * method.c (make_thunk): Revert 12881 test change. Clear
  284. THUNK_ALIAS.
  285. (finish_thunk): Adjust THUNK_ALIAS setting.
  286. (use_thunk): Adjust THUNK_ALIAS use.
  287. * semantics.c (emit_associated_thunks): Likewise.
  288. PR c++/13114, c++/13115
  289. * class.c (layout_empty_base): Propagate the move of an empty base
  290. to offset zero.
  291. PR c++/12881
  292. * method.c (make_thunk): Deal with thunk aliases when searching
  293. for a thunk. Robustify assertion.
  294. 2003-12-11 Nathan Sidwell <nathan@codesourcery.com>
  295. * mangle.c (conv_type_names): Holds IDENTIFIER_NODEs only.
  296. (hash_type): Use TYPE_UID of the identifier's type.
  297. (compare_type): Adjust.
  298. (mangle_conv_op_name_for_type): Store identifier nodes only, use
  299. TYPE_UID has hash value.
  300. 2003-12-10 Mark Mitchell <mark@codesourcery.com>
  301. * cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.
  302. 2003-12-08 Matt Austern <austern@apple.com>
  303. PR c/13134
  304. * decl.c (duplicate_decls): Copy visibility flag when appropriate.
  305. 2003-12-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  306. * init.c (build_new_1): Deal with an OVERLOAD set when
  307. looking up for _Jv_AllocObject.
  308. * except.c (build_throw): Likewise for _Jv_Throw.
  309. 2003-12-08 Jason Merrill <jason@redhat.com>
  310. PR c++/11971
  311. * tree.c (build_local_temp): Split out from build_cplus_new.
  312. (force_target_expr): New fn.
  313. * call.c (call_builtin_trap): Call it. Take a type parm.
  314. (convert_arg_to_ellipsis): Pass it.
  315. (build_x_va_arg): Use call_builtin_trap.
  316. PR c++/11929
  317. * call.c (magic_varargs_p): New fn.
  318. (build_over_call): Do no ellipsis conversions for arguments to
  319. functions with magic varargs.
  320. * name-lookup.c, init.c, except.c: Revert Giovanni's patch from
  321. yesterday.
  322. Give the anonymous namespace a null DECL_NAME.
  323. * cp-tree.h: Don't declare anonymous_namespace_name.
  324. * decl.c: Don't define it.
  325. * dump.c (cp_dump_tree): Don't check for it.
  326. * cxx-pretty-print.c (pp_cxx_original_namespace_definition): Likewise.
  327. * error.c (dump_decl): Likewise.
  328. * name-lookup.c: Define it here.
  329. (push_namespace): Put it in DECL_ASSEMBLER_NAME instead.
  330. * mangle.c (write_unqualified_name): Adjust.
  331. 2003-12-07 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  332. PR c++/2294
  333. * name-lookup.c (push_overloaded_decl): Always construct an
  334. OVERLOAD unless the declaration is a built-in.
  335. (set_namespace_binding): While binding OVERLOADs with only one
  336. declaration, we still need to call supplement_binding.
  337. * init.c (build_new_1): Deal with an OVERLOAD set when
  338. looking up for _Jv_AllocObject.
  339. * except.c (build_throw): Likewise for _Jv_Throw.
  340. 2003-12-06 Mark Mitchell <mark@codesourcery.com>
  341. PR c++/13323
  342. * class.c (same_signature_p): Handle conversion operators
  343. correctly.
  344. (check_for_override): Likewise.
  345. 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
  346. * Make-lang.in (GXX_CROSS_NAME, CXX_CROSS_NAME): Delete.
  347. (c++.install_common, cp/g++.1, c++.install-man): Adjust for above.
  348. (c++.uninstall): Likewise.
  349. 2003-12-05 Danny Smith <dannysmith@gcc.gnu.org>
  350. Mark Mitchell <mark@codesourcery.com>
  351. PR c++/13305
  352. * parser.c (cp_parser_elaborated_type_specifier): Accept
  353. attributes.
  354. 2003-12-05 Mark Mitchell <mark@codesourcery.com>
  355. PR c++/13314
  356. * parser.c (cp_parser_class_specifier): Match push_scope/pop_scope
  357. calls.
  358. (cp_parser_class_head): Likewise.
  359. 2003-12-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  360. PR c++/13166
  361. * parser.c (cp_parser_late_parsing_default_args): Make sure the
  362. context is a class before calling push_nested_class and
  363. pop_nested_class.
  364. 2003-12-03 James E Wilson <wilson@specifixinc.com>
  365. * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
  366. support.
  367. 2003-12-03 Mark Mitchell <mark@codesourcery.com>
  368. PR c++/9127
  369. * cp-tree.h (at_namespace_scope_p): New function.
  370. * parser.c (cp_parser_class_head): Handle invalid explicit
  371. specializations.
  372. * search.c (at_namespace_scope_p): New function.
  373. PR c++/13179
  374. * semantics.c (finish_handler_parms): Do not call eh_type_info for
  375. types used in templates.
  376. PR c++/10771
  377. * parser.c (cp_parser_check_for_invalid_template_id): New
  378. function.
  379. (cp_parser_simple_type_specifier): Use it.
  380. (cp_parser_elaborated_type_specifier): Likewise.
  381. (cp_parser_class_head): Likewise.
  382. 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  383. PR c++/10126
  384. * pt.c (convert_nontype_argument): Handle default conversions
  385. while converting a pointer to member function.
  386. 2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
  387. PR c++/12573
  388. * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
  389. looking into them recursively.
  390. 2003-12-02 Richard Henderson <rth@redhat.com>
  391. * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
  392. * parser.c (struct cp_token): Likewise.
  393. (struct cp_parser_token_tree_map_node): Likewise.
  394. * lex.c (struct resword): Move const after ENUM_BITFIELD.
  395. 2003-11-30 Mark Mitchell <mark@codesourcery.com>
  396. PR c++/9849
  397. * parser.c (cp_lexer_prev_token): New function.
  398. (cp_parser_skip_to_closing_parenthesis): Add consume_paren
  399. parameter.
  400. (cp_parser_nested_name_specifier_opt): Add is_declaration
  401. parameter.
  402. (cp_parser_nested_name_specifier): Likewise.
  403. (cp_parser_class_or_namespace_name): Likewise.
  404. (cp_parser_class_name): Likewise.
  405. (cp_parser_template_id): Likewise.
  406. (cp_parser_template_name): Likewise.
  407. (cp_parser_id_expression): Adjust calls to
  408. cp_parser_nested_name_specifier_op, cp_parser_template_id,
  409. cp_parser_class_name.
  410. (cp_parser_unqualified_id): Likewise.
  411. (cp_parser_postfix_expression): Likewise.
  412. (cp_parser_pseudo_destructor_name): Likewise.
  413. (cp_parser_cast_expression): Likewise.
  414. (cp_parser_mem_initializer_id): Likewise.
  415. (cp_parser_simple_type_specifier): Likewise.
  416. (cp_parser_type_name): Likewise.
  417. (cp_parser_elaborated_type_specifier): Likewise.
  418. (cp_parser_qualified_namespace_specifier): Likewise.
  419. (cp_parser_using_declaration): Likewise.
  420. (cp_parser_using_directive): Likewise.
  421. (cp_parser_ptr_operator): Likewise.
  422. (cp_parser_declarator_id): Likewise.
  423. (cp_parser_class_head): Likewise.
  424. (cp_parser_base_specifier): Likewise.
  425. (cp_parser_constructor_declarator_p): Likewise.
  426. (cp_parser_direct_declarator): Fix typo in comment.
  427. (cp_parser_parenthesized_expression_list): Adjust call to
  428. cp_parser_skip_to_closing_parenthesis.
  429. (cp_parser_selection_statement): Likewise.
  430. 2003-11-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  431. PR c++/12924
  432. * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
  433. with OVERLOAD and DECL nodes as the first operand.
  434. 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  435. * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
  436. 2003-11-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  437. PR c++/5369
  438. * friend.c (is_friend): Handle member function of a class
  439. template as template friend.
  440. (do_friend): Likewise.
  441. * decl2.c (check_classfn): Add template_header_p parameter.
  442. * decl.c (start_decl): Adjust check_classfn call.
  443. (grokfndecl): Likewise.
  444. * pt.c (is_specialization_of_friend): New function.
  445. (uses_template_parms_level): Likewise.
  446. (push_template_decl_real): Use uses_template_parms_level.
  447. (tsubst_friend_function): Adjust check_classfn call.
  448. * cp-tree.h (check_classfn): Adjust declaration.
  449. (uses_template_parms_level): Add declaration.
  450. (is_specialization_of_friend): Likewise.
  451. 2003-11-21 Mark Mitchell <mark@codesourcery.com>
  452. PR c++/12515
  453. * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
  454. operator.
  455. 2003-11-21 Jan Hubicka <jh@suse.cz>
  456. * parser.c (cp_parser_postfix_expression): Initialize 's' to
  457. NULL_TREE.
  458. 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
  459. * Make-lang.in (c++.extraclean): Delete.
  460. 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
  461. * Make-lang.in (check-g++, lang_checks): Add.
  462. 2003-11-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  463. PR c++/12932
  464. * class.c (currently_open_derived_class): Check if
  465. current_class_type is NULL_TREE.
  466. * semantics.c (finish_call_expr): Check if
  467. currently_open_derived_class returns NULL_TREE.
  468. * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
  469. parameter.
  470. 2003-11-17 Jason Merrill <jason@redhat.com>
  471. * init.c (build_new_1): Preevaluate placement args.
  472. * call.c (build_op_delete_call): Don't expose placement args to
  473. overload resolution.
  474. 2003-11-16 Jason Merrill <jason@redhat.com>
  475. * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
  476. and TAGS files that include them for each front end.
  477. 2003-11-15 Bernardo Innocenti <bernie@develer.com>
  478. PR c++/2294
  479. * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
  480. build failure on libjava.
  481. 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
  482. PR c++/2294
  483. * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
  484. unless the declaration is a built-in.
  485. (set_namespace_binding): While binding OVERLOADs with only one
  486. declaration, we still need to call supplement_binding.
  487. 2003-11-14 Mark Mitchell <mark@codesourcery.com>
  488. PR c++/12762
  489. * parser.c (cp_parser_enclosed_template_argument_list): New
  490. function.
  491. (cp_parser_template_id): Use it.
  492. (cp_parser_simple_type_specifier): Recognize invalid template
  493. syntax.
  494. 2003-11-14 Giovanni Bajo <giovannibajo@libero.it>
  495. PR c++/2094
  496. * pt.c (unify): Add support for PTRMEM_CST and
  497. FIELD_DECL unification.
  498. 2003-11-13 Richard Earnshaw <rearnsha@arm.com>
  499. * decl.c (grokfndecl): Change OK to type tree.
  500. 2003-11-12 Mark Mitchell <mark@codesourcery.com>
  501. * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
  502. CONSTRUCTOR.
  503. * decl.c (cp_make_fname_decl): When creating a top-level
  504. __FUNCTION__-like symbol, do register it with pushdecl.
  505. * decl.c (finish_case_label): Do not check that we are within a
  506. switch statement here.
  507. * parser.c (struct cp_parser): Add in_iteration_statement_p and
  508. in_switch_statement_p.
  509. (cp_parser_new): Initialize them.
  510. (cp_parser_labeled_statement): Check validity of case labels
  511. here.
  512. (cp_parser_selection_statement): Set in_switch_statement_p.
  513. (cp_parser_iteration_statement): Set in_iteration_statement_p.
  514. (cp_parser_jump_statement): Check validity of break/continue
  515. statements here.
  516. PR c++/12735
  517. * cp-tree.h (duplicate_decls): Return a tree.
  518. * decl.c (duplicate_decls): Clarify documentation. Return
  519. error_mark_node to indicate a failed redeclaration.
  520. * friend.c (do_friend): Handle that case.
  521. * name-lookup.c (pushdecl): Likewise.
  522. 2003-11-11 Jason Merrill <jason@redhat.com>
  523. * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
  524. * name-lookup.c (parse_using_directive): New fn.
  525. (is_associated_namespace): New fn.
  526. (arg_assoc_namespace): Also check associated namespaces.
  527. * name-lookup.h: Declare new fns.
  528. * pt.c (maybe_process_partial_specialization): Allow
  529. specialization in associated namespace.
  530. * parser.c (cp_parser_using_directive): Accept attributes. Use
  531. parse_using_directive.
  532. 2003-11-10 Richard Henderson <rth@redhat.com>
  533. * cvt.c (convert_to_void): Use void_zero_node after overload failure.
  534. 2003-11-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
  535. PR c++/12832
  536. * name-lookup.c (supplement_binding): Gracefully handle names
  537. used at non-class scope prior declaration.
  538. 2003-11-06 Matt Austern <austern@apple.com>
  539. * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
  540. * method.c (use_thunk): give thunk same visibility as function.
  541. * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
  542. 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  543. PR c++/11616
  544. * pt.c (instantiate_pending_templates): Save and restore
  545. input_location.
  546. 2003-11-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  547. PR c++/2019
  548. * friend.c (add_friend): Don't display previous declaration in
  549. case of duplicate friend warning.
  550. 2003-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  551. PR c++/9810
  552. * call.c (build_over_call): Check access using primary template
  553. if FN is a member function template.
  554. 2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  555. PR c++/12796
  556. * class.c (handle_using_decl): Set input_location before calling
  557. error_not_base_type.
  558. 2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  559. PR c++/10371
  560. * semantics.c (finish_non_static_data_member): Handle when
  561. both processing_template_decl and qualifying_scope are true.
  562. 2003-10-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  563. PR c++/11076
  564. * class.c (handle_using_decl): Swap arguments of error_not_base_type.
  565. * parser.c (cp_parser_direct_declarator): Only resolve typename for
  566. namespace scope declarations.
  567. 2003-10-24 Nathan Sidwell <nathan@codesourcery.com>
  568. PR c++/12698, c++/12699, c++/12700, c++/12566
  569. * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
  570. (debug_class, debug_thunks): New.
  571. * class.c (dump_class_hierarchy_1): New break out from ...
  572. (dump_class_hierarchy): ... here.
  573. (dump_thunk, debug_thunks, debug_class): New.
  574. (update_vtable_entry_for_fn): Add ssizetype casts. Correct
  575. continued search for primary binfo via virtual.
  576. (build_vtbl_initializer): Follow covariant thunk alias.
  577. * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
  578. (finish_thunk): Look for an alias of the covariant thunk and point
  579. to it.
  580. (use_thunk): We should never use an alias.
  581. * semantics.c (emit_associated_thunks): Do not emit aliases.
  582. PR c++/12566
  583. * cp-tree.h (cp_fname_init): Add TYPE pointer param.
  584. * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
  585. create an ad-hoc ERROR_MARK.
  586. (cp_make_fname_decl): Adjust.
  587. * pt.c (tsubst_expr): Adjust.
  588. 2003-10-23 Jason Merrill <jason@redhat.com>
  589. PR c++/12726
  590. * tree.c (build_target_expr_with_type): Don't call force_rvalue
  591. for CONSTRUCTORs.
  592. 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
  593. * call.c: Fix comment formatting.
  594. * class.c: Likewise.
  595. * cxx-pretty-print.c: Likewise.
  596. * init.c: Likewise.
  597. * parser.c: Likewise.
  598. * pt.c: Likewise.
  599. * semantics.c: Likewise.
  600. * tree.c: Likewise.
  601. * typeck.c: Likewise.
  602. * typeck2.c: Likewise.
  603. 2003-10-21 Mark Mitchell <mark@codesourcery.com>
  604. PR c++/11962
  605. * typeck.c (build_x_conditional_expr): Handle missing middle
  606. operands in templates.
  607. * mangle.c (write_expression): Issue errors about attempts to
  608. mangle a non-existant middle operator to the ?: operator.
  609. 2003-10-21 Robert Bowdidge <bowdidge@apple.com>
  610. * decl.c (cp_finish_decl): Remove clause intended for asm directives
  611. in struct or class fields: this code is never executed.
  612. 2003-10-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  613. * decl.c (start_decl): Exit if push_template_decl returns
  614. error_mark_node.
  615. 2003-10-20 Kazu Hirata <kazu@cs.umass.edu>
  616. * ChangeLog: Fix typos.
  617. * call.c: Fix comment typos.
  618. * class.c: Likewise.
  619. * cp-tree.h: Likewise.
  620. * cvt.c: Likewise.
  621. * cxx-pretty-print.c: Likewise.
  622. * decl.c: Likewise.
  623. * decl2.c: Likewise.
  624. * init.c: Likewise.
  625. * mangle.c: Likewise.
  626. * name-lookup.c: Likewise.
  627. * parser.c: Likewise.
  628. * search.c: Likewise.
  629. * semantics.c: Likewise.
  630. * tree.c: Likewise.
  631. * typeck.c: Likewise.
  632. 2003-10-20 Jan Hubicka <jh@suse.cz>
  633. * decl.c (start_cleanup_fn): Set DECL_DECLARED_INLINE_P to deffer
  634. the expansion.
  635. 2003-10-20 Mark Mitchell <mark@codesourcery.com>
  636. * Make-lang.in (c++.install-info): Remove.
  637. 2003-10-20 Jason Merrill <jason@redhat.com>
  638. * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
  639. field.
  640. 2003-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  641. PR c++/9781, c++/10583, c++/11862
  642. * decl.c (cp_finish_decl): Exit immediately if decl is an
  643. error_mark_node.
  644. * pt.c (push_template_decl_real): Return error_mark_node for
  645. invalid template declaration of variable.
  646. 2003-10-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  647. PR c++/12495
  648. * pt.c (lookup_template_class): Handle when current_class_type
  649. is a local class.
  650. 2003-10-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  651. PR c++/2513
  652. * decl.c (make_typename_type): Use dependent_type_p.
  653. (make_unbound_class_template): Likewise.
  654. * pt.c (instantiate_class_template): Increment
  655. processing_template_decl during substitution of template friend
  656. function. Preincrement processing_template_decl rather than
  657. postincrement.
  658. (get_mostly_instantiated_function_type): Increment
  659. processing_template_decl during partial substitution of function
  660. type.
  661. 2003-10-15 Jan Hubicka <jh@suse.cz>
  662. PR c++/12574
  663. * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
  664. 2003-10-14 Jason Merrill <jason@redhat.com>
  665. PR c++/11878
  666. * tree.c (build_target_expr_with_type): Call force_rvalue for
  667. classes with non-trivial copy ctors.
  668. PR c++/11063
  669. * typeck.c (build_modify_expr): Call convert rather than abort.
  670. 2003-10-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
  671. Breack out decl.c (3/n)
  672. * name-lookup.c: Include flags.h
  673. (lookup_name_current_level): Make static.
  674. (add_decl_to_level): Likewise.
  675. (push_local_binding): Likewise.
  676. (push_overloaded_decl): Likewise.
  677. (lookup_using_namespace): Likewise.
  678. (qualified_lookup_using_namespace): Likewise.
  679. (lookup_type_current_level): Likewise.
  680. (unqualified_namespace_lookup): Likewise.
  681. (namespace_ancestor): Likewise.
  682. (push_using_directive): Likewise.
  683. * decl.c (pushdecl): Move to name-lookup.c.
  684. (pushdecl_top_level_1): Likewise.
  685. (pushdecl_top_level): Likewise.
  686. (pushdecl_top_level_and_finish): Likewise.
  687. (maybe_push_decl): Likewise.
  688. (push_using_decl): Likewise.
  689. (push_overloaded_decl): Likewise.
  690. (make_anon_name): Likewise.
  691. (anon_cnt): Likewise.
  692. (clear_anon_tags): Likewise.
  693. (maybe_inject_for_scope_var): Likewise.
  694. (check_for_out_of_scope_variable): Likewise.
  695. * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
  696. * decl.c (warn_extern_redeclared_static): Export.
  697. * cp-tree.h (warn_extern_redeclared_static): Declare.
  698. 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
  699. * Make-lang.in: Replace uses of $(target_alias) with
  700. $(target_noncanonical).
  701. 2003-10-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  702. * ChangeLog: Add PR number to patch for PR c++/12370.
  703. 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
  704. * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
  705. (binding_for_name): Likewise.
  706. (cxx_binding_clear): Move to name-lookup.c.
  707. * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
  708. (binding_for_name): Likewise.
  709. * decl2.c (is_ancestor): Move to name-lookup.c
  710. (namespace_ancestor): Likewise.
  711. (add_using_namespace): Likewise.
  712. (ambiguous_decl): Likewise.
  713. (lookup_using_namespace): Likewise.
  714. (qualified_lookup_using_namespace): Likewise.
  715. (set_decl_namespace): Likewise.
  716. (decl_namespace): Likewise.
  717. (current_decl_namespace): Likewise.
  718. (push_decl_namespace): Likewise.
  719. (pop_decl_namespace): Likewise.
  720. (push_scope): Likewise.
  721. (pop_scope): Likewise.
  722. (struct arg_lookup): Likewise.
  723. (arg_assoc): Likewise.
  724. (arg_assoc_args): Likewise.
  725. (arg_assoc_type): Likewise.
  726. (add_function): Likewise.
  727. (arg_assoc_namespace): Likewise.
  728. (arg_assoc_class): Likewise.
  729. (arg_assoc_template_arg): Likewise.
  730. (do_namespace_alias): Likewise.
  731. (validate_nonmember_using_decl): Likewise.
  732. (do_nonmember_using_decl): Likewise.
  733. (do_toplevel_using_decl): Likewise.
  734. (do_local_using_decl): Likewise.
  735. (do_class_using_decl): Likewise.
  736. (do_using_directive): Likewise.
  737. (constructor_name_full): Likewise.
  738. (constructor_name): Likewise.
  739. (constructor_name_p): Likewise.
  740. 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
  741. Break out decl.c (2/n)
  742. * name-lookup.c: Include diagnostic.h
  743. (cxx_binding_free): Make static.
  744. (cxx_binding_make): Likewise.
  745. (binding_table_new): Likewise
  746. (binding_table_free): Likewise.
  747. (binding_table_insert): Likewise.
  748. (binding_table_find_anon_type): Likewise.
  749. (binding_table_reverse_maybe_remap): Likewise.
  750. (supplement_binding): Likewise.
  751. * name-lookup.h (global_scope_name): Declare extern.
  752. (global_type_node): Likewise.
  753. (cxx_binding_free): Don't export.
  754. (cxx_binding_make): Likewise.
  755. (binding_table_new): Likewise.
  756. (binding_table_free): Likewise.
  757. (binding_table_insert): Likewise.
  758. (binding_table_find_anon_type): Likewise.
  759. (binding_table_reverse_maybe_remap): Likewise.
  760. * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
  761. * decl.c (lookup_namespace_name): Move to name-lookup.c
  762. (select_decl): Likewise.
  763. (unqualified_namespace_lookup): Likewise.
  764. (lookup_qualified_name): Likewise.
  765. (lookup_name_real): Likewise.
  766. (lookup_name_nonclass): Likewise.
  767. (lookup_function_nonclass): Likewise.
  768. (lookup_name): Likewise.
  769. (lookup_name_current_level): Likewise.
  770. (lookup_type_current_level): Likewise.
  771. (lookup_flags): Likewise.
  772. (qualify_lookup): Likewise.
  773. (lookup_tag): Likewise.
  774. (lookup_tag_reverse): Likewise.
  775. (getdecls): Likewise.
  776. (storedecls): Remove.
  777. (cxx_remember_type_decls): Move to name-lookup.c.
  778. (global_bindings_p): Likewise.
  779. (innermost_nonclass_level): Likewise.
  780. (toplevel_bindings_p): Likewise.
  781. (namespace_bindings_p): Likewise.
  782. (kept_level_p): Likewise.
  783. (innermost_scope_kind): Likewise.
  784. (template_parm_scope_p): Likewise.
  785. (push_binding): Likewise.
  786. (push_local_binding): Likewise.
  787. (add_decl_to_level): Likewise. Make extern.
  788. (push_class_binding): Move to name-lookup.c.
  789. (resume_level): Likewise. Rename to resume_scope.
  790. (begin_scope): Move to name-lookup.c.
  791. (indent): Likewise.
  792. (binding_depth): Likewise.
  793. (is_class_level): Likewise.
  794. (cxx_scope_descriptor): Likewise.
  795. (cxx_scope_debug): Likewise.
  796. (namespace_scope_ht_size): Likewise.
  797. (leave_scope): Likewise.
  798. (pushlevel_class): Likewise.
  799. (poplevel_class): Likewise.
  800. (clear_identifier_class_values): Likewise.
  801. (pushdecl_with_scope): Likewise.
  802. (pushdecl_namespace_level): Likewise.
  803. (pushdecl_class_level): Likewise.
  804. (push_class_level_binding): Likewise.
  805. (push_using_directive): Likewise.
  806. (identifier_global_value): Likewise.
  807. (keep_next_level_flag): Likewise.
  808. (keep_next_level): Likewise.
  809. (free_binding_level): Likewise.
  810. (set_class_shadows): Likewise.
  811. (maybe_push_cleanup_level): Likewise.
  812. (cp_namespace_decls): Likewise.
  813. (bt_print_entry): Likewise.
  814. (print_binding_level): Likewise.
  815. (print_other_binding_stack): Likewise.
  816. (print_binding_stack): Likewise.
  817. (push_namespace): Likewise.
  818. (pop_namespace): Likewise.
  819. (push_nested_namespace): Likewise.
  820. (pop_nested_namespace): Likewise.
  821. (cxx_saved_binding_make): Likewise.
  822. (struct cxx_saved_binding_make): Likewise.
  823. (store_bindings): Likewise.
  824. (maybe_push_to_top_level): Likewise.
  825. (push_to_top_level): Likewise.
  826. (pop_from_top_level): Likewise.
  827. (identifier_type_value): Likewise.
  828. (set_identifier_type_value): Likewise.
  829. (set_identifier_type_value_with_scope): Likewise.
  830. (pop_everything): Likewise.
  831. (pushtag): Likewise.
  832. (follow_tag_typedef): Likewise.
  833. (maybe_process_template_type_declaration): Likewise.
  834. (pop_binding): Likewise.
  835. * cp-tree.h: Move corresponding declarations to name-lookup.h
  836. 2003-10-12 Steven Bosscher <steven@gcc.gnu.org>
  837. * cvt.c (ocp_convert): Move warning to C common code.
  838. 2003-10-09 Jason Merrill <jason@redhat.com>
  839. PR c++/6392
  840. * tree.c (build_cplus_array_type): Handle all quals the same.
  841. (cp_build_qualified_type_real): Look through arrays first.
  842. * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
  843. (build_target_expr_with_type): Likewise.
  844. * pt.c (instantiate_class_template): Sanity check that our
  845. enclosing class has been instantiated.
  846. 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
  847. * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
  848. * error.c (dump_function_decl): Use it to skip the dump of the
  849. arguments.
  850. (dump_expr): When dumping a declaration found within an
  851. expression, always set TFF_NO_FUNCTION_ARGUMENTS
  852. in the flags.
  853. 2003-10-08 Giovanni Bajo <giovannibajo@libero.it>
  854. PR c++/11097
  855. * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
  856. USING_DECL.
  857. 2003-10-06 Mark Mitchell <mark@codesourcery.com>
  858. PR c++/10147
  859. * call.c (initialize_reference): Tweak error message.
  860. * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
  861. pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
  862. * cxx-pretty-print.c (pp_cxx_id_expression): Always display
  863. qualified entities using qualified names.
  864. PR c++/12337
  865. * init.c (build_new_1): Make sure that the expression returned is
  866. not an lvalue.
  867. PR c++/12344, c++/12236, c++/8656
  868. * decl.c (start_function): Do not ignore attributes embedded in a
  869. function declarator.
  870. 2003-10-06 Mark Mitchell <mark@codesourcery.com>
  871. * Make-lang.in (c++.info): Remove.
  872. (c++.dvi): Remove.
  873. (c++.generated-manpages): Replace with ...
  874. (generated-manpages): ... this.
  875. 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  876. * decl.c (struct cp_binding_level): Move to name-lookup.h
  877. (current_binding_level): Likewise.
  878. (class_binding_level): Likewise.
  879. * cp-tree.h (enum scope_kind): Likewise.
  880. 2003-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
  881. * name-lookup.c (binding_entry_free): Nullify name and type
  882. fields.
  883. 2003-10-02 Mark Mitchell <mark@codesourcery.com>
  884. PR c++/12486
  885. * typeck.c (finish_class_member_access_expr): Issue diagnostic
  886. on erroneous use of qualified name.
  887. 2003-09-30 Richard Henderson <rth@redhat.com>
  888. PR c++/12370
  889. * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
  890. 2003-09-30 Kelley Cook <kelleycoook@wideopenwest.com>
  891. * g++spec.c: Convert to ISO C90 prototypes.
  892. * parser.c: Likewise.
  893. 2003-09-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
  894. * decl.c (pop_binding): Don't mess with nullifying binding->scope
  895. here.
  896. * name-lookup.c: Re-format.
  897. (cxx_binding_free): Nullify binding->scope.
  898. 2003-09-29 Jan Hubicka <jh@suse.cz>
  899. PR C++/12047
  900. * except.c (build_eh_type_type): Call mark_used on the type.
  901. 2003-09-28 Richard Henderson <rth@redhat.com>
  902. * typeck.c (c_expand_asm_operands): Take location_t, instead of
  903. individual file and line.
  904. 2003-09-28 Andreas Jaeger <aj@suse.de>
  905. * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
  906. definition.
  907. * init.c (push_base_cleanups): Likewise.
  908. * decl2.c (finish_file): Likewise.
  909. * mangle.c (init_mangle): Likewise.
  910. (dump_substitution_candidates): Likewise.
  911. * search.c: Likewise.
  912. 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
  913. * name-lookup.h (get_global_value_if_present): New function.
  914. (is_typename_at_global_scope): Likewise.
  915. * except.c (do_begin_catch): Use get_global_value_if_present.
  916. (do_end_catch): Likewise.
  917. (do_allocate_exception): Likewise.
  918. (do_free_exception): Likewise.
  919. (build_throw): Likewise.
  920. * parser.c (cp_parser_member_declaration): Likewise.
  921. * rtti.c (throw_bad_cast): Likewise.
  922. (throw_bad_typeid): Likewise.
  923. * decl.c (check_tag_decl): Use is_typename_at_global_scope.
  924. (grokdeclarator): Likewise.
  925. * cp-tree.h (global_namespace): Move to name-lookup.h
  926. * call.c (call_builtin_trap): Tidy.
  927. 2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  928. PR c++/11415
  929. * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
  930. error message when parser->scope is global_namespace.
  931. 2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
  932. * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
  933. macros BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
  934. 2003-09-26 Gabriel Dos Reis <gdr@integrable-solutions.net>
  935. * decl.c (pop_binding_level, suspend_binding_level,
  936. find_class_binding_level): Merge into leave_scope. Remove.
  937. (leave_scope): New function.
  938. (poplevel): Update.
  939. (poplevel_class): Likewise.
  940. (pop_namespace): Likewise.
  941. 2003-09-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  942. PR c++/5655
  943. * parser.c (cp_parser_check_access_in_redeclaration): New function.
  944. (cp_parser_member_declaration): Use it.
  945. (cp_parser_template_declaration_after_export): Likewise.
  946. 2003-09-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
  947. * cp-tree.h (scope_kind): Add new enumerator.
  948. (keep_next_level): Change parameter type to bool.
  949. (begin_scope): Change prototype.
  950. (pushlevel): Remove declaration.
  951. * decl.c (push_binding_level): Fold in begin_scope. Remove.
  952. (struct cp_binding_level): Remove tag_tranparent field. Make keep
  953. of bitsize one.
  954. (keep_next_level_flag): Make a bool.
  955. (cxx_scope_descriptor): Update scope names table
  956. (make_cxx_scope): Fold in begin_scope. Remove..
  957. (namespace_scope_ht_size): New function.
  958. (begin_scope): Change prototype. Return a scope. Tidy.
  959. (kept_level_p): Update.
  960. (pushlevel): Remove.
  961. (maybe_push_cleanup_level): Simplify.
  962. (poplevel): Update for sk_cleanup and keep change.
  963. (print_binding_level): Likewise.
  964. (initial_push_namespace_scope): Fold in begin_scope. Remove.
  965. (push_namespace): Update.
  966. (pushtag): Likewise.
  967. (lookup_tag): Likewise.
  968. (lookup_name_current_level): Likewise.
  969. (lookup_type_current_level): Likewise.
  970. (cxx_init_decl_processing): Likewise.
  971. (start_function): Likewise.
  972. (begin_function_body): Likewise.
  973. (start_method): Likewise.
  974. * pt.c (push_inline_template_parms_recursive): Likewise.
  975. (begin_template_parm_list): Likewise.
  976. (begin_specialization): Likewise.
  977. * semantics.c (do_pushlevel): Likewise.
  978. (begin_compound_stmt): Likewise.
  979. (begin_stmt_expr): Likewise.
  980. 2003-09-21 Richard Henderson <rth@redhat.com>
  981. * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
  982. method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
  983. 2003-09-21 Richard Henderson <rth@redhat.com>
  984. * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
  985. method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
  986. DECL_SOURCE_LOCATION rename and change to const.
  987. 2003-09-20 Richard Henderson <rth@redhat.com>
  988. * decl.c, decl2.c, pt.c: Use %J in diagnostics.
  989. 2003-09-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  990. PR c++/157
  991. * parser.c (cp_parser_direct_declarator): Clear
  992. parser->num_template_parameter_lists when parsing function
  993. parameters.
  994. (cp_parser_constructor_declarator_p): Likewise.
  995. 2003-09-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  996. PR c++/495
  997. * pt.c (tsubst_friend_class): Only use innermost template
  998. arguments for the injected friend class template.
  999. 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
  1000. PR c++/12332
  1001. * pt.c (instantiate_class_template): Increment
  1002. processing_template_decl around the tsubst of a template member
  1003. function.
  1004. 2003-09-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1005. * decl.c (cxx_scope_descriptor): Fix thinko.
  1006. (struct cp_binding_level): Adjust type of binding_depth field.
  1007. 2003-09-18 Danny Smith <dannysmith@users.sourceforge.net>
  1008. PR c++/12320
  1009. * call.c (type_passed_as): Check for incomplete type.
  1010. (convert_for_arg_passing): Likewise.
  1011. 2003-09-18 Nathan Sidwell <nathan@codesourcery.com>
  1012. PR c++/9848
  1013. * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
  1014. here.
  1015. * semantics.c (expand_body): Set it here on the remaining clones.
  1016. 2003-09-18 Roger Sayle <roger@eyesopen.com>
  1017. * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
  1018. * class.c (instantiate_type): Remove FFS_EXPR case.
  1019. 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  1020. * ChangeLog: Fix recent commit.
  1021. 2003-09-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
  1022. * ChangeLog: Add PR number to patch for PR c++/12316.
  1023. 2003-09-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1024. * error.c (dump_type): Simplify. Use pp_type_specifier_seq for
  1025. "C" types.
  1026. * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
  1027. 2003-09-17 Richard Henderson <rth@redhat.com>
  1028. * semantics.c (expand_body): Don't save/restore input_location.
  1029. 2003-09-17 Mark Mitchell <mark@codesourcery.com>
  1030. PR c++/12266
  1031. * cp-tree.h (tsubst_flags_t): Add tf_conv.
  1032. * class.c (standard_conversion): Pass tf_conv to
  1033. instantiate_type.
  1034. (resolve_address_of_overloaded_function): Do not call mark_used
  1035. when just checking conversions.
  1036. PR debug/12066
  1037. * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
  1038. * cp-tree.h (cxx_builtin_type_decls): Declare.
  1039. * decl.c (builtin_type_decls): New variables.
  1040. (cxx_builtin_type_decls): New function.
  1041. (record_builtin_type): Add to builtin_type_decls.
  1042. 2003-09-17 Richard Henderson <rth@redhat.com>
  1043. PR c++/12316
  1044. * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
  1045. 2003-09-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1046. PR c++/7939
  1047. * typeck.c (comptypes): Don't ICE when its first argument is
  1048. error_mark_node.
  1049. (compparms): Reverse the arguments of same_type_p.
  1050. 2003-09-15 Nathan Sidwell <nathan@codesourcery.com>
  1051. PR c++/12184
  1052. * typeck.c (convert_arguments): Return error_mark_node for an
  1053. incomplete parameter. Make error message more informative.
  1054. 2003-09-12 Mark Mitchell <mark@codesourcery.com>
  1055. PR c++/3907
  1056. * class.c (maybe_note_name_used_in_class): Refine test for whether
  1057. or not we are in a class scope.
  1058. * cp-tree.h (language_function): Remove x_expanding_p.
  1059. (expanding_p): Remove.
  1060. (doing_semantic_analysis_p): Remove.
  1061. (scope_kind): Add sk_function_parms, sk_class,
  1062. sk_namespace.
  1063. (innermost_scope_kind): New method.
  1064. * call.c (cxx_type_promotes_to): Use type_decays_to.
  1065. * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
  1066. (LANG_HOOKS_POPLEVEL): Likewise.
  1067. * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
  1068. template_spec_p, namespace_p, is_for_scope, is_try_scope, and
  1069. is_catch_scope. Add kind and explicit_spec_p.
  1070. (cxx_scope_descriptor): Use a lookup table.
  1071. (find_class_binding_level): Use "kind" field in binding_level, not
  1072. the various flags.
  1073. (pop_binding_level): Likewise.
  1074. (innermost_nonclass_level): Likewise.
  1075. (toplevel_bindings_p): Likewise.
  1076. (namespace_bindings_p): Likewise.
  1077. (template_parm_scope_p): Likewise.
  1078. (innermost_scope_kind): New method.
  1079. (current_tmpl_spec_kind): Use "kind" field in binding_level, not
  1080. the various flags.
  1081. (pushlevel): Remove check for doing_semantic_analysis_p.
  1082. (begin_scope): Simplify.
  1083. (add_decl_to_level): Use "kind" field in binding_level, not
  1084. the various flags.
  1085. (push_local_binding): Likewise.
  1086. (pop_label): Remove check for doing_semantic_analysis_p.
  1087. (poplevel): Use "kind" field in binding_level, not
  1088. the various flags.
  1089. (set_block): Remove check for doing_semantic_analysis_p.
  1090. (pushlevel_class): Use "kind" field in binding_level, not
  1091. the various flags.
  1092. (poplevel_class): Likewise.
  1093. (initial_push_namespace_scope): Likewise.
  1094. (maybe_push_to_top_level): Likewise.
  1095. (set_identifier_type_value_with_scope): Likewise.
  1096. (pop_everything): Likewise.
  1097. (maybe_process_template_type_declaration): Likewise.
  1098. (pushtag): Likewise.
  1099. (pushdecl): Likewise.
  1100. (pushdecl_with_scope): Likewise.
  1101. (check_previous_goto_1): Likewise.
  1102. (define_label): Likewise.
  1103. (finish_case_label): Likewise.
  1104. (lookup_tag): Likewise.
  1105. (unqualified_namespace_lookup): Likewise.
  1106. (lookup_name_real): Likewise.
  1107. (lookup_name_current_level): Likewise.
  1108. (lookup_type_current_level): Likewise.
  1109. (record_builtin_type): Likewise.
  1110. (cp_make_fname_decl): Likewise.
  1111. (maybe_inject_for_scope_var): Likewise.
  1112. (cp_finish_decl): Remove check for doing_semantic_analysis_p.
  1113. (start_function): Use begin_scope, not pushlevel.
  1114. (finish_function): Use "kind" field in binding_level, not
  1115. the various flags.
  1116. (start_method): Use begin_scope, not pushlevel.
  1117. (make_label_decl): Do not check expanding_p.
  1118. (save_function-data): Do not set expanding_p.
  1119. (cxx_push_function_context): Do not clear expanding_p.
  1120. * semantics.c (cxx_expand_function_start): Do not set expanding_p.
  1121. 2003-09-14 Mark Mitchell <mark@codesourcery.com>
  1122. * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
  1123. an bit-field whose width exceeds that of its type.
  1124. 2003-09-14 Geoffrey Keating <geoffk@apple.com>
  1125. * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
  1126. 2003-09-14 Kazu Hirata <kazu@cs.umass.edu>
  1127. * ChangeLog: Follow spelling conventions.
  1128. * parser.c: Likewise.
  1129. 2003-09-13 Richard Henderson <rth@redhat.com>
  1130. * decl2.c (finish_file): Check cgraph_assemble_pending_functions
  1131. during relaxation loop.
  1132. 2003-09-11 David Edelsohn <edelsohn@gnu.org>
  1133. * decl2.c (var_finalized_p): Swap arms of conditional.
  1134. 2003-09-10 Nathan Sidwell <nathan@codesourcery.com>
  1135. PR c++/11788
  1136. * typeck.c (build_address): If it is a function, mark it used.
  1137. (build_unary_op): Do not lose object's side-effects when taking
  1138. address of static member function.
  1139. * class.c (resolve_address_of_overloaded_function): Use
  1140. tsubst_flags_t parameter. Only expect overload sets. Adjust.
  1141. (instantiate_type): Adjust flags passing. Do not lose object's
  1142. side-effects when taking address of static member function.
  1143. 2003-09-11 Richard Henderson <rth@redhat.com>
  1144. * semantics.c (expand_or_defer_fn): Update for new
  1145. cgraph_finalize_function argument.
  1146. 2003-09-10 Richard Henderson <rth@redhat.com>
  1147. * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
  1148. 2003-09-10 Jan Hubicka <jh@suse.cz>
  1149. * decl2.c (var_finalized_p): New.
  1150. (maybe_emit_vtables, write_out_vars, finish_file): Use it.
  1151. 2003-09-10 Richard Henderson <rth@redhat.com>
  1152. * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
  1153. mark_member_pointers.
  1154. (lower_function): Remove.
  1155. * cp-tree.h: Update to match.
  1156. * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
  1157. (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
  1158. 2003-09-09 Richard Henderson <rth@redhat.com>
  1159. * semantics.c (expand_or_defer_fn): Update call to
  1160. cgraph_finalize_function.
  1161. * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
  1162. always.
  1163. * decl2.c (finish_file): Avoid out-of-bounds array reference
  1164. during memmove.
  1165. 2003-09-09 Richard Henderson <rth@redhat.com>
  1166. * decl2.c (mark_member_pointers): Rename from
  1167. mark_member_pointers_and_eh_handlers and don't check eh handlers.
  1168. 2003-09-09 Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
  1169. PR bootstrap/12168
  1170. * method.c (use_thunk): Clear DECL_RTL of copied nodes.
  1171. 2003-09-08 Mark Mitchell <mark@codesourcery.com>
  1172. * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
  1173. c_register_builtin_type.
  1174. PR c++/11786
  1175. * decl2.c (add_function): Do not complain about seeing the same
  1176. non-function twice.
  1177. * semantics.c (perform_koenig_lookup): Improve documentation.
  1178. PR c++/5296
  1179. * pt.c (try_one_overload): Add addr_p parameter.
  1180. (resolve_overloaded_unification): Pass it.
  1181. 2003-09-08 Richard Henderson <rth@redhat.com>
  1182. * optimize.c (maybe_clone_body): Inc/dec function_depth.
  1183. 2003-09-08 Richard Henderson <rth@redhat.com>
  1184. * decl.c (finish_function): Clear current_function_decl.
  1185. * decl2.c (mark_used): Don't push/pop gc context.
  1186. * optimize.c (optimize_function): Likewise.
  1187. * tree.c (cp_cannot_inline_tree_fn): Likewise.
  1188. * pt.c (instantiate_decl): Inc/dec function_depth instead.
  1189. * semantics.c (expand_body): Update for tree_rest_of_compilation
  1190. nested argument.
  1191. 2003-09-07 Gabriel Dos Reis <gcc@integrable-solutions.net>
  1192. PR c++/11762
  1193. * error.c (dump_decl): Handle namespace-alias-definition.
  1194. * decl.c (warn_extern_redeclared_static): There is no point in
  1195. checking changes in storage class specifier for a namespace
  1196. declaration.
  1197. (duplicate_decls): Tidy diagnostic message.
  1198. * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
  1199. (pp_cxx_right_brace): Likewise.
  1200. (pp_cxx_original_namespace_definition): New function.
  1201. (pp_cxx_namespace_alias_definition): Likewise.
  1202. (pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
  1203. 2003-09-07 Jan Hubicka <jh@suse.cz>
  1204. * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
  1205. Avoid re-emitting variables in unit-at-a-time mode.
  1206. 2003-09-06 Mark Mitchell <mark@codesourcery.com>
  1207. PR c++/11867
  1208. * call.c (standard_conversion): Improve comments.
  1209. (perform_direct_initialization): Make sure we return an expression
  1210. of the correct type.
  1211. * typeck.c (build_static_cast): Check for ambiguity and
  1212. accessibility when performing conversions.
  1213. 2003-09-06 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1214. * cp-tree.h (add_binding): Remove declaration.
  1215. * name-lookup.h (supplement_binding): Declare.
  1216. * decl.c (add_binding): Move to name-lookup.c.
  1217. (push_local_binding): Adjust.
  1218. (push_class_binding): Likewise.
  1219. (set_identifier_type_value_with_scope): Likewise.
  1220. * name-lookup.c (supplement_binding): Rename from add_binding.
  1221. Return a bool. Improve documentation.
  1222. (set_namespace_binding): Adjust.
  1223. * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
  1224. 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
  1225. PR c++/11794
  1226. * class.c (pushclass): Push dependent using decls for nested
  1227. classes of templates too.
  1228. 2003-09-06 Roger Sayle <roger@eyesopen.com>
  1229. PR c++/11409
  1230. * class.c (resolve_address_of_overloaded_function): When building
  1231. list of matching non-template function decls, ignore anticipated
  1232. declarations of undeclared or shadowed GCC builtins.
  1233. 2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
  1234. PR c++/11595
  1235. * decl.c (define_label): Remove unreachable timevar pop.
  1236. Always return the decl, even if the definition is invalid.
  1237. 2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
  1238. PR c++/12167
  1239. * parser.c (cp_parser_late_parsing_default_args): Push & pop the
  1240. unparsed functions queue.
  1241. 2003-09-05 Mark Mitchell <mark@codesourcery.com>
  1242. PR c++/12163
  1243. * call.c (perform_direct_initialization): Correct logic for
  1244. direct-initialization of a class type.
  1245. PR c++/12146
  1246. * pt.c (lookup_template_function): Robustify.
  1247. 2003-09-05 Nathan Sidwell <nathan@codesourcery.com>
  1248. PR c++/11922
  1249. * pt.c (tsubst_qualified_id): Make sure we get a non-type.
  1250. (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
  1251. is_type_p to lookup_qualified_name.
  1252. * semantics.c (finish_call_expr): Refactor some code.
  1253. PR c++/12037
  1254. * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
  1255. (build_min_non_dep): Declare.
  1256. * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
  1257. (build_min_non_dep): New.
  1258. * cvt.c (convert_to_void): Don't explicitly copy
  1259. TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
  1260. * call.c (build_new_method_call): Use build_min_non_dep.
  1261. * decl2.c (grok_array_decl): Likewise.
  1262. (build_offset_ref_call_from_tree): Likewise.
  1263. * typeck.c (finish_class_member_access_expr,
  1264. build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
  1265. build_x_conditional_expr, build_x_compound_expr): Likewise.
  1266. (build_static_cast, build_reinterpret_cast,
  1267. build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
  1268. * typeck2.c (build_x_arrow): Use build_min_non_dep.
  1269. (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
  1270. template.
  1271. * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
  1272. (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
  1273. * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
  1274. 2003-09-04 Richard Henderson <rth@redhat.com>
  1275. * decl2.c (mark_member_pointers_and_eh_handlers): Update for
  1276. change in cgraph_mark_needed_node arguments.
  1277. 2003-09-02 Geoffrey Keating <geoffk@apple.com>
  1278. PR 12161
  1279. * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
  1280. * tree.c (cp_cannot_inline_tree_fn): Likewise.
  1281. 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
  1282. * cp-tree.h (finish_sizeof, finish_alignof): Remove.
  1283. (expr_sizeof): Replace with ...
  1284. (cxx_sizeof_or_alignof_expr): ... here.
  1285. (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
  1286. * parser.c (cp_parser_unary_expression): Commonize alignof and
  1287. sizeof handling.
  1288. * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
  1289. substitution.
  1290. * semantics.c (finish_sizeof, finish_alignof): Remove.
  1291. * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
  1292. becomes bool. Set TREE_READONLY.
  1293. (expr_sizeof): Replace with ...
  1294. (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
  1295. 2003-09-04 Mark Mitchell <mark@codesourcery.com>
  1296. Remove cast-as-lvalue extension.
  1297. * call.c (build_conditional_expr): Correct formatting.
  1298. (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
  1299. (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
  1300. * cp-tree.h (non_cast_lvalue_p): Remove.
  1301. (real_non_cast_lvalue_p): Remove.
  1302. (non_cast_lvalue_or_else): Remove.
  1303. * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
  1304. (real_lvalue_p): Adjust call to lvalue_p_1.
  1305. (non_cast_lvalue_p): Remove.
  1306. (non_cast_lvalue_or_else): Remove.
  1307. (lvalue_p): Adjust call to lvalue_p_1.
  1308. (lvalue_or_else): Simplify.
  1309. * typeck.c (build_unary_op): Use lvalue_or_else, not
  1310. non_cast_lvalue_or_else.
  1311. (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
  1312. 2003-09-03 DJ Delorie <dj@redhat.com>
  1313. * decl.c (finish_function): Pass fndecl to aggregate_value_p.
  1314. 2003-09-03 Mark Mitchell <mark@codesourcery.com>
  1315. PR c++/12053
  1316. * class.c (include_empty_classes): Correct logic for ABI version 1.
  1317. 2003-09-03 Richard Henderson <rth@redhat.com>
  1318. * optimize.c (optimize_function): Push/pop ggc context around
  1319. the call to optimize_inline_calls.
  1320. 2003-09-02 Scott Brumbaugh <scottb.lists@verizon.net>
  1321. PR c++/11553
  1322. * parser.c (cp_parser_decl_specifier_seq): Add check for a
  1323. duplicate friend decl-specifier.
  1324. 2003-09-02 Mark Mitchell <mark@codesourcery.com>
  1325. PR c++/11847
  1326. * pt.c (convert_nontype_argument): Correct representation of
  1327. REFERENCE_TYPE expressions.
  1328. PR c++/11808
  1329. * cp-tree.h (KOENIG_LOOKUP_P): New macro.
  1330. (finish_call_expr): Change prototype.
  1331. * parser.c (cp_parser_postfix_expression): Adjust call to
  1332. finish_call_expr.
  1333. * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
  1334. * semantics.c (finish_call_expr): Add koenig_p parameter.
  1335. 2003-09-01 Mark Mitchell <mark@codesourcery.com>
  1336. PR c++/12114
  1337. * cp-tree.h (initialize_reference): Change prototype.
  1338. * call.c (initialize_reference): Add cleanup parameter.
  1339. * decl.c (grok_reference_init): Likewise.
  1340. (check_initializer): Likewise.
  1341. (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
  1342. (duplicate_decls): When replacing an anticipated builtin, do not
  1343. honor TREE_NOTHROW.
  1344. * typeck.c (convert_for_initialization): Correct call to
  1345. initialize_reference.
  1346. PR c++/11972
  1347. * pt.c (dependent_type_p_r): Pass only the innermost template
  1348. arguments to any_dependent_template_arguments_p.
  1349. 2003-09-01 Josef Zlomek <zlomekj@suse.cz>
  1350. * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
  1351. * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
  1352. * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
  1353. * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
  1354. (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
  1355. 2003-08-29 Mark Mitchell <mark@codesourcery.com>
  1356. PR c++/12093
  1357. * pt.c (build_non_dependent_expr): Do not build a
  1358. NON_DEPENDENT_EXPR for a STRING_CST.
  1359. PR c++/11928
  1360. * search.c (add_conversions): Avoid adding two conversion
  1361. operators for the same type.
  1362. 2003-08-29 Mark Mitchell <mark@codesourcery.com>
  1363. PR c++/6196
  1364. * pt.c (tsubst_copy_and_build): Correct handling of
  1365. address-of-label extension.
  1366. * semantics.c (finish_goto_stmt): The address of a label must go
  1367. through the lvalue-to-rvalue conversion.
  1368. 2003-08-29 Richard Henderson <rth@redhat.com>
  1369. Jason Merrill <jason@redhat.com>
  1370. * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
  1371. (LANG_HOOKS_RTL_EXPAND_STMT): New.
  1372. * cp-tree.h (cxx_expand_function_start): Declare.
  1373. * decl.c (start_function): Use allocate_struct_function.
  1374. Move stmts_are_full_exprs_p assertion from expand_body.
  1375. Do not free_after_parsing or free_after_compilation.
  1376. (cxx_push_function_context): Move code to set struct function
  1377. data from genrtl_start_function.
  1378. * optimize.c (optimize_function): Don't inc/dec function_depth.
  1379. * semantics.c (expand_body): Use tree_rest_of_compilation.
  1380. (cxx_expand_function_start): Rename from genrtl_start_function,
  1381. omit bits done by tree_rest_of_compilation.
  1382. (genrtl_finish_function): Remove.
  1383. (clear_decl_rtl): Move to ../tree-optimize.c.
  1384. 2003-08-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1385. PR c++/11811
  1386. * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
  1387. function.
  1388. * cxx-pretty-print.h: Declare.
  1389. * error.c (dump_template_parameter): Use it.
  1390. (dump_type): Likewise.
  1391. 2003-08-28 Mark Mitchell <mark@codesourcery.com>
  1392. * init.c (decl_constant_value): Deal with COND_EXPR specially.
  1393. * call.c (build_conditional_expr): Revert previous patch.
  1394. PR optimization/5079
  1395. * call.c (build_conditional_expr): Use decl_constant_value to
  1396. simplify the arguments.
  1397. 2003-08-26 Dan Nicolaescu <dann@ics.uci.edu>
  1398. * parser.c (struct cp_token): Use enum bitfields.
  1399. (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
  1400. 512B allocation unit.
  1401. (cp_parser_token_tree_map_node): Use enum bitfields.
  1402. 2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
  1403. PR c++/11871
  1404. * decl.c (push_class_level_binding): Correct old_decl value from
  1405. my 2003-07-29 reorganization.
  1406. * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
  1407. (build_new_method_call): Add goto finish.
  1408. * semantics.c (simplify_aggr_init_exprs_r): Don't set
  1409. TREE_SIDE_EFFECTS on a call.
  1410. 2003-08-25 Richard Henderson <rth@redhat.com>
  1411. * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
  1412. 2003-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1413. * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
  1414. (cxx_pretty_printer): Adjust base type.
  1415. (pp_cxx_function_specifier): Declare.
  1416. * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
  1417. (pp_cxx_left_paren): Likewise.
  1418. (pp_cxx_right_paren): Likewise.
  1419. (pp_cxx_dot): Likewise.
  1420. (pp_cxx_arrow): Likewise.
  1421. (pp_cxx_semicolon): Likewise.
  1422. (pp_cxx_identifier): Likewise.
  1423. (pp_cxx_cv_qualifier_seq): Likewise.
  1424. (pp_cxx_storage_class_specifier): Likewise.
  1425. (pp_cxx_expression_list): Likewise.
  1426. (pp_cxx_space_for_pointer_operator): Likewise.
  1427. (pp_cxx_init_declarator): Likewise.
  1428. (pp_cxx_call_argument_list): Likewise.
  1429. (pp_cxx_nonconsecutive_character): Tidy.
  1430. (pp_cxx_conversion_function_id): New function.
  1431. (pp_cxx_template_id): Likewise.
  1432. (pp_cxx_template_keyword_if_needed): Likewise.
  1433. (pp_cxx_nested_name_specifier): Likewise.
  1434. (pp_cxx_unqualified_id): Tidy
  1435. (pp_cxx_qualified_id): Handle more nodes.
  1436. (pp_cxx_primary_expression): Tidy.
  1437. (pp_cxx_postfix_expression): Likewise.
  1438. (pp_cxx_new_expression): Tidy.
  1439. (pp_cxx_delete_expression): Likewise.
  1440. (pp_cxx_cast_expression): New function.
  1441. (pp_cxx_pm_expression): Tidy.
  1442. (pp_cxx_conditional_expression): Likewise.
  1443. (pp_cxx_assignment_operator): New function.
  1444. (pp_cxx_assignment_expression): Tidy.
  1445. (pp_cxx_expression): New function.
  1446. (pp_cxx_function_specifier): Likewise.
  1447. (pp_cxx_decl_specifier_seq): Likewise.
  1448. (pp_cxx_simple_type_specifier): Tidy.
  1449. (pp_cxx_type_specifier_seq): Likewise.
  1450. (pp_cxx_ptr_operator): New function.
  1451. (pp_cxx_implicit_parameter_type): Likewise.
  1452. (pp_cxx_parameter_declaration): Tidy.
  1453. (pp_cxx_parameter_declaration_clause): New function.
  1454. (pp_cxx_exception_specification): Likewise.
  1455. (pp_cxx_direct_declarator): Tidy.
  1456. (pp_cxx_declarator): Likewise.
  1457. (pp_cxx_ctor_initializer): New function.
  1458. (pp_cxx_function_definition): Likewise.
  1459. (pp_cxx_abstract_declarator): Tidy.
  1460. (pp_cxx_direct_abstract_declarator): Likewise.
  1461. (pp_cxx_type_id): Likewise.
  1462. (pp_cxx_exception_declaration): New function.
  1463. (pp_cxx_statement): Likewise.
  1464. (pp_cxx_simple_declaration): Likewise.
  1465. (pp_cxx_template_parameter_list): Likewise.
  1466. (pp_cxx_template_parameter): Likewise.
  1467. (pp_cxx_template_declaration): Likewise.
  1468. (pp_cxx_explicit_specialization): Likewise.
  1469. (pp_cxx_explicit_instantiation): Likewise.
  1470. (pp_cxx_declaration): Tidy.
  1471. (pp_cxx_pretty_printer_init): Initialize more fields.
  1472. 2003-08-25 Mark Mitchell <mark@codesourcery.com>
  1473. PR c++/8795
  1474. * cp-tree.h (build_cplus_method_type): Remove.
  1475. * call.c (standard_conversion): Use build_method_type_directly
  1476. instead of build_cplus_method_type.
  1477. * class.c (build_clone): Likewise.
  1478. (adjust_clone_args): Likewise.
  1479. * decl.c (build_ptrmem_type): Likewise.
  1480. (grokdeclarator): Likewise.
  1481. (check_function_type): Likewise.
  1482. * decl2.c (grok_method_quals): Likewise.
  1483. (maybe_retrofit_in_chrg): Likewise.
  1484. * pt.c (copy_default_args_to_explicit_spec): Likewise.
  1485. (tsubst_function_type): Likewise.
  1486. (tsubst): Likewise.
  1487. * tree.c (build_cplus_method_type): Remove.
  1488. * typeck.c (merge_types): Use build_method_type_directly.
  1489. 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1490. PR c++/3765
  1491. * search.c (dfs_access_in_type): Fix typo in comment.
  1492. (dfs_accessible_queue_p): Likewise.
  1493. (dfs_accessible_p): Only terminate when a friend is found.
  1494. (accessible_p): Return immediately if access_in_type allows
  1495. access.
  1496. 2003-08-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1497. PR c++/641, c++/11876
  1498. * friend.c (add_friend): Add complain parameter.
  1499. (make_friend_class): Likewise.
  1500. (do_friend): Adjust add_friend call.
  1501. * decl.c (grokdeclarator): Adjust make_friend_class call.
  1502. * parser.c (cp_parser_member_declaration): Likewise.
  1503. (cp_parser_template_declaration_after_export): Likewise.
  1504. * pt.c (instantiate_class_template): Adjust make_friend_class
  1505. and add_friend call.
  1506. * cp-tree.h (make_friend_class): Adjust declaration.
  1507. (add_friend): Likewise.
  1508. 2003-08-21 Jason Merrill <jason@redhat.com>
  1509. PR c++/11283
  1510. * call.c (build_conditional_expr): Ignore cv-qual differences for
  1511. non-class types.
  1512. 2003-08-21 Mark Mitchell <mark@codesourcery.com>
  1513. PR c++/11551
  1514. * parser.c (cp_parser_id_expression): Add declarator_p parameter.
  1515. (cp_parser_primary_expression): Adjust call to
  1516. cp_parser_id_expression.
  1517. (cp_parser_unqualified_id): Complain about the use of
  1518. typedef-names in a destructor declarator.
  1519. (cp_parser_postfix_expression): Adjust call to
  1520. cp_parser_id_expression.
  1521. (cp_parser_type_parameter): Likewise.
  1522. (cp_parser_template_argument): Likewise.
  1523. (cp_parser_declarator_id): Likewise.
  1524. PR c++/11919
  1525. * call.c (standard_conversion): Use same_type_p, not pointer
  1526. equality, to compare types.
  1527. PR c++/10762
  1528. * parser.c (cp_parser_using_declaration): Check for invalid uses
  1529. of template-ids here...
  1530. * decl2.c (do_class_using_decl): ... rather than here.
  1531. 2003-08-20 Mark Mitchell <mark@codesourcery.com>
  1532. PR c++/11834
  1533. * pt.c (more_specialized): Bump processing_template_decl.
  1534. 2003-08-21 Jason Merrill <jason@redhat.com>
  1535. PR c++/11614
  1536. * decl.c (grokdeclarator): Recognize a flexible array based on the
  1537. type, not the form of the declarator.
  1538. 2003-08-20 Jason Merrill <jason@redhat.com>
  1539. * semantics.c (simplify_aggr_init_expr): Split out from
  1540. simplify_aggr_init_exprs_r. Convert slot address to match
  1541. the return type.
  1542. * cp-tree.h: Declare it.
  1543. * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
  1544. DECL_NAME of a user variable.
  1545. 2003-08-20 Nathan Sidwell <nathan@codesourcery.com>
  1546. PR c++/11945
  1547. * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
  1548. COMPOUND_EXPR.
  1549. * semantics.c (finish_expr_stmt): Always convert to void.
  1550. * typeck.c (build_x_compound_exp): Always convert to void.
  1551. 2003-08-19 Mark Mitchell <mark@codesourcery.com>
  1552. PR c++/11684
  1553. * cp-tree.h (grok_op_properties): Change prototype.
  1554. * decl.c (grok_op_properties): Add complain parameter.
  1555. (grokfndecl): Pass it.
  1556. * pt.c (tsubst_decl): Adjust accordingly.
  1557. PR c++/10926
  1558. * decl.c (start_method): Return immediately if push_template_decl
  1559. does not like the declaration.
  1560. * pt.c (push_template_decl_real): Disallow member template
  1561. destructors.
  1562. PR c++/11036
  1563. * cp-tree.h (add_binding): Add prototype.
  1564. * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
  1565. (maybe_warn_about_overly_private_class): Use
  1566. CLASSTYPE_DESTRUCTORS.
  1567. (pushclass): Adjust call to set_identifier_type_value.
  1568. * decl.c (add_binding): Give it external linkage.
  1569. (push_local_binding): Adjust call to add_binding.
  1570. (push_class_binding): Likewise.
  1571. (set_identifier_type_value_with_scope): Change prototype. Use
  1572. add_binding for global bindings.
  1573. (set_identifier_type_value): Adjust accordingly.
  1574. (pushtag): Likewise.
  1575. (pushdecl): Use set_identifier_type_value, not
  1576. set_identifier_type_value_with_scope.
  1577. (pushdecl_namespace_level): Adjust calls to
  1578. SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
  1579. (pushdecl_class_level): Likewise.
  1580. (lookup_tag): Use select_decl.
  1581. (select_decl): Improve comment.
  1582. (record_builtin_type): Do not call pushdecl.
  1583. (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
  1584. (cp_finish_decl): Adjust call to set_identifier_type_value.
  1585. (check_elaborated_type_specifier): Improve checks for invalid uses
  1586. of typedefs.
  1587. (xref_tag): Adjust call to check_elaborated_type_specifier.
  1588. * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
  1589. * name-lookup.c (set_namespace_binding): Use add_binding.
  1590. * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
  1591. rather than an IDENTIFIER_NODE, to represent built-in types, if
  1592. requested by the caller.
  1593. (cp_parser_postfix_expression): Adjust call.
  1594. (cp_parser_type_specifier): Likewise.
  1595. (cp_parser_elaborated_type_specifier): Adjust call to
  1596. check_elaborated_type_specifier.
  1597. * typeck2.c (build_functional_cast): Do not perform name lookups.
  1598. PR c++/10717
  1599. * decl.c (expand_static_init): Remove unnecessary code.
  1600. 2003-08-19 Andrew Pinski <pinskia@physics.uc.edu>
  1601. PR c++/10538, PR c/5582
  1602. * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
  1603. 2003-08-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1604. PR c++/11174
  1605. * init.c (build_offset_ref): Perform access checking for
  1606. pointer to member correctly.
  1607. 2003-08-19 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1608. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
  1609. 2003-08-18 Nathan Sidwell <nathan@codesourcery.com>
  1610. PR c++/11957
  1611. * cp-tree.h (finish_stmt_expr): Add bool parameter.
  1612. * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
  1613. adjust the stmt_expr here.
  1614. (build_vec_init): Use finish_stmt_expr_expr, convert result to
  1615. array type.
  1616. * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
  1617. call.
  1618. * pt.c (tsubst_copy): Likewise.
  1619. * semantics.c (finish_stmt_expr): Add parameter.
  1620. * pt.c (instantiate_class_template): Push to class's scope before
  1621. tsubsting base.
  1622. 2003-08-17 Jan Hubicka <jh@suse.cz>
  1623. PR C++/11702
  1624. * semantics.c (finish_id_expression): Mark all functions as used.
  1625. 2003-08-16 Nathan Sidwell <nathan@codesourcery.com>
  1626. PR c++/11512
  1627. * cvt.c (convert_to_void): Indicate which side of conditional has
  1628. no effects, and rhs of comma operator. Test for no sideeffect
  1629. expressions here and always build a convert expr.
  1630. * init.c (expand_default_init): Convert the init to void.
  1631. * typeck.c (build_x_compound_expr): Do not check for side effects
  1632. here.
  1633. (build_compound_expr): Do not convert lhs when building a
  1634. template.
  1635. 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
  1636. * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
  1637. * decl2.c (build_offset_ref_call_from_tree): Use
  1638. build_non_dependent_expr.
  1639. * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
  1640. * pt.c (build_non_dependent_expr): Set operand.
  1641. 2003-08-14 Jan Hubicka <jh@suse.cz>
  1642. * decl2.c (mark_member_pointers): Rename to...
  1643. (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
  1644. (lower_function): Update call.
  1645. * except.c (eh_type_info): Break out from ...
  1646. (build_eh_type): ... here; tinfo is already used.
  1647. (finish_eh_spec_block): Mark tinfos as used.
  1648. * semantics.c (finish_handler_params): Mark tinfo as used.
  1649. * cp-tree.h (eh_type_info): Declare.
  1650. 2003-08-15 Nathan Sidwell <nathan@codesourcery.com>
  1651. * pt.c (instantiate_class_template): Set location before
  1652. substuting bases.
  1653. * decl.c (make_typename_type): Use my_friendly_assert.
  1654. * pt.c (tsubst_aggr_type): Rearrange context substitution.
  1655. 2003-08-14 Jan Hubicka <jh@suse.cz>
  1656. * method.c (use_thunk): Expand body directly.
  1657. 2003-08-12 Mark Mitchell <mark@codesourcery.com>
  1658. PR c++/11703
  1659. * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
  1660. determine whether or not to promote types.
  1661. (convert_for_arg_passing): Likewise.
  1662. * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
  1663. templates.
  1664. * pt.c (tsubst_decl): Do not expect it to be set.
  1665. PR c++/9512
  1666. PR c++/10923
  1667. * cp-tree.h (check_elaborated_type_specifier): Declare.
  1668. (handle_class_head): Remove.
  1669. (note_got_semicolon): Likewise.
  1670. (note_list_got_semicolon): Likewise.
  1671. (finish_class_definition): Likewise.
  1672. * decl.c (check_elaborated_type_specifier): Make it public.
  1673. Robustify.
  1674. (handle_class_head): Remove.
  1675. * parser.c (cp_parser_elaborated_type_specifier): Use
  1676. check_elaborated_type_specifier.
  1677. (cp_parser_class_specifier): Do not call finish_class_definition.
  1678. (cp_parser_class_head): Or handle_class_head. Check for
  1679. over-qualified names.
  1680. * semantics.c (finish_class_definition): Remove.
  1681. * parser.c (cp_parser_check_for_definition_in_return_type): New
  1682. function.
  1683. (cp_parser_simple_declaration): Adjust call to
  1684. cp_parser_init_declarator.
  1685. (cp_parser_decl_specifier_seq): Change type of
  1686. declares_class_or_enum parameter.
  1687. (cp_parser_explicit_instantiation): Adjust accordingly.
  1688. (cp_parser_type_specifier): Change type of
  1689. declares_class_or_enum parameter.
  1690. (cp_parser_init_declarator): Add declares_class_or_enum
  1691. parameter.
  1692. (cp_parser_parameter_declaration): Adjust call to
  1693. cp_parser_decl_specifier_seq.
  1694. (cp_parser_function_definition): Likewise.
  1695. (cp_parser_member_declaration): Likewise.
  1696. (cp_parser_single_declaration): Likewise.
  1697. * cp-tree.h (lang_type_class): Remove has_call_overloaded,
  1698. has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
  1699. (TYPE_OVERLOADS_CALL_EXPR): Remove.
  1700. (TYPE_OVERLOADS_ARRAY_REF): Likewise.
  1701. (TYPE_OVERLOADS_ARROW): Likewise.
  1702. (CLASSTYPE_GOT_SEMICOLON): Likewise.
  1703. * class.c (check_bases): Do not set them.
  1704. (finish_struct_1): Likewise.
  1705. * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
  1706. (build_ptrmemfunc_type): Likewise.
  1707. (grok_op_properties): Do not set TYPE_OVERLOADS_*.
  1708. (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
  1709. * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
  1710. * lex.c (note_got_semicolon): Remove.
  1711. (note_list_got_semicolon): Likewise.
  1712. * parser.c (cp_parser_simple_declaration): Do not call
  1713. note_list_got_semicolon.
  1714. * pt.c (list_eq): Remove.
  1715. (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
  1716. (instantiate_class_template): Do not set TYPE_OVERLOADS*.
  1717. (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
  1718. * ptree.c (cxx_print_type): Do not print them.
  1719. * semantics.c (finish_member_class_template): Do not call
  1720. note_list_got_semicolon.
  1721. 2003-08-11 Aldy Hernandez <aldyh@redhat.com>
  1722. * call.c (standard_conversion): Opaque pointers interconvert.
  1723. * testsuite/g++.dg/other/opaque-3.C: New.
  1724. 2003-08-11 Mark Mitchell <mark@codesourcery.com>
  1725. * typeck.c (merge_types): Handle cv-qualified pointer-to-member
  1726. types correctly.
  1727. 2003-08-10 Mark Mitchell <mark@codesourcery.com>
  1728. PR c++/11789
  1729. * cp-tree.h (get_vbase): Remove.
  1730. (get_vbase_types): Remove.
  1731. * init.c (expand_member_init): Correct logic for looking up base
  1732. classes.
  1733. 2003-08-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1734. * error.c (dump_expr): Tidy.
  1735. * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
  1736. (pp_cxx_begin_template_argument_list): Likewise.
  1737. (pp_cxx_end_template_argument_list): Likewise.
  1738. (is_destructor_name): Likewise.
  1739. (pp_cxx_unqualified_id): Likewise.
  1740. (pp_cxx_qualified_id): Likewise.
  1741. (pp_cxx_id_expression): Likewise.
  1742. (pp_cxx_new_expression): Likewise.
  1743. (pp_cxx_delete_expression): Likewise.
  1744. (pp_cxx_pm_expression): Likewise.
  1745. (pp_cxx_type_specifier): Rework.
  1746. (pp_cxx_type_id): Likewise.
  1747. (pp_cxx_primary_expression): Likewise.
  1748. (pp_cxx_postfix_expression): Likewise.
  1749. (pp_cxx_unary_expression): Likewise.
  1750. (pp_cxx_multiplicative_expression): Likewise.
  1751. (pp_cxx_conditional_expression): Likewise.
  1752. (pp_cxx_assignment_expression): Likewise.
  1753. (pp_cxx_pretty_printer_init): Tidy.
  1754. 2003-08-10 Nathan Sidwell <nathan@codesourcery.com>
  1755. * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
  1756. NODE is always a TREE_VEC of nonzero size.
  1757. (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
  1758. * decl2.c (arg_assoc): Template args will be a vec.
  1759. * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
  1760. dump_template_argument_list.
  1761. (dump_template_parms): Args will be a vec.
  1762. * parser.c (cp_parser_template_argument_list): Produce a
  1763. vector, not a list.
  1764. * pt.c (coerce_template_parms): Args are always vectors.
  1765. (mangle_class_name_for_template): Likewise.
  1766. (lookup_template_function): Likewise.
  1767. (lookup_template_class): Likewise.
  1768. (tsubst_template_args): Likewise.
  1769. (tsubst_baselink): Use tsubst_template_args.
  1770. (tsubst_qualified_id): Likewise.
  1771. (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
  1772. (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
  1773. (any_dependent_template_args_p): Args are always vectors.
  1774. * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
  1775. PR c++/11670
  1776. * call.c (convert_like_real): Add rvalue binding error message.
  1777. * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
  1778. really a cast.
  1779. PR c++/10530
  1780. * pt.c (dependent_type_p_r): A dependent template-id is a class
  1781. type with dependent template arguments, or a bound template
  1782. template parameter.
  1783. (type_dependent_expression_p): A template function decl cannot
  1784. have a dependent context.
  1785. 2003-08-07 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1786. PR c++/5767
  1787. * parser.c (cp_parser_class_name): Return immediately when scope
  1788. is error_mark_node.
  1789. 2003-08-07 Aldy Hernandez <aldyh@redhat.com>
  1790. * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
  1791. * cp/call.c (standard_conversion): Support opaque types.
  1792. Include target.h.
  1793. (strip_top_quals): Use cp_build_qualified_type instead of
  1794. TYPE_MAIN_VARIANT.
  1795. * cp/typeck.c (convert_for_assignment): Support opaque types.
  1796. * testsuite/g++.dg/other/opaque-1.C: New.
  1797. * testsuite/g++.dg/other/opaque-2.C: New.
  1798. 2003-08-06 Aldy Hernandez <aldyh@redhat.com>
  1799. * decl.c (grokparms): Use cp_build_qualified_type instead
  1800. TYPE_MAIN_VARIANT.
  1801. 2003-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
  1802. * cxx-pretty-print.h: New file.
  1803. * cxx-pretty-print.c: Likewise.
  1804. * error.c (scratch_pretty_printer): Change type.
  1805. (init_error): Tidy.
  1806. (dump_aggr_type): Likewise.
  1807. (dump_global_iord): Likewise.
  1808. (dump_expr): Likewise.
  1809. (dump_char): Remove.
  1810. * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
  1811. (cxx_initialize_diagnostics): New function.
  1812. * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
  1813. (CXX_PRETTY_PRINT_H): New variable.
  1814. (cp/cxx-pretty-print.o): New rule.
  1815. (cp/cp-lang.o): Update dependence.
  1816. (cp/error.o): Likewise.
  1817. 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
  1818. * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
  1819. (DECL_DECLARED_INLINE_P): Remove.
  1820. * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
  1821. if decl is a FUNCTION_DECL. This never made sense, but now it is
  1822. required to avoid a tree check failure.
  1823. * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
  1824. * optimize.c (maybe_clone_body): Likewise.
  1825. 2003-08-04 Roger Sayle <roger@eyesopen.com>
  1826. * decl.c (cxx_insert_default_attributes): Delete.
  1827. * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
  1828. * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
  1829. 2003-08-03 Nathan Sidwell <nathan@codesourcery.com>
  1830. PR c++/11704
  1831. * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
  1832. unknown type.
  1833. PR c++/11766
  1834. * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
  1835. member functions.
  1836. 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
  1837. PR c++/9447
  1838. * cp-tree.def (USING_DECL): Document its type.
  1839. * class.c (pushclass): If we're entering a template, push any
  1840. dependent using decls it has.
  1841. * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
  1842. a dependent scope.
  1843. * pt.c (tsubst_decl) <USING_DECL case>: Set type.
  1844. (tsubst): Remove USING_DECL checks.
  1845. (type_dependent_expression_p): Remove USING_DECL case.
  1846. * semantics.c (finish_member_declaration): A USING_DECL's type
  1847. indicates whether it is dependent.
  1848. 2003-08-02 Nathan Sidwell <nathan@codesourcery.com>
  1849. * cp-tree.h (pushclass): Remove unneeded parameter.
  1850. * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
  1851. (push_nested_class): Adjust pushclass call.
  1852. * pt.c (instantiate_class_template): Likewise.
  1853. * semantics.c (begin_class_definition): Likewise.
  1854. 2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
  1855. * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
  1856. 2003-08-01 Mark Mitchell <mark@codesourcery.com>
  1857. PR c++/11697
  1858. * decl.c (decls_match): Don't ignore the types of template
  1859. classes.
  1860. PR c++/11744
  1861. * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
  1862. 2003-08-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  1863. PR c++/8442, c++/8806
  1864. * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
  1865. preferred.
  1866. (check_elaborated_type_specifier): Add allow_template_p
  1867. parameter. Check tag mismatch and class template.
  1868. (xref_tag): Add template_header_p parameter. Add assertion
  1869. that name is an IDENTIFIER_NODE. Remove implicit typename
  1870. warning. Simplify lookup process if globalize is true.
  1871. (cxx_init_decl_processing): Adjust call to xref_tag.
  1872. (xref_tag_from_type): Likewise.
  1873. * decl2.c (handle_class_head): Likewise.
  1874. * parser.c (cp_parser_elaborated_type_specifier,
  1875. cp_parser_class_head): Likewise.
  1876. * rtti.c (init_rtti_processing, build_dynamic_cast1,
  1877. tinfo_base_init, emit_support_tinfos): Likewise.
  1878. * class.c (is_base_of_enclosing_class): Remove.
  1879. * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
  1880. template template argument.
  1881. * cp-tree.h (xref_tag): Adjust declaration.
  1882. (is_base_of_enclosing_class): Remove.
  1883. * NEWS: Document template template argument change.
  1884. 2003-08-01 Nathan Sidwell <nathan@codesourcery.com>
  1885. * parser.c (cp_parser_init_declarator,
  1886. cp_paser_member_declaration): Reformat.
  1887. * pt.c (lookup_template_class, type_unification_real, unify,
  1888. type_dependent_expression_p): Reformat.
  1889. PR c++/11295
  1890. * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
  1891. tf_stmt_expr_body.
  1892. (finish_stmt_expr_expr): Declare.
  1893. * parser.c (cp_parser_primary_expression): Tell
  1894. cp_parser_compount_statement that it is a statement expression.
  1895. (cp_parser_statement, cp_parser_labeled_statement,
  1896. cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
  1897. in_statement_expr_p parameter.
  1898. (cp_parser_expression_statement): Likewise. Call
  1899. finish_stmt_expr_expr for final expression of a statement
  1900. expression.
  1901. (cp_parser_for_init_statement,
  1902. cp_parser_implicitly_scoped_statement,
  1903. cp_parser_already_scoped_statement, cp_parser_function_definition,
  1904. cp_parser_try_block, cp_parser_handled): Adjust.
  1905. * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
  1906. (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
  1907. (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
  1908. * semantics.c (finish_expr_stmt): Do not deal with statement
  1909. expressions.
  1910. (begin_stmt_expr): Clear last_expr_type.
  1911. (finish_stmt_expr_expr): New.
  1912. (finish_stmt_expr): Process the value expression.
  1913. * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
  1914. compound expr inside the target's initializer.
  1915. PR c++/11525
  1916. * parser.c (cp_parser_primary_expression): Do not set
  1917. non-constant-p merely because it is a dependent scope.
  1918. PR c++/9447
  1919. * decl2.c (do_class_using_decl): Set type to NULL_TREE.
  1920. * semantics.c (finish_expr_stmt): Do not convert to void in a
  1921. template.
  1922. 2003-07-31 Nathan Sidwell <nathan@codesourcery.com>
  1923. * pt.c (coerce_template_parms): Refactor.
  1924. (fn_type_unification): Increment processing_template_decl when
  1925. tsubsting an incomplete set of explicit args.
  1926. PR c++/11347
  1927. * pt.c (instantiate_class_template): Increment
  1928. processing_template_decl around the tsubst of a template member
  1929. class.
  1930. (tsubst_qualified_id): Assert we do not have a dependent scope.
  1931. * pt.c (coerce_template_template_parms, lookup_template_class,
  1932. can_complete_type_without_circularity, instantiate_class_template,
  1933. tsubst_decl, unify): Reformat.
  1934. 2003-07-31 Jan Hubicka <jh@suse.cz>
  1935. * decl2.c (maybe_make_one_only): Use mark_referenced.
  1936. * method.c (use_thunk): Likewsie.
  1937. 2003-07-30 Jan Hubicka <jh@suse.cz>
  1938. * class.c (build_vtable_entry_ref): Kill.
  1939. (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
  1940. (build_vfn_ref): Do not call build_vtable_entry_ref.
  1941. * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
  1942. * cp-tree.h (prepare_assemble_variable): Kill.
  1943. * cp-decl.c (prepare_assemble_variable): Kill.
  1944. 2003-07-29 Geoffrey Keating <geoffk@apple.com>
  1945. * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
  1946. of setting valid_pch by hand.
  1947. 2003-07-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
  1948. * decl.c (finish_enum): Initialize underlying_type.
  1949. 2003-07-29 Nathan Sidwell <nathan@codesourcery.com>
  1950. PR c++/9447
  1951. * decl.c (add_binding): Add bval local variable.
  1952. (push_class_level_binding): Likewise. Allow a USING_DECL to be
  1953. pushed.
  1954. * decl2.c (do_class_using_decl): The type of a using decl is
  1955. unknown.
  1956. * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
  1957. function call lookup code.
  1958. * pt.c (tsubst): A USING_DECL will have unknown type.
  1959. (tsubst_copy_and_build): Allow a using decl.
  1960. (type_dependent_expression_p): A USING_DECL will make it
  1961. dependent.
  1962. * semantics.c (finish_member_declaration): Push a dependent using
  1963. declaration.
  1964. 2003-07-28 Mark Mitchell <mark@codesourcery.com>
  1965. PR c++/11530
  1966. * parser.c (cp_parser_postfix_expression): Do not call mark_used.
  1967. * semantics.c (finish_id_expression): Call mark_used for all
  1968. declarations.
  1969. 2003-07-28 Mark Mitchell <mark@codesourcery.com>
  1970. PR c++/11667
  1971. * call.c (standard_conversion): Allow all integral->enumeral
  1972. conversions, after marking them as bad.
  1973. * decl.c (finish_enum): Make sure that all enumerators are
  1974. properly converted to the underlying type.
  1975. (build_enumerator): Set DECL_CONTEXT for namespace-scope
  1976. enumeration types.
  1977. * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
  1978. (tsubst_enum): Tidy.
  1979. * Make-lang.in (typeck.o): Depend on convert.h.
  1980. (class.o): Likewise.
  1981. (rtti.o): Likewise.
  1982. * call.c: Include convert.h.
  1983. (convert_arg_to_ellipsis): Use convert_to_real.
  1984. * class.c: Include convert.h.
  1985. (build_base_path): Use convert_to_integer.
  1986. * rtti.c: Include convert.h.
  1987. (build_headof): Use convert_to_integer.
  1988. * typeck.c: Include convert.h.
  1989. (decay_conversion): Use convert_to_integer.
  1990. (build_unary_op): Use build_nop.
  1991. (get_delta_difference): Use convert_to_integer.
  1992. (build_ptrmemfunc): Avoid unnecessary conversions.
  1993. 2003-07-28 Jan Hubicka <jh@suse.cz>
  1994. * decl2.c (mark_member_pointers): Verify that member pointer points to
  1995. the function.
  1996. 2003-07-28 Nathan Sidwell <nathan@codesourcery.com>
  1997. * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
  1998. (finish_compound_stmt): Remove no scope arg.
  1999. * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
  2000. end_compound_stmt calls.
  2001. (expand_static_init, begin_destructor_body, begin_function_body,
  2002. finish_function_body): Likewise.
  2003. * decl2.c (start_objects, finish_objects,
  2004. start_static_storage_duration_function,
  2005. finish_static_storage_duration_function): Likewise.
  2006. * init.c (begin_init_stmts, finish_init_stmts,
  2007. construct_virtual_base, build_vec_init): Likewise.
  2008. * method.c (do_build_assign_ref, synthesize_method): Likewise.
  2009. * parser.c (cp_parser_compound_statement,
  2010. cp_parser_implicitly_scoped_statement,
  2011. cp_parser_already_scoped_statement): Likewise.
  2012. * pt.c (tsubst_expr): Likewise.
  2013. * semantics.c (begin_compound_stmt): No scope arg is a bool.
  2014. (finish_compound_stmt): Remove no scope arg.
  2015. * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
  2016. always dyadic.
  2017. 2003-07-27 Mark Mitchell <mark@codesourcery.com>
  2018. * call.c (standard_conversion): Tweak handling of
  2019. pointer-to-member types.
  2020. * pt.c (tsubst): Correctly qualify pointers-to-data member types.
  2021. * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
  2022. pointer-to-data member types.
  2023. 2003-07-27 Nathan Sidwell <nathan@codesourcery.com>
  2024. * parser.c (cp_parser_type_parameter): Reformat.
  2025. (cp_parser_parameter_declaration): Deprecate default args where
  2026. not allowed.
  2027. 2003-07-26 Nathan Sidwell <nathan@codesourcery.com>
  2028. * cfns.h: Rebuilt.
  2029. * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
  2030. (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
  2031. * init.c (begin_init_stmts): Make static. Return is_global
  2032. value. Always call begin_stmt_expr.
  2033. (finish_init_stmts): Make static. Add is_global parm. Always
  2034. building a stmt tree.
  2035. (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
  2036. (build_vec_init): Likewise. Always building a stmt tree.
  2037. (expand_default_init): Always building a stmt tree.
  2038. (get_temp_regvar): Likewise.
  2039. * semantics.c (begin_global_stmt_expr,
  2040. finish_global_stmt_expr): Remove.
  2041. 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
  2042. * cp-tree.h (build_compound_expr): Take LHS & RHS args.
  2043. (build_x_compound_expr_from_list): Declare.
  2044. * typeck.c (build_x_compound_expr_from_list): New.
  2045. (build_x_compound_expr): Adjust.
  2046. (build_compound_expr): Remove unreachable code. Take two
  2047. parameters, adjust.
  2048. * decl.c (grok_reference_init): Use
  2049. build_x_compound_expr_from_list.
  2050. (expand_static_init): Adjust build_compound_expr call.
  2051. (cxx_maybe_build_cleanup): Likewise.
  2052. * init.c (perform_member_init): Use
  2053. build_x_compound_expr_from_list.
  2054. (build_new_1): Likewise.
  2055. (build_vec_delete): Adjust build_compound_expr calls.
  2056. (build_vbase_delete): Likewise.
  2057. * typeck2.c (store_init_value): Use
  2058. build_x_compound_expr_from_list.
  2059. (build_functional_cast): Likewise.
  2060. 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
  2061. * cp-tree.h (enum tsubst_flags_t): Add tf_user.
  2062. * decl.c (make_typename_type): Pass it.
  2063. * pt.c (lookup_template_class): Use it.
  2064. (resolve_typename_type): Pass it.
  2065. * semantics.c (finish_template_type): Pass it.
  2066. 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
  2067. PR c++/11617
  2068. * cp-tree.h (qualified_name_lookup_error): Declare.
  2069. * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
  2070. errors.
  2071. (tsubst_expr) <DECL_STMT case>: Likewise.
  2072. (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
  2073. * semantics.c (qualified_name_lookup_error): New, broken out of ...
  2074. (finish_id_expression): ... here. Use it.
  2075. 2003-07-25 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
  2076. * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
  2077. 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
  2078. PR c++/11596
  2079. * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
  2080. (tsubst_template_arg): New.
  2081. (tsubst_template_arg_vector): Rename to ...
  2082. (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
  2083. tsubst_template_arg.
  2084. (coerce_template_parms): Use tsubst_template_arg for default
  2085. value.
  2086. (tsubst_template_parms): Likewise.
  2087. (tsubst_aggr_type): Adjust.
  2088. (tsubst_decl): Likewise.
  2089. (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
  2090. (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
  2091. 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2092. * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
  2093. * error.c: Use the new pretty-printer framework.
  2094. 2003-07-24 Per Bothner <pbothner@apple.com>
  2095. * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
  2096. which causes errors messages to incorrectly mention included files.
  2097. 2003-07-24 Mark Mitchell <mark@codesourcery.com>
  2098. * cp-tree.h (convert_to_base_statically): Declare.
  2099. * call.c (build_special_member_call): Convert INSTANCE to the base
  2100. type.
  2101. * class.c (convert_to_base_statically): New method.
  2102. * init.c (construct_virtual_base): Use it.
  2103. * method.c (do_build_assign_ref): Fix typo in comment.
  2104. 2003-07-24 Jason Merrill <jason@redhat.com>
  2105. * decl.c: Just set truthvalue_* to boolean_*.
  2106. 2003-07-24 Nathan Sidwell <nathan@codesourcery.com>
  2107. * decl.c (reshape_init): Remove unreachable code.
  2108. 2003-07-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2109. PR c++/11513
  2110. * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
  2111. 2003-07-23 Mark Mitchell <mark@codesourcery.com>
  2112. PR c++/11645
  2113. * cp-tree.h (accessible_base_p): Declare.
  2114. * call.c (build_over_call): Use it.
  2115. * search.c (accessible_base_p): New function, split out from ...
  2116. (lookup_base): ... here.
  2117. PR c++/11517
  2118. * call.c (build_conditional_expr): Use perform_implicit_conversion
  2119. and error_operand_p. Robustify.
  2120. * typeck.c (build_unary_op): Use perform_implicit_conversion.
  2121. 2003-07-23 Nathan Sidwell <nathan@codesourcery.com>
  2122. PR c++/10953
  2123. * parser.c (cp_parser_nested_name_specifier): Reset scope on
  2124. failure.
  2125. (cp_parser_elaborated_type_specifier): Likewise.
  2126. 2003-07-22 Mark Mitchell <mark@codesourcery.com>
  2127. Eliminate use of POINTER_TYPE for pointers-to-members.
  2128. * call.c (standard_conversion): Rework pointer-to-member handling.
  2129. Add comments.
  2130. (add_builtin_candidate): Likewise.
  2131. (resolve_scoped_fn_name): Remove.
  2132. (build_conditional_expr): Rework pointer-to-member handling.
  2133. (compare_ics): Likewise.
  2134. * class.c (check_field_decls): Use TYPE_PTR_P.
  2135. * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
  2136. handling.
  2137. * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
  2138. (TYPE_PTRMEM_P): Add comment.
  2139. (TYPE_PTR_P): Simplify.
  2140. (TYPE_PTROB_P): Correct definition.
  2141. (TYPE_PTR_TO_MEMBER_P): New macro.
  2142. (TYPE_PTRMEM_CLASS_TYPE): Adjust.
  2143. (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
  2144. (resolved_scoped_fn_name): Remove declaration.
  2145. (build_offset_ref): Change prototype.
  2146. (resolve_offset_ref): Remove.
  2147. (comp_target_types): Remove.
  2148. * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
  2149. handling.
  2150. (convert_to_reference): Use can_convert.
  2151. (ocp_convert): Improve error handling. Rework pointer-to-member
  2152. handling.
  2153. (perform_qualification_conversions): Rework pointer-to-member
  2154. handling.
  2155. * decl.c (build_ptrmem_type): Handle functions too.
  2156. (create_array_type_for_decl): Remove OFFSET_TYPE error message.
  2157. (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
  2158. (grokparms): Remove OFFSET_TYPE error message.
  2159. * dump.c (cp_dump_tree): Rework pointer-to-member handling.
  2160. * error.c (dump_type_prefix): Likewise.
  2161. * expr.c (cplus_expand_constant): Use build_nop.
  2162. * init.c (build_offset_ref): Add address_p parameter. Fold in
  2163. necessary bits from resolve_offset_ref.
  2164. (resolve_offset_ref): Remove.
  2165. * parser.c (cp_parser_postfix_expression): Remove special case
  2166. code for OFFSET_TYPE.
  2167. * pt.c (convert_nontype_argument): Rework pointer-to-member
  2168. handling.
  2169. (convert_template_argument): Likewise.
  2170. (unify): Likewise.
  2171. (invalid_nontype_parm_type_p): Likewise.
  2172. (dependent_type_p_r): Likewise.
  2173. * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
  2174. (target_incomplete_p_): Rework pointer-to-member
  2175. handling.
  2176. (get_pseudo_ti_init): Likewise.
  2177. (get_pseudo_ti_desc): Likewise.
  2178. * semantics.c (finish_qualified_id_expr): Adjust call to
  2179. build_offset_ref. Remove use of resolve_offset_ref.
  2180. * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
  2181. * typeck.c (target_type): Use TYPE_PTRMEM_P.
  2182. (type_unknown_p): Remove obsolete code about the time before
  2183. non-dependent expressions were handled correctly.
  2184. (qualify_type_recursive): Remove.
  2185. (composite_pointer_type_r): New function.
  2186. (composite_pointer_type): Use it.
  2187. (merge_types): Remove dead comments.
  2188. (comp_cv_target_types): Remove.
  2189. (comp_target_types): Likewise.
  2190. (comp_target_parms): Likewise.
  2191. (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
  2192. (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
  2193. (build_binary_op): Do not use of comp_target_types.
  2194. (pointer_diff): Remove OFFSET_TYPE case.
  2195. (build_unary_op): Adjust pointer-to-member handling.
  2196. (unary_complex_lvalue): Likewise.
  2197. (check_for_casting_away_constness): Add description parameter.
  2198. (build_static_cast): Pass it.
  2199. (build_reinterpret_cast): Use check_for_casting_away_constness.
  2200. (build_const_cast): Adjust pointer-to-member handling.
  2201. (build_c_cast): Likewise.
  2202. (convert_for_assignment): Remove OFFSET_TYPE error message.
  2203. (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
  2204. (comp_ptr_ttypes_reinterpret): Remove.
  2205. (casts_away_constness_r): Adjust pointer-to-member handling.
  2206. (casts_away_constness): Liekwise.
  2207. (strip_all_pointer_quals): Remove.
  2208. * typeck2.c (digest_init): Adjust pointer-to-member handling.
  2209. (build_m_component_ref): Likewise.
  2210. 2003-07-22 Wolfgang Bangerth <bangerth@dealii.org>
  2211. * lex.c (unqualified_fn_lookup_error): Mention that the error
  2212. message needs to be kept in synch with the manual.
  2213. 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
  2214. PR c++/11614
  2215. * decl.c (grokdeclarator): An array member is only a flexible
  2216. array member if the field itself is the array.
  2217. 2003-07-22 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2218. PR c++/10793
  2219. * decl.c (xref_basetypes): Handle error_mark_node.
  2220. 2003-07-22 Nathan Sidwell <nathan@codesourcery.com>
  2221. * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
  2222. * tree.c (lvalue_p_1): Set it.
  2223. * class.c (check_field): Don't allow non-packed non-POD fields to
  2224. be packed.
  2225. * call.c (reference_binding): Need a temporary for all bitfield
  2226. and packed fields.
  2227. (convert_like_real): Check it is ok to make a temporary here.
  2228. 2003-07-21 Nathan Sidwell <nathan@codesourcery.com>
  2229. * cp-tree.h (hack_identifier): Remove.
  2230. * method.c (hack_identifier): Remove.
  2231. * semantics.c (finish_id_expression): Expand hack_identifier
  2232. here. Simplify.
  2233. 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2234. * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
  2235. semantics.c typeck.c: Remove unnecessary casts.
  2236. 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
  2237. * cp-tree.h (hack_identifier): Remove.
  2238. * method.c (hack_identifier): Remove.
  2239. * semantics.c (finish_id_expression): Expand hack_identifier
  2240. here. Simplify.
  2241. 2003-07-18 Nathan Sidwell <nathan@codesourcery.com>
  2242. * cp-tree.h (finish_non_static_data_member): Add object param.
  2243. * method.c (hack_identifier): Adjust.
  2244. * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
  2245. again for a FIELD_DECL.
  2246. * semantics.c (finish_non_static_data_member): Add object
  2247. parameter. Always save the DECL in the COMPONENT_REF.
  2248. * call.c (resolve_scoped_fn_name): Adjust.
  2249. 2003-07-17 Zack Weinberg <zack@codesourcery.com>
  2250. * pt.c (get_bindings): Make definition consistent with
  2251. forward declaration.
  2252. 2003-07-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2253. PR c++/7809
  2254. * friend.c (add_friend): Check access for member functions
  2255. and templates.
  2256. 2003-07-17 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2257. PR c++/10668
  2258. * typeck.c (build_class_member_access_expr): Improve diagnostic.
  2259. 2003-07-16 Mark Mitchell <mark@codesourcery.com>
  2260. PR c++/11547
  2261. * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
  2262. macro.
  2263. (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
  2264. * decl.c (duplicate_decls): Merge
  2265. DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
  2266. * parser.c (cp_parser_postfix_expression): Adjust call to
  2267. cp_parser_initializer_list and
  2268. cp_parser_parenthesized_expression_list.
  2269. (cp_parser_parenthesized_expression_list): Add non_constant_p.
  2270. (cp_parser_new_placement): Adjust call to
  2271. cp_parser_parenthesized_expression_list.
  2272. (cp_parser_direct_new_declarator): Likewise.
  2273. (cp_parser_conditional_expression): Remove.
  2274. (cp_parser_constant_expression): Parse an assignment-expression,
  2275. not a conditional-expression.
  2276. (cp_parser_simple_declaration): Resolve expression/declaration
  2277. ambiguity more quickly.
  2278. (cp_parser_mem_initializer): Adjust call to
  2279. cp_parser_parenthesized_expression_list.
  2280. (cp_parser_init_declarator): Keep track of whether or not the
  2281. initializer is a constant-expression.
  2282. (cp_parser_initializer): Add non_constant_p parameter.
  2283. (cp_parser_initializer_clause): Likewise.
  2284. (cp_parser_initializer_list): Likewise.
  2285. (cp_parser_attribute_list): Adjust call to
  2286. cp_parser_parenthesized_expression_list.
  2287. (cp_parser_functional_cast): Likewise.
  2288. * pt.c (tsubst_decl): Copy
  2289. DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
  2290. (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
  2291. * semantics.c (finish_id_expression): Use
  2292. DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
  2293. 2003-07-16 Neil Booth <neil@daikokuya.co.uk>
  2294. * lang-options.h: Remove.
  2295. 2003-07-16 Andrew Pinski <pinskia@physics.uc.edu>
  2296. PR c/10962
  2297. * class.c (field_decl_cmp): Remove.
  2298. (resort_field_decl_cmp): Remove.
  2299. (resort_sorted_fields): Remove.
  2300. (add_fields_to_vec): Rename to ...
  2301. (add_fields_to_record_type): this.
  2302. (finish_struct_1): Change to be using
  2303. sorted_fields_type's fields.
  2304. * cp-tree.h (lang_decl): In lang_decl_u3
  2305. change sorted_fields to be a pointer to
  2306. sorted_fields_type.
  2307. (resort_sorted_fields): Remove prototype.
  2308. * search.c (lookup_field_1): Change to be using
  2309. sorted_fields_type's fields.
  2310. 2003-07-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2311. PR c++/5421
  2312. * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
  2313. is a member of other class.
  2314. * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
  2315. is a specialization of function template.
  2316. 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2317. PR c++/10903
  2318. * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
  2319. Improve.
  2320. 2003-07-15 Mark Mitchell <mark@codesourcery.com>
  2321. * cp-tree.def (LOOKUP_EXPR): Remove.
  2322. * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
  2323. (LOOKUP_EXPR_GLOBAL): Remove.
  2324. (get_bindings): Remove.
  2325. (is_aggr_type_2): Remove.
  2326. * call.c (resolved_scoped_fn_name): Remove support for
  2327. LOOKUP_EXPR.
  2328. * decl.c (grokfndecl): Likewise.
  2329. (grokdeclarator): Likewise.
  2330. * error.c (dump_decl): Likewise.
  2331. (dump_expr): Likewise.
  2332. * friend.c (do_friend): Likewise.
  2333. * init.c (build_offset_ref): Likewise.
  2334. * lex.c (unqualified_fn_lookup_error): Use pedwarn. Do not create
  2335. LOOKUP_EXPRs
  2336. * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
  2337. * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
  2338. test.
  2339. * pt.c (get_bindings): Give it internal linkage.
  2340. (check_explicit_specialization): Remove support for LOOKUP_EXPR.
  2341. (lookup_template_function): Likewise.
  2342. (for_each_tempalte_parm_r): Likewise.
  2343. (tsubst_decl): Likewise.
  2344. (tsubst_qualified_id): Handle template template parameters.
  2345. (tsubst_copy): Remove support for LOOKUP_EXPR.
  2346. (tsubst_copy_and_build): Likewise.
  2347. (most_general_template): Likewise.
  2348. (value_dependent_expression_p): Likewise.
  2349. (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
  2350. always dependent.
  2351. * semantics.c (perform_koenig_lookup): Do not create
  2352. IDENTIFIER_NODEs.
  2353. (finish_fname): Likewise.
  2354. (finish_id_expression): Likewise.
  2355. * tree.c (is_aggr_type_2): Remove.
  2356. 2003-07-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2357. PR c++/11531
  2358. * typeck.c (check_return_expr): Fix thinko in diagnostic.
  2359. 2003-07-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2360. PR c++/10108
  2361. * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
  2362. error_mark_node.
  2363. 2003-07-14 Mark Mitchell <mark@codesourcery.com>
  2364. PR c++/11509
  2365. * pt.c (dependent_scope_ref_p): New function.
  2366. (value_dependent_expression_p): Use it.
  2367. (type_dependent_expression_p): Likewise.
  2368. * pt.c (tsubst_friend_function): Use reregister_specialization.
  2369. PR c++/7019
  2370. * cp-tree.h (lookup_qualified_name): Adjust prototype.
  2371. * decl.c (lookup_qualified_name): Add complain parameter. Adjust
  2372. call to is_aggr_type.
  2373. * parser.c (cp_parser_lookup_name): Adjust call to
  2374. lookup_qualified_name.
  2375. * pt.c (tsubst_qualified_id): Likewise.
  2376. (tsubst_copy_and_build): Likewise.
  2377. * semantics.c (finish_qualified_id_expr): Deal with erroneous
  2378. expressions.
  2379. 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2380. PR c++/11510
  2381. * call.c (op_error): Properly format REALPART_EXPR and
  2382. IMAGPART_EXPR.
  2383. * error.c (dump_expr): Likewise.
  2384. 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2385. * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
  2386. 2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2387. PR c++/5293
  2388. * call.c (initialize_reference): Improve diagnostic.
  2389. 2003-07-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2390. PR c++/11154
  2391. * pt.c (more_specialized_class): Add full_args parameter.
  2392. (most_specialized_class): Adjust calls to more_specialized_class.
  2393. * cp-tree.h (more_specialized_class): Adjust declaration.
  2394. 2003-07-14 Dan Nicolaescu <dann@ics.uci.edu>
  2395. * lex.c (enum tree_node_kind): Delete.
  2396. 2003-07-13 Mark Mitchell <mark@codesourcery.com>
  2397. PR c++/11503
  2398. * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
  2399. (SET_DECL_SELF_REFERENCE_P): Likewise.
  2400. * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
  2401. * pt.c (tsubst_decl): Copy it.
  2402. * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
  2403. * pt.c (reregister_specialization): Fix thinko in previous change.
  2404. * cp-tree.h (cp_id_kind): New type.
  2405. (unqualified_name_lookup_error): Change prototype.
  2406. (unqualified_fn_lookup_error): New function.
  2407. (do_identifier): Remove.
  2408. (do_scoped_id): Likewise.
  2409. (tsubst_copy_and_build): Change prototype.
  2410. (reregister_specialization): New function.
  2411. (perform_koenig_lookup): Likewise.
  2412. (finish_id_expression): Likewise.
  2413. * call.c (build_method_call): Adjust call to
  2414. unqualified_name_lookup_error.
  2415. * decl.c (duplicate_decls): Use reregister_specialization.
  2416. * lex.c (is_global): Remove.
  2417. (unqualified_name_lookup_error): Return a value.
  2418. (do_identifier): Remove.
  2419. (do_scoped_id): Likewise.
  2420. (identifier_typedecl_value): Remove.
  2421. (unqualified_fn_lookup_error): New function.
  2422. * parser.c (cp_parser_id_kind): Remove.
  2423. (cp_parser_non_constant_id_expression): Remove.
  2424. (cp_parser_primary_expression): Use finish_id_expression.
  2425. (cp_parser_class_or_namespace_name): Use cp_id_kind, not
  2426. cp_parser_id_kind.
  2427. (cp_parser_postfix_expression): Use perform_koenig_lookup.
  2428. (cp_parser_template_argument): Use cp_id_kind.
  2429. (cp_parser_fold_non_dependent_expr): Adjust call to
  2430. tsubst_copy_and_build.
  2431. * pt.c (unregister_specialization): Rename to ...
  2432. (reregister_specialization): This.
  2433. (tsubst_friend_function): Use it.
  2434. (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
  2435. (tsubst_qualified_id): Likewise.
  2436. (tsubst_expr): Likewise.
  2437. (tsubst_copy_and_build): Add function_p parameter. Use
  2438. finish_id_expression. Introduce RECUR macro.
  2439. (tsubst_non_call_postfix_expression): New function.
  2440. (regenerate_decl_from_template): Use reregister_specialization.
  2441. * semantics.c (perform_koenig_lookup): New function.
  2442. (finish_id_expression): Likewise.
  2443. 2003-07-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2444. * pt.c (push_access_scope_real): Remove.
  2445. (push_access_scope): Move code from push_access_scope_real.
  2446. (pop_access_scope): Don't check for TEMPLATE_DECL.
  2447. (instantiate_template): Defer access checking during template
  2448. substitution.
  2449. (regenerate_decl_from_template): Tidy.
  2450. 2003-07-11 Nathanael Nerode <neroden@gcc.gnu.org>
  2451. PR c++/11437
  2452. * operators.def: Add definitions for __imag__, __real__.
  2453. 2003-07-11 Nathan Sidwell <nathan@codesourcery.com>
  2454. PR c++/11050
  2455. * parser.c (cp_parser_expression_list): Rename to ...
  2456. (cp_parser_parenthesized_expression_list): ... here. Add attribute
  2457. parameter, parse the surounding parentheses.
  2458. (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
  2459. parameters. Return int.
  2460. (cp_parser_skip_to_closing_parenthesis or comma): Remove.
  2461. (cp_parser_postfix_expression): Adjust function call parsing.
  2462. (cp_parser_new_placement): Adjust.
  2463. (cp_parser_new_initializer): Likewise.
  2464. (cp_parser_cast_expression): Likewise.
  2465. (cp_parser_selection_statement): Likewise.
  2466. (cp_parser_mem_initializer): Likewise.
  2467. (cp_parser_asm_definition): Likewise.
  2468. (cp_parser_init_declarator): Likewise.
  2469. (cp_parser_declarator): Make
  2470. cdtor_or_conv_p an int ptr.
  2471. (cp_parser_direct_declarator): Likewise. Check for a parameter
  2472. list on cdtors & conv functions.
  2473. (cp_parser_initializer): Adjust.
  2474. (cp_parser_member_declaration): Adjust.
  2475. (cp_parser_attribute_list): Move code into
  2476. cp_parser_parens_expression_list.
  2477. (cp_parser_functional_cast): Adjust.
  2478. * pt.c (type_dependent_expression_p): Erroneous expressions are
  2479. non-dependent.
  2480. 2003-07-11 Geoffrey Keating <geoffk@apple.com>
  2481. * decl.c (cp_finish_decl): Handle 'used' attribute.
  2482. * cp-lang.c (c_reset_state): New dummy routine.
  2483. * cp-tree.h (finish_file): Move prototype to c-common.h.
  2484. * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
  2485. 2003-07-11 Mark Mitchell <mark@codesourcery.com>
  2486. PR c++/8327
  2487. * pt.c (tsubst_qualified_id): Implement suggested resolution for
  2488. Core Issue 2.
  2489. (type_dependent_expression_p): Likewise.
  2490. 2003-07-10 Mark Mitchell <mark@codesourcery.com>
  2491. * typeck.c (build_binary_op): Do not warn about signed
  2492. vs. unsigned comparisons in the bodies of templates.
  2493. PR c++/9411
  2494. * parser.c (cp_parser_postfix_expression): Check dependency of
  2495. functions.
  2496. 2003-07-09 Mark Mitchell <mark@codesourcery.com>
  2497. PR c++/10032
  2498. * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
  2499. still errors.
  2500. PR c++/10527
  2501. * error.c (decl_to_string): Do not print default argument
  2502. expressions.
  2503. * cp-tree.h (break_out_calls): Remove declaration.
  2504. * tree.c (break_out_calls): Remove.
  2505. * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
  2506. 2003-07-09 Nathan Sidwell <nathan@codesourcery.com>
  2507. PR c++ 9483
  2508. * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
  2509. * decl2.c (constructor_name_p): Avoid repeated constructor_name
  2510. calls.
  2511. * decl.c (grokdeclarator): Refactor ctor/dtor detection.
  2512. 2003-07-09 Mark Mitchell <mark@codesourcery.com>
  2513. * typeck.c (build_x_unary_op): Take note of the fact that
  2514. PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
  2515. trees.
  2516. * parser.c (cp_parser_primary_expression): Preserve the form of
  2517. qualified expressions in templates, even if they are not
  2518. dependent.
  2519. * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
  2520. (tsubst_qualified_id): Likewise.
  2521. * search.c (accessible_p): Treat everything in the body of a
  2522. template as accessible.
  2523. 2003-07-08 Mark Mitchell <mark@codesourcery.com>
  2524. * cp-tree.def (NON_DEPENDENT_EXPR): New node.
  2525. * cp-tree.h (build_call_from_tree): Remove.
  2526. (build_member_call): Likewise.
  2527. (dependent_template_arg_p): Remove.
  2528. (any_dependent_template_arguments_p): New function.
  2529. (dependent_template_id_p): Likewise.
  2530. (any_type_dependent_arguments_p): Likewise.
  2531. (build_non_dependent_expr): Likewise.
  2532. (build_non_dependent_args): Likewise.
  2533. (build_x_compound_expr): Adjust prototype.
  2534. * call.c (build_new_method_call): Handle non-dependent expressions
  2535. correctly.
  2536. * decl2.c (grok_array_decl): Likewise.
  2537. (build_offset_ref_call_from_tree): Likewise.
  2538. (build_call_from_tree): Remove.
  2539. * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
  2540. (dump_expr): Likewise.
  2541. * init.c (build_member_call): Remove.
  2542. * mangle.c (write_expression): Update handling for template-ids.
  2543. * parser.c (cp_parser_primary_expression): Use
  2544. any_dependent_template_arguments_p. Update constant-expression
  2545. handling.
  2546. (cp_parser_postfix_expression): Use
  2547. any_type_dependent_arguments_p. Simplify call processing.
  2548. (cp_parser_unary_expression): Simplify.
  2549. (cp_parser_expression): Adjust for changes to
  2550. build_x_compound_expr.
  2551. (cp_parser_template_argument): Implement standard-conforming
  2552. parsing of non-type template arguments.
  2553. (cp_parser_direct_declarator): Use
  2554. cp_parser_fold_non_dependent_expr.
  2555. (cp_parser_fold_non_dependent_expr): New function.
  2556. (cp_parser_next_token_ends_template_argument_p): Likewise.
  2557. * pt.c (convert_template_argument): Do not call
  2558. maybe_fold_nontype_arg.
  2559. (tsubst_baselink): Likewise.
  2560. (tsubst_copy_and_build): Share common code. Make sizeof/alignof
  2561. processing work correctly for non-dependent expressions. Adjust
  2562. handling of COMPOUND_EXPR. Simplify call processing.
  2563. (value_dependent_expression_p): Deal with functional casts and
  2564. sizeof/alignof correctly.
  2565. (type_dependent_expression_p): Handle overloaded functions.
  2566. (any_type_dependent_arguments_p): New function.
  2567. (any_dependent_template_arguments_p): Likewise.
  2568. (dependent_template_p): Treat SCOPE_REFs as dependent.
  2569. (dependent_template_id_p): Simplify.
  2570. (build_non_dependent_expr): New function.
  2571. (build_non_dependent_args): Likewise.
  2572. * semantics.c (finish_stmt_expr): Don't make dependent
  2573. statement-expresions have void type.
  2574. (finish_call_expr): Handle non-dependent expressions
  2575. correctly.
  2576. * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
  2577. * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
  2578. type size_t, even in templates.
  2579. (expr_sizeof): Likewise.
  2580. (finish_class_member_access_expr): Handle non-dependent expressions
  2581. correctly.
  2582. (build_x_indirect_ref): Likewise.
  2583. (build_x_binary_op): Likewise.
  2584. (build_x_unary_op): Likewise.
  2585. (build_x_conditional_expr): Likewise.
  2586. (build_x_compound_expr): Likewise.
  2587. * typeck2.c (build_x_arrow): Likewise.
  2588. 2003-07-09 Jan Hubicka <jh@suse.cz>
  2589. * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
  2590. * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
  2591. (start_function): Use DECL_ESTIMATED_INSNS.
  2592. * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
  2593. * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
  2594. unit-at-a-time
  2595. 2003-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  2596. PR c++/11030
  2597. * pt.c (instantiate_class_template): Don't call xref_tag to
  2598. inject name when the friend class is a specialization.
  2599. 2003-07-07 Mark Mitchell <mark@codesourcery.com>
  2600. * cp-tree.h (build_scoped_method_call): Remove.
  2601. (lookup_qualified_name): Remove parameter.
  2602. (tsubst_copy_and_build): Declare.
  2603. (finish_qualified_object_call_expr): Remove.
  2604. (check_accessibility_of_qualified_id): New function.
  2605. (finish_qualified_id_expr): Likewise.
  2606. (non_reference): Likewise.
  2607. (build_expr_from-tree): Remove.
  2608. * call.c (non_reference): Remove.
  2609. (build_scoped_method_call): Likewise.
  2610. (build_method_call): Use error_operand_p. Assert that we are not
  2611. processing a template.
  2612. (standard_conversion): Use non_reference.
  2613. * class.c (build_vtbl_entry_ref): Likewise.
  2614. (build_vtbl_ref_1): Likewise.
  2615. * cvt.c (build_expr_type_conversion): Use non_reference.
  2616. * decl.c (lookup_qualified_name): Remove flags parameter.
  2617. (grok_op_properties): Use non_reference.
  2618. * decl2.c (grok_array_decl): Likewise.
  2619. (build_expr_from_tree): Remove.
  2620. (build_offset_ref_call_from_tree): Update comment.
  2621. * error.c (parm_to_string): Call reinit_global_formatting_buffer.
  2622. * except.c (prepare_eh_types): Use non_reference.
  2623. (can_convert_eh): Likewise.
  2624. * init.c (build_dtor_call): Avoid using build_method_call.
  2625. * mangle.c (write_template_param): Remove misleading comment.
  2626. * method.c (locate_copy): Use non_reference.
  2627. * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
  2628. (cp_parser_primary_expression): Do not create SCOPE_REFs is
  2629. non-dependent contexts.
  2630. (cp_parser_postfix_expression): Use finish_qualified_id_expr.
  2631. (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
  2632. build_expr_from_tree.
  2633. (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
  2634. Use check_accessibility_of_qualified_id.
  2635. * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
  2636. build_expr_from_tree.
  2637. (tsubst_baselink): New function.
  2638. (tsubst_qualified_id): Likewise.
  2639. (tsubst_copy): Use them. Remove support for METHOD_CALL_EXPR.
  2640. (tsubst_expr): Adjust call to lookup_qualified_name.
  2641. (tsubst_copy_and_build): Handle SCOPE_REFs specially. Adjust
  2642. handling of CALL_EXPRs.
  2643. (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
  2644. * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
  2645. * search.c (check_final_overrider): Likewise.
  2646. * semantics.c (check_accessibility_of_qualified_id): New function.
  2647. (finish_qualified_object_call_expr): Remove.
  2648. * typeck.c (target_type): Use non_reference.
  2649. (cxx_sizeof_or_alignof_type): Likewise.
  2650. (dubious_conversion_warnings): Likewise.
  2651. (convert_for_initialization): Likewise.
  2652. (non_reference): New function.
  2653. 2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2654. * decl.c (print_binding_level, print_other_binding_stack,
  2655. print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
  2656. stdio calls.
  2657. * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
  2658. 2003-07-07 Andreas Jaeger <aj@suse.de>
  2659. * friend.c: Convert to ISO C90 prototypes.
  2660. * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
  2661. language.
  2662. * cfns.h: Regenerate.
  2663. * typeck.c: Convert remaining prototypes to ISO C90.
  2664. * search.c: Likewise.
  2665. * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
  2666. * semantics.c (expand_or_defer_fn): Likewise
  2667. * mangle.c (discriminator_for_string_literal): Likewise.
  2668. * g++spec.c (lang_specific_driver): Likewise.
  2669. * search.c (lookup_base_r): Remove unused variable.
  2670. 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
  2671. * semantics.c: (genrtl_try_block) Adjust emit_line_note
  2672. calls.
  2673. 2003-07-07 Andreas Jaeger <aj@suse.de>
  2674. * search.c (lookup_base_r): Remove unused variable.
  2675. 2003-07-06 Michael Chastain <mec@shout.net>
  2676. PR debug/10055
  2677. * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
  2678. assigning to input_filename directly.
  2679. 2003-07-06 Kazu Hirata <kazu@cs.umass.edu>
  2680. * call.c: Fix comment formatting.
  2681. * class.c: Likewise.
  2682. * cp-tree.h: Likewise.
  2683. * decl.c: Likewise.
  2684. * decl2.c: Likewise.
  2685. * error.c: Likewise.
  2686. * method.c: Likewise.
  2687. * name-lookup.c: Likewise.
  2688. * parser.c: Likewise.
  2689. * pt.c: Likewise.
  2690. * rtti.c: Likewise.
  2691. * search.c: Likewise.
  2692. * typeck.c: Likewise.
  2693. 2003-07-06 Mark Mitchell <mark@codesourcery.com>
  2694. PR c++/11345
  2695. * search.c (lookup_base_r): Remove is_non_public and
  2696. within_current_scope parameters. Remove other dead code.
  2697. (lookup_base): Adjust call to lookup_base_r.
  2698. (adjust_result_of_qualified_name_lookup): Improve comment.
  2699. * semantics.c (finish_call_expr): Use maybe_dummy_object.
  2700. 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
  2701. * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
  2702. LANG_HOOKS_MISSING_ARGUMENT): Override.
  2703. 2003-07-05 Mark Mitchell <mark@codesourcery.com>
  2704. PR c++/11431
  2705. * typeck.c (build_static_cast): Check for reference conversions
  2706. earlier.
  2707. 2003-07-04 Mark Mitchell <mark@codesourcery.com>
  2708. * cp-tree.h (perform_integral_promotions): Declare.
  2709. * call.c (build_addr_func): Use decay_conversion.
  2710. (convert_arg_to_ellipsis): Likewise. Remove misleading comment.
  2711. (convert_for_arg_passing): Use perform_integral_promotions.
  2712. * cvt.c (build_expr_type_conversion): Use decay_conversion.
  2713. (type_promotes_to): Do not return a cv-qualified type.
  2714. * decl.c (grok_reference_init): Fix formatting.
  2715. (get_atexit_node): Use decay_conversion.
  2716. (build_enumerator): Use perform_integral_promotions.
  2717. * init.c (build_vec_init): Use decay_conversion.
  2718. * semantics.c (finish_expr_stmt): Likewise.
  2719. (finish_switch_cond): Use perform_integral_promotions.
  2720. * typeck.c (default_conversion): Likewise.
  2721. (perform_integral_promotions): New function.
  2722. (build_indirect_ref): Use decay_conversion.
  2723. (build_array_ref): Use perform_integral_promotions.
  2724. (convert_arguments): Use decay_conversion.
  2725. (build_unary_op): Use perform_integral_promotions.
  2726. (build_c_cast): Use decay_conversion.
  2727. (build_modify_expr): Likewise.
  2728. (convert_for_initialization): Likewise.
  2729. * typeck2.c (build_x_arrow): Likewise.
  2730. 2003-07-04 Kazu Hirata <kazu@cs.umass.edu>
  2731. * call.c: Fix comment typos.
  2732. * class.c: Likewise.
  2733. * cp-tree.h: Likewise.
  2734. * cvt.c: Likewise.
  2735. * decl2.c: Likewise.
  2736. * decl.c: Likewise.
  2737. * init.c: Likewise.
  2738. * mangle.c: Likewise.
  2739. * parser.c: Likewise.
  2740. * pt.c: Likewise.
  2741. * search.c: Likewise.
  2742. * semantics.c: Likewise.
  2743. * tree.c: Likewise.
  2744. * typeck.c: Likewise.
  2745. 2003-07-04 Zack Weinberg <zack@codesourcery.com>
  2746. * parser.c (cp_lexer_read_token): No need to handle string
  2747. constant concatenation.
  2748. 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2749. * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
  2750. (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
  2751. ATTRIBUTE_GCC_CXXDIAG.
  2752. 2003-07-03 Mark Mitchell <mark@codesourcery.com>
  2753. * call.c (build_addr_func): Handle bound pointers-to-members.
  2754. (build_method_call): Do not call resolve_offset_ref.
  2755. (implicit_conversion): Likewise.
  2756. (resolve_scoped_fn_name): Use finish_non_static_data_member, not
  2757. resolve_offset_ref.
  2758. (resolve_args): Do not call resolve_offset_ref.
  2759. (build_conditional_expr): Likewise.
  2760. (build_new_method_call): Likewise.
  2761. * cp-tree.def (OFFSET_REF): Update documentation.
  2762. * cvt.c (cp_convert_to_pointer): Update handling of conversions from
  2763. pointers to members to pointers.
  2764. (ocp_convert): Do not call resolve_offset_ref.
  2765. (convert_to_void): Likewise.
  2766. (build_expr_type_conversion): Likewise.
  2767. * decl2.c (delete_sanity): Likewise.
  2768. * init.c (resolve_offset_ref): Simplify greatly.
  2769. (build_vec_delete): Do not call resolve_offset_ref.
  2770. * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
  2771. if appropriate.
  2772. (cp_parser_unary_expression): Use
  2773. cp_parser_simple_cast_expression.
  2774. (cp_parser_delete_expression): Likewise.
  2775. (cp_parser_cast_expression): Likewise.
  2776. (cp_parser_pm_expression): Use cp_parser_binary_op.
  2777. (cp_parser_simple_cast_expression): New function.
  2778. * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
  2779. * semantics.c (finish_increment_expr): Likewise.
  2780. (finish_typeof): Likewise.
  2781. * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
  2782. * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
  2783. (decay_conversion): Do not call resolve_offset_ref.
  2784. (finish_class_member_access_expr): Likewise.
  2785. (convert_arguments): Likewise.
  2786. (build_x_binary_op): Handle DOTSTAR_EXPR.
  2787. (condition_conversion): Do not call resolve_offset_ref.
  2788. (unary_complex_lvalue): Likewise.
  2789. (build_static_cast): Likewise.
  2790. (build_reinterpret_cast): Likewise.
  2791. (build_const_cast): Likewise.
  2792. (build_c_cast): Likewise.
  2793. (build_modify_expr): Likewise.
  2794. (convert_for_assignment): Likewise.
  2795. (convert_for_initialization): Likewise.
  2796. * typeck2.c (build_x_arrow): Likewise.
  2797. (build_m_component_ref): Simplify.
  2798. * call.c (build_scoped_method_call): Use convert_to_void.
  2799. (build_method_call): Likewise.
  2800. * class.c (check_field_decls): Remove dead code.
  2801. * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
  2802. * decl2.c (grok_array_decl): Remove dead code.
  2803. (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
  2804. as pointer-to-member representation.
  2805. * init.c (build_offset_ref): Tidy.
  2806. (build_vec_delete_1): Use convert_to_void.
  2807. * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
  2808. as pointer-to-member representation.
  2809. 2003-07-03 Nathan Sidwell <nathan@codesourcery.com>
  2810. PR c++/9162
  2811. * decl.c (grokdeclarator): Return friend decls, not
  2812. void_type_node.
  2813. * decl2.c (grokfield): Alter friend decl check.
  2814. * parser.c (struct cp_parser): Document default_arg chain on
  2815. unparsed_functions_queue.
  2816. (cp_parser_save_default_args): New.
  2817. (cp_parser_init_declarator, cp_parser_function_definition,
  2818. cp_parser_member_declaration): Call it.
  2819. (cp_parser_class_specifier): Remove unused variable. Alter
  2820. processing of unparsed_functions_queue.
  2821. 2003-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2822. * class.c (add_method, check_field_decl): Fix format specifier.
  2823. * decl.c (duplicate_decls, pushdecl, check_goto,
  2824. fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
  2825. start_enum): Likewise.
  2826. * decl2.c (ambiguous_decl): Likewise.
  2827. * pt.c (redeclare_class_template): Likewise.
  2828. 2003-07-02 Nathan Sidwell <nathan@codesourcery.com>
  2829. PR c++/10219
  2830. * pt.c (type_unification_real): Don't unify exprs of error type.
  2831. * tree.c (error_type): Don't die on error_type.
  2832. PR c++/9779
  2833. * decl2.c (arg_assoc_class): Don't die on NULL type.
  2834. * typeck.c (type_unknown_p): Don't die on untyped expressions.
  2835. 2003-07-01 Mark Mitchell <mark@codesourcery.com>
  2836. PR c++/6949
  2837. * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
  2838. classes.
  2839. 2003-07-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  2840. * error.c (locate_error): %P takes an `int', not a `tree'.
  2841. 2003-07-02 Jan Hubicka <jh@suse.cz>
  2842. * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
  2843. (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
  2844. clear DECL_DEFER_OUTPUT once function is processed; avoid flags
  2845. massaging.
  2846. * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
  2847. (expand_or_defer_fn): Declare.
  2848. (lower_function): Declare.
  2849. * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
  2850. * decl2.c: Include cgraph.h and varpool.h
  2851. (maybe_emit_vtables): Make explicit instantations as needed.
  2852. (mark_member_pointers, lower_function): New functions.
  2853. (finish_file): Do unit-at-a-time.
  2854. * method.c (synthesize_method): Use expand_or_defer_fn.
  2855. * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
  2856. * parser.c (cp_parser_function_definition_after_decl): Use
  2857. expand_or_defer_fn.
  2858. * pt.c (instantiate_decl): Likewise.
  2859. * semantics.c: Include cgraph.h
  2860. (expand_or_defer_fn): Break out from ...
  2861. (expand_body): ... here; deal with unit-at-a-time.
  2862. * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
  2863. LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
  2864. 2003-07-01 Mark Mitchell <mark@codesourcery.com>
  2865. * call.c (resolve_scoped_fn_name): Return error_mark_node for
  2866. erroneous cases.
  2867. 2003-07-01 Mark Mitchell <mark@codesourcery.com>
  2868. PR c++/11149
  2869. * call.c (resolve_scoped_fn_name): Check that the qualifying scope
  2870. is a class type.
  2871. 2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
  2872. PR c++/8046
  2873. * error.c (dump_decl): Handle BIT_NOT_EXPR as
  2874. pseudo destructor calls.
  2875. 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
  2876. * cp-tree.h (define_label): Replace filename and lineno
  2877. arguments with a location_t.
  2878. * decl.c (pop_label): Adjust define_label call.
  2879. (define_label): Replace filename and lineno arguments with a
  2880. location_t.
  2881. * semantics.c (finish_label): Adjust define_label call.
  2882. 2003-07-01 Mark Mitchell <mark@codesourcery.com>
  2883. PR c++/9559
  2884. * decl2.c (grokfield): Do not build NOP_EXPRs around the
  2885. error_mark_node.
  2886. 2003-06-30 Neil Booth <neil@daikokuya.co.uk>
  2887. * Make-lang.in: Update.
  2888. * cp-lang.c (c_language): Define.
  2889. (LANG_HOOKS_INIT_OPTIONS): Use common hook.
  2890. * cp-tree.h (cxx_init_options): Remove.
  2891. * lex.c: Don't include diagnostic.h.
  2892. (cxx_init_options): Remove.
  2893. 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
  2894. PR c++/4933
  2895. * error.c (dump_expr): Support correctly the COMPOUND_EXPR
  2896. tree generated within a template. Use dump_expr to dump an
  2897. expression sizeof.
  2898. 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
  2899. * mangle.c (write_expression): Exit gracefully when trying to
  2900. mangle a CALL_EXPR.
  2901. 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
  2902. PR c++/10750
  2903. * parser.c (cp_parser_primary_expression): A VAR_DECL with a
  2904. (value- or type-) dependent expression as DECL_INITIAL is a
  2905. valid constant-expression (at parser time).
  2906. 2003-06-30 Giovanni Bajo <giovannibajo@libero.it>
  2907. PR c++/11106
  2908. * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
  2909. USING_DECL, instead of print_tree_identifier.
  2910. 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2911. * cp-tree.h (language_to_string): Adjust declaration.
  2912. * dump.c (cp_dump_tree): Adjust usage.
  2913. * error.c (dump_char): Use output_formatted_scalar. Tidy.
  2914. (parm_to_string): Lose unused parameter. Tidy.
  2915. (expr_to_string): Likewise.
  2916. (code_to_string): Likewise.
  2917. (language_to_string): Likewise.
  2918. (op_to_string): Likewise.
  2919. (assop_to_string): Likewise.
  2920. (digit_buffer): Remove.
  2921. (dump_type): Format builtin vector type as __vector__.
  2922. 2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
  2923. * error.c (print_integer): Remove.
  2924. (dump_type_suffix): Adjust.
  2925. (dump_expr): Likewise.
  2926. 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
  2927. * error.c (print_instantiation_partial_context): Take a
  2928. location_t.
  2929. (print_instantiation_full_context): Adjust.
  2930. (print_instantiation_context): Adjust.
  2931. * cp-tree.h (cp_line_of, cp_file_of): Remove.
  2932. * error.c (cp_line_of, cp_file_of): Merge into ...
  2933. (location_of): ... here. Make static, return a location_t.
  2934. (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
  2935. 2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
  2936. PR c++/10784
  2937. * call.c (joust): Move warn_conversion check outwards.
  2938. 2003-06-27 Zack Weinberg <zack@codesourcery.com>
  2939. * decl.c (build_typename_type)
  2940. * mangle.c (write_template_template_arg)
  2941. * parser.c (cp_parser_scope_through_which_access_occurs)
  2942. * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
  2943. * repo.c (get_base_filename)
  2944. * semantics.c (maybe_convert_cond):
  2945. Mark the definition static, matching the forward declaration.
  2946. 2003-06-27 Mark Mitchell <mark@codesourcery.com>
  2947. PR c++/10468
  2948. * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
  2949. 2003-06-27 Mark Mitchell <mark@codesourcery.com>
  2950. PR c++/10796
  2951. * decl.c (finish_enum): Implement DR377.
  2952. * decl.c (cp_finish_decl): Don't make variables with reference
  2953. type readonly while they are being initialized.
  2954. 2003-06-26 Mark Mitchell <mark@codesourcery.com>
  2955. PR c++/11332
  2956. * typeck.c (build_static_cast): Avoid returning expressions with
  2957. reference type.
  2958. 2003-06-26 Nathan Sidwell <nathan@codesourcery.com>
  2959. * call.c (build_op_delete_call): Use strip_array_call. Correct
  2960. error message to say 'delete' or 'delete[]'.
  2961. 2003-06-26 Giovanni Bajo <giovannibajo@libero.it>
  2962. PR c++/8266
  2963. * pt.c (check_explicit_specialization): When looking up a
  2964. template function from an identifier outside class-scope, bind
  2965. it to CP_DECL_CONTEXT.
  2966. 2003-06-25 Mark Mitchell <mark@codesourcery.com>
  2967. PR c++/10990
  2968. * search.c (lookup_base_r): Rely on accessible_p, rather than
  2969. trying to emulate that logic here.
  2970. PR c++/10931
  2971. * call.c (convert_like): Pass issue_conversion_warnings.
  2972. (convert_like_with_context): Likewise.
  2973. (convert_like_real): Add issue_conversion_warnings parameter.
  2974. (perform_direct_initialization_if_possible): New function.
  2975. * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
  2976. * typeck.c (check_for_casting_away_constness): New function.
  2977. (build_static_cast): Rewrite.
  2978. 2003-06-24 Nathan Sidwell <nathan@codesourcery.com>
  2979. * call.c (enforce_access): Assert we get a binfo.
  2980. (build_op_delete_call): Pass a binfo to
  2981. perform_or_defer_access_check.
  2982. * class.c (alter_access): Likewise.
  2983. * decl.c (make_typename_type): Likewise.
  2984. (make_unbound_class_template): Likewise.
  2985. * lex.c (do_identifier): Likewise.
  2986. * method.c (hack_identifier): Likewise.
  2987. * parser.c (cp_parser_lookup_name): Likewise.
  2988. * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
  2989. test.
  2990. * semantics.c (finish_non_static_data_member): Likewise.
  2991. (perform_or_defer_access_check): Expect a binfo.
  2992. * typeck.c (comptypes): Expect types.
  2993. * mangle.c (find_substitution): Don't pass a non-type to same_type_p
  2994. * friend.c (make_friend_class): Likewise.
  2995. * pt.c (check_default_tmpl_args): Likewise.
  2996. (lookup_template_class): Likewise.
  2997. 2003-06-24 Jan Hubicka <jh@suse.cz>
  2998. * method.c (thunk_labelno): Move outside ifdef block to make garbage
  2999. collector happy.
  3000. 2003-06-24 Jan Hubicka <jh@suse.cz>
  3001. * class.c (build_vtable): Make vtables.
  3002. * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
  3003. * decl2.c (output_vtable_inherit): Rename to ...
  3004. (prepare_assemble_variable): ... this one; change interface.
  3005. (maybe_emit_vtables): Do not call output_vtable_inherit.
  3006. * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
  3007. * cp-tree.h (prepare_assemble_variable): New.
  3008. 2003-06-23 Andrew Pinski <pinskia@physics.uc.edu>
  3009. * method.c: add prototype for make_alias_for_thunk.
  3010. (thunk_labelno, make_alias_for_thunk): only define
  3011. if ASM_OUTPUT_DEF is defined.
  3012. 2003-06-23 Jakub Jelinek <jakub@redhat.com>
  3013. * method.c (thunk_labelno): New variable.
  3014. (make_alias_for_thunk): New function.
  3015. (use_thunk): Use it if defined ASM_OUTPUT_DEF. Put the thunk
  3016. into the same section as the function it is calling.
  3017. Include gt-cp-method.h.
  3018. * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
  3019. (cp/method.o): Depend on gt-cp-method.h.
  3020. * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
  3021. 2003-06-23 Jan Hubicka <jh@suse.cz>
  3022. * decl.c (register_dtor_fn): Mark cleanup as used.
  3023. * decl2.c (mark_vtable_entries): Skip nops.
  3024. * rtti.c (get_tinfo_ptr): Mark tinfo as used.
  3025. (build_dynamic_cast_1): Likewise.
  3026. (tinfo_base_init): Likewise.
  3027. (emit_tinfo_decl): Likewise.
  3028. 2003-06-23 Jakub Jelinek <jakub@redhat.com>
  3029. * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
  3030. to it.
  3031. 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3032. PR c++/10784
  3033. * call.c (joust): Warn about choosing conversion sequence only if
  3034. -Wconversion.
  3035. 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3036. PR c++/10864
  3037. * call.c (op_error): Tidy.
  3038. * error.c (dump_expr): Properly format 'T()' when T is an
  3039. aggregate type.
  3040. 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3041. PR c++/10915
  3042. * decl.c (grok_op_properties): Warn possible confusing conversion
  3043. only if -Wconversion.
  3044. 2003-06-20 Mark Mitchell <mark@codesourcery.com>
  3045. PR c++/10749
  3046. * parser.c (cp_parser_class_head): See through dependent names
  3047. when parsing a class-head.
  3048. PR c++/10845
  3049. * pt.c (try_class_unification): Correct handling of member class
  3050. templates.
  3051. 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
  3052. * semantics.c (genrtl_finish_function): Adjust
  3053. expand_function_end call.
  3054. 2003-06-19 Mark Mitchell <mark@codesourcery.com>
  3055. PR c++/10939
  3056. * pt.c (tsubst_decl): Do not try to substitute into non-dependent
  3057. functions.
  3058. (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
  3059. PR c++/9649
  3060. * cp-tree.h (pushdecl_class_level): Change prototype.
  3061. (push_class_level_binding): Likewise.
  3062. * decl.c (add_binding): Reject duplicate static data members.
  3063. (pushdecl_class_level): Return a value indicating whether or not
  3064. the binding was valid.
  3065. (push_class_level_binding): Likewise.
  3066. * semantics.c (finish_member_declaration): Don't keep invalid
  3067. declarations.
  3068. PR c++/11041
  3069. * call.c (initialize_reference): Do not use cp_finish_decl to emit
  3070. temporary variables.
  3071. * cp-tree.h (static_aggregates): Declare.
  3072. (pushdecl_top_level_and_finish): Likewise.
  3073. * decl.c (pushdecl_top_level_1): New function.
  3074. (pushdecl_top_level): Use it.
  3075. (pushdecl_top_level_and_finish): New function.
  3076. (initialize_local_var): Remove redundant code.
  3077. (cp_finish_decl): Remove support for RESULT_DECLs. Don't check
  3078. building_stmt_tree.
  3079. * decl.h (static_aggregates): Remove.
  3080. * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
  3081. * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
  3082. (tinfo_base_init): Likewise.
  3083. 2003-06-19 Matt Austern <austern@apple.com>
  3084. PR c++/11228
  3085. * init.c (build_zero_init): Assert that number of array elements
  3086. is an integer constant.
  3087. (build_default_init) Don't use build_zero_init for arrays with
  3088. variable number of elements.
  3089. 2003-06-19 Andreas Jaeger <aj@suse.de>
  3090. * cp-tree.h: Remove duplicated declarations.
  3091. 2003-06-18 Nathanael Nerode <neroden@gcc.gnu.org>
  3092. * pt.c: Convert to ISO C.
  3093. * semantics.c: Convert to ISO C.
  3094. 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
  3095. * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
  3096. at_least_as_qualified_p, more_qualified_p): Return bool.
  3097. * typeck.c: ANSIFY function definitions.
  3098. (comp_array_types): Take redeclaration bool parameter.
  3099. (comptypes): Rearrange STRICT handling.
  3100. (at_least_as_qualified_p, more_qualified_p,
  3101. comp_cv_qualification): Cache cv quals.
  3102. (compparms): Rearrange loop.
  3103. 2003-06-18 Nathan Sidwell <nathan@codesourcery.com>
  3104. * cp-tree.h (COMPARE_RELAXED): Rename to ...
  3105. (COMPARE_DERIVED): ... here. Adjust comment.
  3106. (resolve_typename_type_in_current_instantiation): Remove.
  3107. (cp_tree_equal, comptypes): Return a bool.
  3108. * cvt.c (convert_to_reference): Adjust comptypes call.
  3109. * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
  3110. (resolve_typename_type_in_current_instantiation): Remove.
  3111. * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
  3112. IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
  3113. calls. Refactor code.
  3114. * typeck.c (comp_array_types): Return bool. Lose callback.
  3115. parameter. Adjust cp_tree_equal calls.
  3116. (comptypes): Return bool. Adjust strict handling. Remove relaxed
  3117. enumeration and java type handling. Deal with typename types here.
  3118. Adjust recursive and cp_tree_equals calls. Adjust base and derived
  3119. checking.
  3120. (comp_target_types): Remove unreachable code. Adjust
  3121. same_or_base_type_p calls.
  3122. (ptr_reasonably_similar): Adjust base and derived check.
  3123. * typeck.c (maybe_warn_about_returning_address_of_local): Remove
  3124. unused calculation.
  3125. (check_return_expr): Adjust error messages.
  3126. * cp-tree.def (SCOPE_REF): Correct comment.
  3127. 2003-06-17 Mark Mitchell <mark@codesourcery.com>
  3128. * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
  3129. string again.
  3130. 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
  3131. * optimize.c (dump_function): Form complete flag name by
  3132. prefixing 'fdump-' to string returned by dump_flag_name().
  3133. 2003-06-17 Mark Mitchell <mark@codesourcery.com>
  3134. * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
  3135. string.
  3136. 2003-06-17 Jason Merrill <jason@redhat.com>
  3137. PR c++/10929
  3138. * decl.c (grokfndecl): Don't mark a function inline for
  3139. -finline-functions if it isn't defined.
  3140. 2003-06-17 Mark Mitchell <mark@codesourcery.com>
  3141. PR c++/10712
  3142. * class.c (handle_using_decl): Robustify.
  3143. PR c++/11105
  3144. * cp-tree.h (DECL_CONV_FN_TYPE): New method.
  3145. * mangle.c (struct globals): Remove internal_mangling_p.
  3146. (write_unqualified_name): Use DECL_CONV_FN_TYPE.
  3147. (write_template_parm): Don't write out the level number.
  3148. (conv_type_names): New variable.
  3149. (hash_type): New function.
  3150. (compare_type): Likewise.
  3151. (mangle_conv_op_name_for_type): Don't try to mangle conversion
  3152. operator names.
  3153. * search.c (lookup_conversion_operator): New function.
  3154. (lookup_fnfields_1): Use it.
  3155. 2003-06-17 Andreas Jaeger <aj@suse.de>
  3156. * except.c: Remove duplicate declaration of push_eh_cleanup.
  3157. * call.c: Remove extra declaration of inhibit_warnings.
  3158. 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
  3159. 2003-06-16 Jens-Michael Hoffmann <jensmh@gmx.de>
  3160. * mangle.c: Convert to ISO C.
  3161. 2003-06-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3162. * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
  3163. macro.
  3164. 2003-06-16 Nathanael Nerode <neroden@gcc.gnu.org>
  3165. * tree.c: Convert to ISO C.
  3166. 2003-06-16 Kazu Hirata <kazu@cs.umass.edu>
  3167. * cp-tree.h: Follow spelling conventions.
  3168. * mangle.c: Likewise.
  3169. * method.c: Likewise.
  3170. * parser.c: Likewise.
  3171. 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
  3172. * decl.c (start_function): Adjust init_function_start call.
  3173. * method.c (use_thunk): Likewise.
  3174. * semantics.c (genrtl_start_function): Likewise.
  3175. 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
  3176. * Make-lang.in: Remove c-options.o.
  3177. 2003-06-13 Nathanael Nerode <neroden@gcc.gnu.org>
  3178. * lex.c: Convert to ISO C.
  3179. 2003-05-19 Jens-Michael Hoffmann <jensmh@gmx.de>
  3180. * init.c: removes use of PARAMS macro. Use ISO style function
  3181. declarations. (Not copyright-significant change.)
  3182. * rtti.c: Remove PARAMS.
  3183. * typeck2.c: Convert to ISO C.
  3184. 2003-06-12 Mark Mitchell <mark@codesourcery.com>
  3185. PR c++/10635
  3186. * typeck.c (build_c_cast): Check that the destination type is
  3187. complete.
  3188. 2003-06-11 Mark Mitchell <mark@codesourcery.com>
  3189. PR c++/10432
  3190. * cp-tree.h (finish_declarator): Remove.
  3191. * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
  3192. erroneous declarations.
  3193. * semantics.c (finish_declarator): Remove.
  3194. 2003-06-11 Roger Sayle <roger@eyesopen.com>
  3195. * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
  3196. global static constructor/destructor if it will be empty, i.e.
  3197. either doesn't call any ctors/dtors or only calls pure or const
  3198. ctors/dtors.
  3199. 2003-06-11 Mark Mitchell <mark@codesourcery.com>
  3200. * mangle.c (tm_p.h): Include it.
  3201. * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
  3202. PR c++/11131
  3203. * tree.c (cp_cannot_inline_fn): Check for "inline" before
  3204. instantiation.
  3205. 2003-06-10 Jason Merrill <jason@redhat.com>
  3206. PR c++/10968
  3207. * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
  3208. 2003-06-10 Andrew Pinski <pinskia@physics.uc.edu>
  3209. * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
  3210. (start_cleanup_cnt): New.
  3211. 2003-06-10 Mark Mitchell <mark@codesourcery.com>
  3212. PR c++/11131
  3213. * cp-tree.h (template_for_substitution): Declare.
  3214. * decl2.c (mark_used): Use it when figuring out whether or not a
  3215. function is inline.
  3216. * pt.c (template_for_substitution): Give it external linkage.
  3217. * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
  3218. possible.
  3219. 2003-06-09 Zack Weinberg <zack@codesourcery.com>
  3220. PR 8861
  3221. * mangle.c (write_real_cst): New function. Implement
  3222. ABI-compliant mangling of floating-point literals when
  3223. -fabi-version>=2; provide backward compatibility with 3.3 when
  3224. -fabi-version=1 (with warning). Clarify commentary.
  3225. (write_template_arg_literal): Use write_real_cst.
  3226. 2003-06-07 Andreas Jaeger <aj@suse.de>
  3227. * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
  3228. 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
  3229. * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
  3230. (LANG_HOOKS_HANDLE_OPTION): Override.
  3231. * cp-tree.h (cxx_init_options): Update.
  3232. * lex.c (cxx_init_options): Update.
  3233. 2003-06-05 Jan Hubicka <jh@suse.cz>
  3234. * Make-lang.in: Add support for stageprofile and stagefeedback
  3235. 2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
  3236. * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
  3237. 2003-06-04 Andreas Jaeger <aj@suse.de>
  3238. * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
  3239. 2003-06-03 Jason Merrill <jason@redhat.com>
  3240. * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
  3241. * cp/decl.c (reshape_init): Handle vectors.
  3242. * testsuite/g++.dg/init/array10.C: New.
  3243. 2003-06-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3244. PR c++/10940
  3245. * pt.c (check_explicit_specialization): Check for 'static'
  3246. earlier.
  3247. 2003-05-31 Diego Novillo <dnovillo@redhat.com>
  3248. * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
  3249. the operand of a CONSTRUCTOR node.
  3250. 2003-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3251. * decl.c (cp_binding_level::this_entity): Rename from this_class.
  3252. (cxx_scope_descriptor): New function.
  3253. (cxx_scope_debug): Likewise.
  3254. (push_binding_level): Use it.
  3255. (pop_binding_level): Likewise.
  3256. (suspend_binding_level): Likewise.
  3257. (resume_binding_level): Likewise.
  3258. (pushlevel_class): Adjust use of this_class.
  3259. (pushtag): Likewise.
  3260. (lookup_name_real): Likewise.
  3261. (global_scope_name): New variable.
  3262. (initialize_predefined_identifiers): Initialize it.
  3263. (push_namespace): Use it.
  3264. (make_cxx_scope): New function.
  3265. (pushlevel): Use it.
  3266. (pushlevel_class): Likewise.
  3267. (push_binding_level): Simplify. Loose the last two arguments.
  3268. (make_binding_level): Remove.
  3269. (initial_push__namespace_scope): New function.
  3270. (push_namespace): Use it. Simplify.
  3271. (cxx_init_decl_processing): Likewise.
  3272. (declare_namespace_level): Remove.
  3273. 2003-05-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3274. PR c++/10956
  3275. * pt.c (instantiate_decl): Don't use full template arguments if
  3276. we are dealing with specializations.
  3277. 2003-05-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3278. * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
  3279. (binding_depth): Unconditionally define.
  3280. (is_class_level): Likewise.
  3281. (indent): Likewise. Take an indenting parameter.
  3282. (push_binding_level): Remove conditional definittion.
  3283. (pop_binding_level): Likewise.
  3284. (suspend_binding_level): Likewise.
  3285. (resume_binding_level): Likewise.
  3286. (pushlevel): Likewise.
  3287. (pushlevel_class): Likewise.
  3288. (poplevel_class): Likewise.
  3289. (pop_everything): Likewise.
  3290. 2003-05-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3291. * name-lookup.h (global_scope_p): New macro.
  3292. * decl.c (pop_binding_level): Use it. Don't refer directly to
  3293. global_binding_level.
  3294. (suspend_binding_level): Likewise.
  3295. (global_bindings_p): Likewise.
  3296. (print_other_binding_stack): Likewise.
  3297. (print_binding_stack): Likewise.
  3298. (maybe_push_to_top_level): Likewise.
  3299. (pushdecl_namespace_level): Likewise.
  3300. (cxx_init_decl_processing): Likewise.
  3301. (start_decl): Likewise.
  3302. (cp_finish_decl): Likewise.
  3303. (start_function): Likewise.
  3304. (global_binding_level): Remove.
  3305. 2003-05-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3306. * parser.c (cp_parser_explicit_instantiation): Restore old
  3307. access before template instantiation.
  3308. 2003-05-23 Geoffrey Keating <geoffk@apple.com>
  3309. * lang-specs.h: Use -o to specify preprocessor's output file.
  3310. Make -no-integrated-cpp work when building PCH files.
  3311. 2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3312. PR c++/10682
  3313. * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
  3314. check for implicitly created typedef to an enum.
  3315. 2003-05-21 Jason Merrill <jason@redhat.com>
  3316. * init.c (build_vec_delete): Copy the address into a temporary
  3317. variable before calling build_vec_delete_1.
  3318. * decl2.c (delete_sanity): Don't call stabilize_reference.
  3319. 2003-05-21 Nathan Sidwell <nathan@codesourcery.com>
  3320. * pt.c (register_specialization): Update the decl's location,
  3321. if necessary.
  3322. (check_explicit_specialization): Likewise.
  3323. 2003-05-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3324. * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
  3325. 2003-05-21 Danny Smith <dannysmith@users.sourceforge.net>
  3326. PR c++/9738
  3327. * decl.c (duplicate_decls): Re-invoke make_decl_rtl
  3328. if the old decl had instantiated DECL_RTL.
  3329. (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
  3330. 2003-05-19 Matt Austern <austern@apple.com>
  3331. * lang-options.h: Document -Wno-invalid-offsetof
  3332. * typeck.c (build_class_member_access_expr): Don't complain about
  3333. (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
  3334. 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
  3335. * name-lookup.c (free_binding_entry): fix where the GTY markers are.
  3336. (binding_entry_make): Make entry->chain NULL after getting an entry.
  3337. fix the spelling of chain in a comment.
  3338. (binding_table_free): speed up by having temporary variable.
  3339. (binding_table_new): set table->chain to be NULL after allocating
  3340. a table.
  3341. (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
  3342. binding->previous to NULL after getting an binding for speed.
  3343. 2003-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3344. * cp-tree.h (struct lang_type_class): Replace data member tags
  3345. with hash-table nested_udts.
  3346. (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
  3347. * class.c (unreverse_member_declarations): Don't touch
  3348. CLASSTYPE_TAGS.
  3349. (pushclass): Use cxx_remember_type_decls.
  3350. * decl.c (struct cp_binding_level): Replace data member tags with
  3351. hash-table type_decls.
  3352. (pop_binding_level): Handle level->type_decls.
  3353. (kept_level_p): Adjust.
  3354. (poplevel): Remove unused local variable.
  3355. (bt_print_entry): New function.
  3356. (print_binding_level): Use it.
  3357. (push_namespace): Build current_binding_level->type_decls.
  3358. (maybe_process_template_type_declaration): Adjust.
  3359. (pushtag): Likewise.
  3360. (clear_anon_tags): Use binding_table_remove_anonymous_types.
  3361. (gettags): Remove.
  3362. (cxx_remember_type_decls): Rename from storetags. Adjust.
  3363. (lookup_tag): Use binding_table_find_anon_type. Tidy.
  3364. (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
  3365. (cxx_init_decl_processing): Build global_binding_level->type_decls.
  3366. (store_parm_decls): Remove pointless code.
  3367. * name-lookup.c (free_binding_entry): New variable.
  3368. (ENTRY_INDEX): New macro.
  3369. (struct binding_table_s): New datatype.
  3370. (binding_entry_make): New function.
  3371. (binding_entry_free): Likewise.
  3372. (binding_table_construct): Likewise.
  3373. (binding_table_free): Likewise.
  3374. (binding_table_new): Likewise.
  3375. (binding_table_expand): Likewise.
  3376. (binding_table_insert): Likewise.
  3377. (binding_table_find): Likewise.
  3378. (binding_table_find_anon_type): Likewise.
  3379. (binding_table_reverse_maybe_remap): Likewise.
  3380. (binding_table_remove_anonymous_types): Likewise.
  3381. (binding_table_foreach): Likewise.
  3382. * name-lookup.h (binding_table): New type.
  3383. (binding_entry): Likewise.
  3384. (bt_foreach_proc): Likewise.
  3385. (struct binding_entry_s): New datatype.
  3386. (SCOPE_DEFAULT_HT_SIZE): New macro.
  3387. (CLASS_SCOPE_HT_SIZE): Likewise.
  3388. (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
  3389. (NAMESPACE_STD_HT_SIZE): Likewise.
  3390. (GLOBAL_SCOPE_HT_SIZE): Likewise.
  3391. (binding_table_new): Declare.
  3392. (binding_table_free): Likewise.
  3393. (binding_table_insert): Likewise.
  3394. (binding_table_find_anon_type): Likewise.
  3395. (binding_table_reverse_maybe_remap): Likewise.
  3396. (binding_table_remove_anonymous_types): Likewise.
  3397. (binding_table_foreach): Likewise.
  3398. (binding_table_find): Likewise.
  3399. (cxx_remember_type_decls): Likewise.
  3400. * pt.c (bt_instantiate_type_proc): New function.
  3401. (do_type_instantiation): Use it.
  3402. * search.c (lookup_field_r): Use binding_table_find.
  3403. 2003-05-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3404. * semantics.c (perform_deferred_access_checks): Don't discard
  3405. checked access.
  3406. 2003-05-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3407. * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
  3408. libiberty VA_ macros, always use stdarg.
  3409. * rtti.c (create_pseudo_type_info): Likewise.
  3410. * tree.c (build_min_nt, build_min): Likewise.
  3411. 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3412. * ptree.c (cxx_print_type, cxx_print_xnode): Use string
  3413. concatentation on HOST_WIDE_INT_PRINT_* format specifier to
  3414. collapse multiple function calls into one.
  3415. * tree.c (debug_binfo): Likewise.
  3416. 2003-05-15 Jason Merrill <jason@redhat.com>
  3417. PR c++/5388
  3418. * call.c (conditional_conversion): Don't consider implicit
  3419. conversions if T2 is a base of T1.
  3420. * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
  3421. (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
  3422. * parser.c (cp_parser_primary_expression): Convert a static data
  3423. member from reference.
  3424. 2003-05-15 Mark Mitchell <mark@codesourcery.com>
  3425. * call.c (build_op_delete_call): Avoid creating unnecessary types.
  3426. * class.c (instantiate_type): Remove tests for tf_no_attributes.
  3427. * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
  3428. (COMPARE_NO_ATTRIBUTES): Remove.
  3429. * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
  3430. PR c++/8385
  3431. * semantics.c (finish_typeof): Refine type-dependency check.
  3432. 2003-05-13 Jason Merrill <jason@redhat.com>
  3433. * typeck.c (build_modify_expr): Don't always stabilize the lhs and
  3434. rhs. Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
  3435. 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3436. * method.c (synthesize_method): Call push/pop_deferring_access_checks.
  3437. 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3438. PR c++/10230, c++/10481
  3439. * semantics.c (finish_non_static_data_member): Handle when the
  3440. non-static member is not from a base of the current class type.
  3441. 2003-05-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3442. PR c++/10552
  3443. * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
  3444. template and has dependent context.
  3445. 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3446. * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
  3447. 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3448. PR c++/9252
  3449. * cp-tree.h (saved_scope): Remove check_access field.
  3450. (tsubst_flags_t): Remove tf_parsing.
  3451. * decl.c (maybe_push_to_top_level): Don't initialize
  3452. scope_chain->check_access.
  3453. (make_typename_type, make_unbound_class_template): Don't use
  3454. tf_parsing.
  3455. (register_dtor_fn): Use push/pop_deferring_access_checks
  3456. instead of scope_chain->check_access.
  3457. * method.c (use_thunk): Likewise.
  3458. * parser.c (cp_parser_explicit_instantiation
  3459. (cp_parser_constructor_declarator_p): Don't call
  3460. push/pop_deferring_access_checks here.
  3461. (cp_parser_template_argument, cp_parser_class_name): Don't use
  3462. tf_parsing.
  3463. (yyparse): Check flag_access_control.
  3464. * pt.c (instantiate_class_template): Call
  3465. push/pop_deferring_access_checks.
  3466. * semantics.c (push_deferring_access_checks): Propagate
  3467. dk_no_check.
  3468. (perform_or_defer_access_check): Make sure basetype_path is
  3469. a type before comparison.
  3470. * call.c (build_op_delete_call, build_over_call): Use
  3471. perform_or_defer_access_check.
  3472. * class.c (alter_access): Likewise.
  3473. * init.c (build_offset_ref): Likewise.
  3474. * lex.c (do_identifier): Likewise.
  3475. * method.c (hack_identifier): Likewise.
  3476. * search.c (lookup_member): Likewise.
  3477. * semantics.c (finish_non_static_data_member): Likewise.
  3478. (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
  3479. instead of flag_access_control.
  3480. 2003-05-10 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3481. PR c++/9554
  3482. * parser.c (cp_parser_class_name): Remove check_access parameter.
  3483. All caller adjusted. Update declaration.
  3484. (cp_parser_lookup_name): Likewise.
  3485. * semantics.c (push_deferring_access_checks): Change parameter type
  3486. to enum deferring_kind. All caller adjusted.
  3487. (resume_deferring_access_checks): Adjust to use new enum.
  3488. (stop_deferring_access_checks): Likewise.
  3489. (perform_or_defer_access_check): Likewise.
  3490. * cp-tree.h (deferring_kind): New enum.
  3491. (deferred_access): Adjust field type.
  3492. (push_deferring_access_checks): Update declaration.
  3493. 2003-05-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3494. PR c++/10555, c++/10576
  3495. * pt.c (lookup_template_class): Handle class template with
  3496. multiple levels of parameters when one of the levels contain
  3497. errors.
  3498. 2003-05-08 Jason Merrill <jason@redhat.com>
  3499. * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
  3500. expression. Undo some of the recent reorg.
  3501. 2003-05-07 Richard Henderson <rth@redhat.com>
  3502. PR c++/10570
  3503. * cfns.gperf: Comment out POSIX thread cancellation points,
  3504. plus abort and raise.
  3505. * cfns.h: Regenerate.
  3506. 2003-05-07 Jason Merrill <jason@redhat.com>
  3507. * call.c (build_conditional_expr): Don't assume that the folded
  3508. expression has result_type.
  3509. 2003-05-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3510. * typeck.c (build_unary_op): Deal with const qualifier in
  3511. invalid pointer-to-member earlier.
  3512. 2003-05-05 Jason Merrill <jason@redhat.com>
  3513. PR c++/9537
  3514. * call.c (conditional_conversion): Build an RVALUE_CONV if
  3515. we're just changing the cv-quals.
  3516. (build_conditional_expr): Don't call convert to change
  3517. cv-quals.
  3518. 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3519. PR c++/10496
  3520. * typeck.c (build_unary_op): Don't output const qualifier when
  3521. output invalid pointer-to-member diagnostics.
  3522. 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3523. * decl.c: Fix typos.
  3524. 2003-05-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3525. PR c++/4494
  3526. * decl.c (start_function): Use same_type_p to check return type
  3527. of main.
  3528. 2003-05-03 Zack Weinberg <zack@codesourcery.com>
  3529. PR c/10604
  3530. * cp/typeck.c (build_x_compound_expr): No need to check
  3531. extra_warnings as well as warn_unused_value.
  3532. 2003-05-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3533. PR c++/9364, c++/10553, c++/10586
  3534. * decl.c (make_typename_type): Don't crash on illegal code.
  3535. 2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
  3536. * class.c (finish_struct): Use location_t and input_location
  3537. directly.
  3538. * decl.c (make_label_decl): Likewise.
  3539. (use_label): Likewise.
  3540. * decl2.c (warn_if_unknown_interface): Likewise.
  3541. (start_static_initialization_or_destruction): Likewise.
  3542. (generate_ctor_or_dtor_function): Likewise.
  3543. (finish_file): Likewise.
  3544. * error.c (print_instantiation_full_context): Likewise.
  3545. * init.c (create_temporary_var): Likewise.
  3546. * method.c (synthesize_method): Likewise.
  3547. * parser.c (cp_token): Likewise.
  3548. (cp_lexer_set_source_position_from_token): Likewise.
  3549. (cp_lexer_get_preprocessor_token): Likewise.
  3550. (cp_parser_statement): Likewise.
  3551. * pt.c (tsubst_friend_function): Likewise.
  3552. (instantiate_class_template): Likewise.
  3553. (tsubst_decl): Likewise.
  3554. (tsubst): Likewise.
  3555. (instantiate_decl): Likewise.
  3556. * semantics.c (begin_class_definition): Likewise.
  3557. (expand_body): Likewise.
  3558. 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
  3559. * class.c (finish_struct): Rename lineno to input_line.
  3560. * decl.c (push_binding_level, pop_binding_level,
  3561. suspend_binding_level, resume_binding_level, make_label_decl,
  3562. use_label, start_function): Likewise.
  3563. * decl2.c (warn_if_unknown_interface,
  3564. start_static_initialization_or_destruction,
  3565. generate_ctor_or_dtor_function, finish_file): Likewise.
  3566. * error.c (cp_line_of, print_instantiation_full_context,
  3567. print_instantiation_context): Likewise.
  3568. * except.c (check_handlers_1, check_handlers): Likewise.
  3569. * init.c (create_temporary_var): Likewise.
  3570. * method.c (use_thunk, synthesize_method): Likewise.
  3571. * parser.c (cp_lexer_set_source_position_from_token,
  3572. cp_lexer_get_preprocessor_token): Likewise.
  3573. * pt.c (push_tinst_level, pop_tinst_level,
  3574. tsubst_friend_function, instantiate_class_template, tsubst_decl,
  3575. tsubst, tsubst_expr, instantiate_decl): Likewise.
  3576. * semantics.c (genrtl_try_block, finish_label_stmt,
  3577. begin_class_definition, expand_body,
  3578. genrtl_finish_function): Likewise.
  3579. * tree.c (build_min_nt, build_min): Likewise.
  3580. 2003-05-01 Mark Mitchell <mark@codesourcery.com>
  3581. * decl2.c (comdat_linkage): Don't externalize explicit
  3582. instantiations.
  3583. 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3584. PR c++/10554
  3585. * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
  3586. is not NULL.
  3587. 2003-05-01 Steven Bosscher <steven@gcc.gnu.org>
  3588. * cp-tree.h (struct lang_id2): Remove. Move fields from here...
  3589. (struct lang_identifier): ... to here.
  3590. (LANG_ID_FIELD): Remove.
  3591. (SET_LANG_ID): Remove.
  3592. (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
  3593. (SET_IDENTIFIER_LABEL_VALUE): Likewise.
  3594. (IDENTIFIER_IMPLICIT_DECL): Likewise.
  3595. (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
  3596. (IDENTIFIER_ERROR_LOCUS): Likewise.
  3597. (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
  3598. 2003-05-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3599. PR c++/8772
  3600. * pt.c (convert_template_argument): Correct diagnostic.
  3601. 2003-04-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3602. PR c++/9432, c++/9528
  3603. * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
  3604. 2003-04-30 Garbiel Dos Reis <gcc@integrable-solutions.net>
  3605. * decl.c (check_previous_goto_1): Adjust prototype.
  3606. (check_previous_goto): Adjust use.
  3607. (check_switch_goto): Likewise.
  3608. (use_label): Adjust.
  3609. (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
  3610. (struct named_label_use_list): Use location_t datatype.
  3611. 2003-04-29 Mark Mitchell <mark@codesourcery.com>
  3612. PR c++/10551
  3613. * pt.c (mark_decl_instantiated): Defer all explicit instantiations
  3614. that have not yet been written out.
  3615. 2003-04-29 Mark Mitchell <mark@codesourcery.com>
  3616. PR c++/10549
  3617. * class.c (layout_class_type): Mark overlong bitfields as having
  3618. the maximum size permitted by their type, after layout.
  3619. PR c++/10527
  3620. * error.c (dump_expr): Correctly handling of NEW_EXPR.4
  3621. 2003-04-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3622. * call.c (build_operator_new_call): Fix typo.
  3623. * lang-options.h: Likewise.
  3624. 2003-04-29 Mark Mitchell <mark@codesourcery.com>
  3625. PR c++/10515
  3626. * cp-tree.h (lookup_field_1): Declare it.
  3627. * search.c (lookup_field_1): Make it public.
  3628. * decl.c (reshape_init): Handle designated initializers.
  3629. * decl.c (maybe_commonize_var): Further tweak support for systems
  3630. without weak symbols.
  3631. 2003-04-27 Mark Mitchell <mark@codesourcery.com>
  3632. * decl.c (maybe_commonize_var): Fix thinko in last patch.
  3633. 2003-04-27 Mark Mitchell <mark@codesourcery.com>
  3634. PR c++/10506
  3635. * method.c (use_thunk): Decrement immediate_size_expand.
  3636. PR c++/10503
  3637. * cp-tree.h (DECL_VAR_MARKED_P): New macro.
  3638. (DECL_MAYBE_TEMPLATE): Remove.
  3639. * class.c (fixed_type_or_null): Avoid infinite recursion.
  3640. * decl.c (maybe_commonize_var): Make the code match the comments.
  3641. * pt.c (instantiate_decl): Move call to import_export_decl.
  3642. 2003-04-26 Mark Mitchell <mark@codesourcery.com>
  3643. * decl2.c (finish_file): Fix merge botch.
  3644. 2003-04-25 Mark Mitchell <mark@codesourcery.com>
  3645. * decl2.c (finish_file): Don't call import_export_decl for
  3646. functions that are not defined.
  3647. (handle_class_head): Robustify.
  3648. * pt.c (instantiate_decl): Do not call cp_finish_decl for
  3649. variables that are not defined.
  3650. 2003-04-24 Sylvain Pion <Sylvain.Pion@mpi-sb.mpg.de>
  3651. * call.c (print_z_candidates): Fix off by one error.
  3652. 2003-04-24 Nathan Sidwell <nathan@codesourcery.com>
  3653. PR c++/10337
  3654. * call.c (joust): Don't warn about conversion ops that are exact
  3655. or cv-conversions. Rearrange to avoid multiple type comparisons.
  3656. 2003-04-23 Mark Mitchell <mark@codesourcery.com>
  3657. PR c++/10471
  3658. * call.c (build_cxx_call): Robustify.
  3659. 2003-04-23 Neil Booth <neil@daikokuya.co.uk>
  3660. * Make-lang.in (lex.o): Remove mbchar.h.
  3661. * lex.c (MULTIBYTE_CHARS): Lose.
  3662. * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
  3663. in c-lex.c.
  3664. 2003-04-23 Mark Mitchell <mark@codesourcery.com>
  3665. PR c++/9847
  3666. * cp-tree.h (duplicate_tag_error): Remove.
  3667. * class.c (duplicate_tag_error): Remove.
  3668. * semantics.c (begin_class_definition): Return immediately for a
  3669. duplicate class definition.
  3670. PR c++/10451
  3671. * decl.c (grokdeclarator): Correct logic for "mutable" errors.
  3672. 2003-04-22 Mark Mitchell <mark@codesourcery.com>
  3673. PR c++/10446
  3674. * search.c (lookup_fnfields_1): Handle empty slots in the method
  3675. vector.
  3676. PR c++/10428
  3677. * decl.c (check_elaborated_type_specifier): New function, split
  3678. out from ...
  3679. (xref_tag): ... here. Use the new function in more places.
  3680. * rtti.c (throw_bad_typeid): Use build_cxx_call.
  3681. 2003-04-21 Mark Mitchell <mark@codesourcery.com>
  3682. * call.c (build_over_call): Use build_cxx_call.
  3683. (build_cxx_call): New method, split out of build_over_call.
  3684. * cp-tree.h (language_function): Add can_throw.
  3685. (build_cxx_call): Declare it.
  3686. * decl.c (finish_function): If a function does not contain any
  3687. calls to functions that can throw an exception, indicate that
  3688. fact.
  3689. * decl2.c (mark_used): Do not defer the instantiation of
  3690. functions, if the current function does not throw.
  3691. * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
  3692. * pt.c (instantiate_decl): Make sure import_export_decl is called
  3693. before emitting things.
  3694. * rtti.c (throw_bad_cast): Use build_cxx_call.
  3695. (build_dynamic_cast_1): Likewise.
  3696. * typeck.c (build_function_call): Likewise.
  3697. 2003-04-21 Nathan Sidwell <nathan@codesourcery.com>
  3698. PR c++/9881
  3699. * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
  3700. expressions. Reverts my 2002-08-08 patch.
  3701. * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
  3702. cheaper early exit.
  3703. 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
  3704. * cp/decl2.c (start_static_storage_duration_function): Take count
  3705. arg, don't check if it wraps round.
  3706. (generate_ctor_or_dtor_function): Add locus arg, use it.
  3707. (generate_ctor_and_dtor_functions_for_priority): Data arg is a
  3708. locus.
  3709. (finish_file): Set line numbers to past EOF for synthesized
  3710. functions.
  3711. 2003-04-20 Nathan Sidwell <nathan@codesourcery.com>
  3712. PR c++/10405
  3713. * search.c (lookup_field_1): Final scan goes backwards for
  3714. types, forwards for non-types.
  3715. 2003-04-17 Roger Sayle <roger@eyesopen.com>
  3716. PR c/10375
  3717. * decl.c (duplicate_decls): Preserve "const", "noreturn" and
  3718. "nothrow" function attributes.
  3719. 2003-04-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  3720. PR c++/10347
  3721. * pt.c (type_dependent_expression_p): Handle array new.
  3722. 2003-04-15 Mark Mitchell <mark@codesourcery.com>
  3723. PR c++/10381
  3724. * parser.c (cp_parser_primary_expression): Reorganize logic for
  3725. dealing with name lookup failures.
  3726. 2003-04-15 Jason Merrill <jason@redhat.com>
  3727. * decl2.c (mark_used): Don't instantiate anything if
  3728. skip_evaluation.
  3729. 2003-04-14 Ziemowit Laski <zlaski@apple.com>
  3730. * tree.c (build_cplus_array_type_1): Do not call
  3731. uses_template_parms() on a NULL index_type.
  3732. 2003-04-13 Roger Sayle <roger@eyesopen.com>
  3733. * decl.c (duplicate_decls): Preserve pure and malloc attributes.
  3734. 2003-04-12 Mark Mitchell <mark@codesourcery.com>
  3735. PR c++/10300
  3736. * init.c (build_new_1): Reorganize.
  3737. 2003-04-12 Zack Weinberg <zack@codesourcery.com>
  3738. * class.c (initialize_array)
  3739. * decl.c (reshape_init)
  3740. * decl2.c (build_expr_from_tree)
  3741. * init.c (build_zero_init)
  3742. * pt.c (tsubst_copy, tsubst_copy_and_build)
  3743. * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
  3744. (ptm_initializer, class_initializer, get_pseudo_ti_init)
  3745. * semantics.c (finish_compound_literal)
  3746. * typeck.c (build_ptrmemfunc1)
  3747. * typeck2.c (store_init_value, process_init_constructor)
  3748. (build_functional_cast): Use build_constructor.
  3749. 2003-04-12 Zack Weinberg <zack@codesourcery.com>
  3750. * call.c (print_z_candidates): Use gcc_gettext_width, not
  3751. strlen, to determine how much padding to use.
  3752. 2003-04-10 Zack Weinberg <zack@codesourcery.com>
  3753. * decl.c: Update all calls to shadow_warning.
  3754. 2003-04-10 Mark Mitchell <mark@codesourcery.com>
  3755. * class.c (layout_class_type): Correct handling for overlong
  3756. bit-fields whose width is the same as an integer type.
  3757. 2003-04-06 Zack Weinberg <zack@codesourcery.com>
  3758. * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
  3759. * cp-lang.c (cp_tree_size): New function.
  3760. (LANG_HOOKS_TREE_SIZE): Override.
  3761. * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
  3762. tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
  3763. (union lang_tree_node): Remove common and srcloc members.
  3764. (build_srcloc_here): Don't prototype.
  3765. * decl.c (cp_tree_node_structure): Kill SRCLOC case.
  3766. * pt.c (pending_templates): Correct comment.
  3767. * tree.c (build_srcloc, build_srcloc_here): Kill.
  3768. 2003-04-06 Zack Weinberg <zack@codesourcery.com>
  3769. * call.c: Include intl.h.
  3770. (print_z_candidate): Always use inform; get rid of errfn
  3771. argument. Reorganize so that all the strings get picked up
  3772. by xgettext. Note obligation of caller to pass first argument
  3773. through gettext.
  3774. (print_z_candidates): Update to match. Indent second and
  3775. successive candidates by strlen() of translated message.
  3776. (joust): Restructure ambiguous-conversion pedwarn so that
  3777. translators see a complete sentence. Update calls to
  3778. print_z_candidate.
  3779. * Make-lang.in (cp/call.o): Update dependencies.
  3780. 2003-04-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3781. * decl.c (set_current_binding_level): Delete, revert last change.
  3782. (current_binding_level): Modify to allow it as as lvalue.
  3783. 2003-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3784. * name-lookup.c (find_binding): Pass appropriate pointer type to
  3785. POP_TIMEVAR_AND_RETURN.
  3786. 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3787. * Make-lang.in (cp-warn): Add $(STRICT_WARN).
  3788. * cp-tree.h: Don't insist on having GNUC.
  3789. 2003-04-03 Jason Merrill <jason@redhat.com>
  3790. * cvt.c (ocp_convert): Only abort if we try to convert an object
  3791. of TREE_ADDRESSABLE type.
  3792. * class.c (build_vtable): Set DECL_ALIGN here.
  3793. (get_vtable_decl): Not here.
  3794. (layout_vtable_decl): Or here.
  3795. (create_vtable_ptr): Or here.
  3796. (layout_class_type): Or here.
  3797. (check_bitfield_decl): Don't mess with field alignment.
  3798. 2003-04-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  3799. * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
  3800. DEF_ASSN_OPERATOR): Delete spurious semi-colon.
  3801. * rtti.c (dfs_class_hint_mark): Likewise.
  3802. * decl.c (push_local_name, push_class_level_binding,
  3803. maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
  3804. functions returning void.
  3805. * decl2.c (add_using_namespace): Likewise.
  3806. * decl.c (print_binding_level, print_other_binding_stack,
  3807. print_binding_stack): Cast argument of %p specifier to void*.
  3808. * ptree.c (cxx_print_decl): Likewise.
  3809. * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
  3810. VAR_FUNCTION_OR_PARM_DECL_CHECK,
  3811. VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
  3812. BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
  3813. LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
  3814. * decl.c (set_current_binding_level): New macro. Use throughout
  3815. when setting the current binding level.
  3816. * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
  3817. in enum.
  3818. * method.c (mangling_flags): Likewise.
  3819. * cp-tree.h (lang_type_header): Add __extension__ and use
  3820. CHAR_BITFIELD for members.
  3821. 2003-04-02 Geoffrey Keating <geoffk@apple.com>
  3822. PR other/9274
  3823. * mangle.c: Include gt-cp-mangle.h.
  3824. (subst_identifiers): Mark with GTY.
  3825. * config-lang.in (gtfiles): Add cp/mangle.c.
  3826. * Make-lang.in: (gt-cp-mangle.h): New rule.
  3827. (cp/mangle.o): Depends on gt-cp-mangle.h.
  3828. 2003-04-01 Andrew Pinski <pinskia@physics.uc.edu>
  3829. * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
  3830. after \$(srcdir)/cp/name-lookup.h.
  3831. * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
  3832. of ggc_alloc. Include gt-cp-name-lookup.h at the end of the file.
  3833. * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
  3834. (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
  3835. 2003-03-31 Jason Merrill <jason@redhat.com>
  3836. PR java/10145
  3837. * class.c (check_field_decl): Don't set DECL_ALIGN.
  3838. 2003-03-30 Mark Mitchell <mark@codesourcery.com>
  3839. PR c++/7647
  3840. * decl.c (grokdeclarator): Tidy, slightly.
  3841. * search.c (lookup_field_1): Add want_type parameter.
  3842. (lookup_field_r): Adjust call to lookup_field_1.
  3843. 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3844. * Make-lang.in (cp/name-lookup.o): Add more dependencies.
  3845. 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3846. * cp-tree.h (binding_for_name: Move to name-lookup.h Adjust
  3847. prototype.
  3848. (cxx_scope_find_binding_for_name): Likewise.
  3849. * decl.c (find_binding: Move to name-lookup.c.
  3850. (binding_for_name): Likewise.
  3851. (cxx_scope_find_binding_for_name): Likewise.
  3852. (BINDING_LEVEL): Remove.
  3853. (push_binding): Tidy.
  3854. (push_class_binding): Likewise.
  3855. (pop_binding): Likewise.
  3856. (poplevel): Likewise.
  3857. (poplevel_class): Likewise.
  3858. (set_identifier_type_value_with_scope): Likewise.
  3859. (push_overloaded_decl): Likewise.
  3860. (lookup_tag): Likewise.
  3861. (unqualified_namespace_lookup): Likewise.
  3862. (lookup_name_current_level): Likewise.
  3863. (maybe_inject_for_scope_var): Likewise.
  3864. (namespace_binding): Move to name-lookup.c.
  3865. (set_namespace_binding): Likewise.
  3866. * decl2.c (lookup_using_namespace): Tidy.
  3867. (qualified_lookup_using_namespace): Likewise.
  3868. (do_toplevel_using_decl): Likewise.
  3869. * name-lookup.c: Include "timevar.h"
  3870. * name-lookup.h (cxx_scope): Declare.
  3871. (struct cxx_binding): Lose member "has_level". Adjust "scope"
  3872. member declaration.
  3873. (BINDING_SCOPE): Adjust definition.
  3874. (BINDING_HAS_LEVEL_P): Remove.
  3875. 2003-03-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
  3876. * name-lookup.c: New file.
  3877. * name-lookup.h: Likewise..
  3878. * decl.c (push_binding): Adjust use cxx_binding_make.
  3879. (free_bindings): Move to name-lookup.c
  3880. (pop_binding): Use cxx_binding_free.
  3881. (binding_for_name): Tidy.
  3882. * cp-tree.h: Include "name-lookup.h"
  3883. (cxx_binding_make): Move to name-lookup.h
  3884. (cxx_binding_clear): Likewise.
  3885. (struct cxx_binding): Likewise.
  3886. (LOCAL_BINDING_P): Likewise.
  3887. (INHERITED_VALUE_BINDING_P): Likewise.
  3888. (BINDING_SCOPE): Likewise.
  3889. (BINDING_HAS_LEVEL_P): Likewise.
  3890. (BINDING_VALUE): Likewise.
  3891. (BINDING_TYPE): Likewise.
  3892. * config-lang.in (gtfiles): Add cp/name-lookup.h
  3893. * Make-lang.in (cp/name-lookup.o): New rule.
  3894. (CXX_OBJS): Add cp/name-lookup.o
  3895. (CXX_TREE_H): Add cp/name-lookup.h
  3896. 2003-03-28 Jason Merrill <jason@redhat.com>
  3897. PR c++/10245
  3898. * cvt.c (force_rvalue): New fn.
  3899. * call.c (build_conditional_expr): Use it.
  3900. * cp-tree.h: Declare it.
  3901. 2003-03-28 Mike Stump <mrs@apple.com>
  3902. * error.c (dump_expr): Add 0x to printed hex numbers to make
  3903. output match source code better.
  3904. 2003-03-28 Mark Mitchell <mark@codesourcery.com>
  3905. PR c++/10218
  3906. * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
  3907. definitions.
  3908. * decl2.c (generate_ctor_or_dtor_function): Tolerate a
  3909. non-existant ssdf_decls array.
  3910. (finish_file): Call generator_ctor_or_dtor_function when there are
  3911. static constructors or destructors and no other static
  3912. initializations.
  3913. 2003-03-28 Nathan Sidwell <nathan@codesourcery.com>
  3914. PR c++/10047
  3915. * decl2.c (finish_file): Don't warn about explicitly instantiated
  3916. inline decls.
  3917. 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
  3918. PR c++/10224
  3919. * pt.c (lookup_template_class): Only check instantiated args if
  3920. they do not contain template parameters.
  3921. 2003-03-27 Nathan Sidwell <nathan@codesourcery.com>
  3922. PR c++/10158
  3923. * parser.c (cp_parser_function_definition): Set
  3924. DECL_INITIALIZED_IN_CLASS for members.
  3925. * pt.c (instantiate_decl): Only reduce the template args for
  3926. friends that are not defined in class.
  3927. 2003-03-25 Jason Merrill <jason@redhat.com>
  3928. * call.c (print_z_candidate): Change name of first arg to msgid.
  3929. (joust): Add comment for translators.
  3930. 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
  3931. PR c++/9898, PR c++/383, DR 322
  3932. * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
  3933. through reference types on both PARM and ARG.
  3934. 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
  3935. PR c++/10119
  3936. * error.c (dump_expr) <BASELINK>: Use dump_expr.
  3937. * pt.c (maybe_fold_nontype_args): New function.
  3938. (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
  3939. <TEMPLATE_ID_EXPR>: Break out folding code, call it.
  3940. (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
  3941. maybe_fold_nontype_args.
  3942. 2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
  3943. PR c++/10026
  3944. * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
  3945. 2003-03-23 Mark Mitchell <mark@codesourcery.com>
  3946. PR c++/7086
  3947. * typeck.c (cxx_mark_addressable): Adjust call to
  3948. gen_mem_addressof or put_var_into_stack.
  3949. 2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
  3950. PR c++/9978, c++/9708
  3951. * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
  3952. * call.c (add_template_candidate_real): Adjust
  3953. instantiate_template call.
  3954. * class.c (resolve_address_of_overloaded_function): Likewise.
  3955. * decl.c (build_enumerator): Set TREE_CONSTANT.
  3956. * pt.c (check_instantiated_args): New.
  3957. (push_inline_template_parms_recursive): Set TREE_CONSTANT,
  3958. TREE_READONLY.
  3959. (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
  3960. (reduce_template_parm_level): Likewise.
  3961. (process_template_parm): Likewise.
  3962. (check_explicit_specialization): Adjust instantiate_template call.
  3963. (convert_template_argument): Don't check non-type argument here.
  3964. (lookup_template_class): Check them here.
  3965. (tsubst_friend_function): Adjust instantiate_template call.
  3966. (instantiate_template): Add tsubst_flags parameter, use it. Check
  3967. instantiated args.
  3968. 2003-03-21 Zack Weinberg <zack@codesourcery.com>
  3969. * decl.c: Update calls to shadow_warning.
  3970. 2003-03-21 Nathan Sidwell <nathan@codesourcery.com>
  3971. PR c++/9898
  3972. * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
  3973. (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
  3974. 2003-03-20 Mark Mitchell <mark@codesourcery.com>
  3975. * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
  3976. friends.
  3977. * cp/pt.c (instantiate_class_template): Fix formatting.
  3978. 2003-03-14 Matt Austern <austern@apple.com>
  3979. * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
  3980. (unemitted_tinfo_decl_p): Remove.
  3981. (emit_tinfo_decl): Change declaration to remove unused parameter.
  3982. * decl2.c (finish_file): Change tinfo emission to loop through
  3983. unemitted_tinfo_decls array instead of looping through all decls.
  3984. * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
  3985. unused second parameter.
  3986. (init_rtti_processing): initialize unemitted_tinfo_decls varray.
  3987. (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
  3988. (emit_tinfo_decl): remove unused second parameter, add assertion
  3989. that decl hasn't already been emitted.
  3990. 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
  3991. * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
  3992. type from 'int' to 'bool'. Replace 0 and 1 with true and false in
  3993. return statements.
  3994. 2003-03-19 Jason Merrill <jason@redhat.com>
  3995. PR c++/8316, c++/9315, c++/10136
  3996. * call.c (print_z_candidate): Split out from...
  3997. (print_z_candidiates): ...here.
  3998. (joust): Use it.
  3999. 2003-03-17 Roger Sayle <roger@eyesopen.com>
  4000. PR c++/10031
  4001. * decl.c (duplicate_decls): Use the new type when prototyping
  4002. anticipated decls, even when the types match. This defines the
  4003. exception list for the built-in function.
  4004. 2003-03-17 Jason Merrill <jason@redhat.com>
  4005. PR c++/10091
  4006. * typeck.c (build_class_member_access_expr): Compare
  4007. TYPE_MAIN_VARIANTs.
  4008. 2003-03-17 Mark Mitchell <mark@codesourcery.com>
  4009. PR c++/9639
  4010. * parser.c (cp_parser_declarator_id): Clear parser->scope.
  4011. 2003-03-16 Jason Merrill <jason@redhat.com>
  4012. PR c++/9993
  4013. * decl.c (finish_function): Only allow the NRVO to use variables
  4014. declared at function scope.
  4015. 2003-03-17 Andreas Jaeger <aj@suse.de>
  4016. * Make-lang.in (cp/TAGS): Remove.
  4017. 2003-03-16 Nathan Sidwell <nathan@codesourcery.com>
  4018. PR c++/9629
  4019. * cp-tree.h (struct language_function): Add in_base_initializer.
  4020. (in_base_initializer): define it.
  4021. (expand_member_init): Remove INIT param.
  4022. * init.c (expand_member_init): Remove INIT param, return the member.
  4023. (emit_mem_initializers): Set in_base_initializer.
  4024. * class.c (build_base_path): Check in_base_initializer.
  4025. * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
  4026. * pt.c (tsubst_initializer_list): Likewise.
  4027. 2003-03-16 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4028. * decl.c (binding_for_name): Fix initialization thinko.
  4029. 2003-03-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4030. Compile-time improvement: 2/n.
  4031. * cp-tree.h (struct cxx_binding): New datatype;
  4032. (struct lang_identifier): Use it.
  4033. (LOCAL_BINDING_P): Adjust definition.
  4034. (INHERITED_VALUE_BINDING_P): Likewise.
  4035. (BINDING_SCOPE): Likewise.
  4036. (BINDING_HAS_LEVEL_P): Likewise.
  4037. (BINDING_VALUE): Likewise.
  4038. (BINDING_TYPE): Likewise.
  4039. (IDENTIFIER_VALUE): Likewise.
  4040. (struct tree_binding): Remove.
  4041. (TS_CP_BINDING): Likewise.
  4042. ((union lang_tree_node): Remove field "binding".
  4043. (cxx_binding_clear): New macro.
  4044. (binding_for_name): Adjust return type.
  4045. (qualified_lookup_using_namespace): Adjust prototype.
  4046. (lookup_using_namespace): Adjust prototype.
  4047. (cxx_scope_find_binding_for_name): Declare.
  4048. * cp-tree.def: Remove CPLUS_BINDING definition.
  4049. * decl.c (push_binding): Adjust local variable type.
  4050. (add_binding): Likewise.
  4051. (push_class_binding): Likewise.
  4052. (pop_binding): Likewise.
  4053. (poplevel): Likewise.
  4054. (poplevel_class): Likewise.
  4055. (free_bindings): Adjust type.
  4056. (find_binding): Adjust return type, add a third parameter. Remove
  4057. non-useful assertion now that we use static typing.
  4058. (cxx_scope_find_binding_for_name): New function.
  4059. (binding_for_name): Use it. Adjust local variable type. Simplify.
  4060. (namespace_binding): Simplify.
  4061. (set_namespace_binding): Likewise.
  4062. (set_identifier_type_value_with_scope): Adjust local variable type.
  4063. (lookup_tag): Don't type-abuse of local variable 'old'.
  4064. (lookup_namespace_name): Likewise. Allocate binding on stack.
  4065. (select_decl): Adjust prototype.
  4066. (unqualified_namespace_lookup): Allocate binding on stack.
  4067. Don't type-abuse of local variable 'val'.
  4068. (lookup_name_real): Likewise.
  4069. (maybe_inject_for_scope_var): Adjust local variable type.
  4070. (cp_tree_node_structure): Remove CPLUS_BINDING case label.
  4071. (namespace_binding): Adjust logic, simplify.
  4072. (BINDING_LEVEL): Adjust definition.
  4073. (push_class_level_binding): Adjust local variable type.
  4074. (struct cxx_saved_binding): Adjust field 'binding' type.
  4075. * decl2.c (ambiguous_decl): Adjust prototype.
  4076. (lookup_using_namespace): Adjust local variable type.
  4077. (qualified_lookup_using_namespace): Catch type error and correct
  4078. ensueing logic error.
  4079. (do_nonmember_using_decl): Adjust local variable type. Allocate
  4080. temporary cxx_binding on stack.
  4081. (do_toplevel_using_decl): Adjust local variable type.
  4082. * ptree.c (cxx_print_cxx_binding): New function.
  4083. (cxx_print_identifier): Use it.
  4084. (cxx_print_xnode): Delete CPLUS_BINDING case label.
  4085. 2003-03-15 Roger Sayle <roger@eyesopen.com>
  4086. * tree.c (count_functions): Fix whitespace.
  4087. 2003-03-15 Neil Booth <neil@daikokuya.co.uk>
  4088. * Make-lang.in: Update.
  4089. 2003-03-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4090. PR c++/6440
  4091. * pt.c (maybe_process_partial_specialization): Handle
  4092. member class template when enclosing class template is
  4093. explicit specialized.
  4094. (most_general_template): Stop looking when DECL is already
  4095. specialized.
  4096. 2003-03-13 Jason Merrill <jason@redhat.com>
  4097. PR c++/9420
  4098. * search.c (lookup_conversions): Call complete_type here.
  4099. * call.c (implicit_conversion): Not here.
  4100. 2003-03-13 Mark Mitchell <mark@codesourcery.com>
  4101. * decl2.c (do_nonmember_using_decl): Correct handling of
  4102. simultaneous type/non-type bindings.
  4103. * call.c (initialize_reference): Remove bogus assertion.
  4104. * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
  4105. 2003-03-12 Andrew Lewycky <andrew@mxc.ca>
  4106. PR c++/7050
  4107. * expr.c (cxx_expand_expr): Return const0_rtx for throw
  4108. expressions.
  4109. 2003-03-11 Mark Mitchell <mark@codesourcery.com>
  4110. PR c++/9474
  4111. * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
  4112. to merge old and new declarations.
  4113. 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
  4114. * g++.1: Remove.
  4115. * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
  4116. (cp/g++.1): Build it from scratch in the build tree.
  4117. (c++.install-man): Depend on it. Install it from the build tree.
  4118. (c++.mostlyclean): Clean it.
  4119. 2003-03-11 Mark Mitchell <mark@codesourcery.com>
  4120. PR c++/9474
  4121. * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
  4122. to merge old and new declarations.
  4123. PR c++/9924
  4124. * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
  4125. 2003-03-11 Jason Merrill <jason@redhat.com>
  4126. PR c++/9820
  4127. * search.c (lookup_member): Fix handling of functions in a class
  4128. being defined.
  4129. 2003-03-11 Mark Mitchell <mark@codesourcery.com>
  4130. PR c++/8700
  4131. * call.c (convert_class_to_reference): Adjust usage of
  4132. splice_viable.
  4133. (any_viable): Remove.
  4134. (splice_viable): Combine with any_viable.
  4135. (print_z_candidates): Avoid printing duplicates.
  4136. (build_user_type_conversion_1): Adjust usage of splice_viable.
  4137. (build_new_function_call): Likewise.
  4138. (build_operator_new_call): Likewise.
  4139. (build_object_call): Likewise.
  4140. (build_conditional_expr): Likewise.
  4141. (build_new_op): Likewise.
  4142. (build_new_method_call): Likewise.
  4143. (joust): Remove spurious comment.
  4144. * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
  4145. * decl2.c (arg_assoc_class): Simplify.
  4146. * friend.c (add_friend): Likewise.
  4147. 2003-03-11 Jason Merrill <jason@redhat.com>
  4148. PR c++/8660
  4149. * decl2.c (check_classfn): A member template only matches a
  4150. member template.
  4151. 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
  4152. * Make-lang.in (CXX_C_OBJS): Update.
  4153. * lang-specs.h: Don't define __GNUG__ here.
  4154. 2003-03-10 Mark Mitchell <mark@codesourcery.com>
  4155. * call.c (perform_overload_resolution): New function.
  4156. (build_new_function_call): Use it.
  4157. (build_operator_new_call): Likewise.
  4158. (add_candidates): Add explicit_targs and template_only parameters.
  4159. (build_new_op): Adjust accordingly.
  4160. * cp-tree.h (build_operator_new_call): New function.
  4161. (build_function_call_real): Remove.
  4162. (build_function_call_maybe): Likewise.
  4163. * init.c (build_new_1): Use build_operator_new_call.
  4164. * typeck.c (build_function_call_real): Rename to ...
  4165. (build_function_call): ... this.
  4166. 2003-03-10 Devang Patel <dpatel@apple.com>
  4167. PR c++/9394
  4168. * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
  4169. 2003-03-10 Jason Merrill <jason@redhat.com>
  4170. PR c++/9798
  4171. * decl.c (push_using_directive): Push before recursing.
  4172. PR c++/9868, c++/9524
  4173. * call.c (resolve_scoped_fn_name): Handle the case of a function
  4174. pointer member.
  4175. * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
  4176. argument in the pointer-to-member case.
  4177. 2003-03-09 Mark Mitchell <mark@codesourcery.com>
  4178. PR c++/9373
  4179. * cp-lang.c (cxx_get_alias_set): Use alias set zero for
  4180. pointers to member functions.
  4181. PR c++/8534
  4182. * decl.c (build_ptrmemfunc_type): Do not allow default arguments
  4183. in pointer-to-member-function types.
  4184. 2003-03-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4185. * expr.c (cplus_expand_constant): Use C90 prototype style.
  4186. (cxx_expand_expr): Likewise.
  4187. 2003-03-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4188. PR c++/9970
  4189. * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
  4190. functions.
  4191. 2003-03-08 Geoffrey Keating <geoffk@apple.com>
  4192. * lang-specs.h (c++-header): Change .pch to .gch.
  4193. 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
  4194. * cp-tree.h (cxx_init): Update prototype.
  4195. * lex.c (cxx_init): Similarly.
  4196. 2003-03-08 Mark Mitchell <mark@codesourcery.com>
  4197. PR c++/9823
  4198. * cp-tree.h (begin_mem_initializers): Remove.
  4199. * parser.c (cp_parser_mem_initializer_list): Inline it here.
  4200. Do not call finish_mem_initializers if not in a constructor.
  4201. (cp_parser_class_head): Fix typo in error message.
  4202. * semantics.c (begin_mem_initializers): Remove.
  4203. * testsuite/g++.dg/parser/constructor1.C: New test.
  4204. PR c++/9809
  4205. * call.c (add_function_candidate): Skip builtin fuctions that have
  4206. not yet been declared.
  4207. PR c++/9982
  4208. * init.c (build_new_1): Correct logic for determining whether or
  4209. not to use an array cookie.
  4210. PR c++/9524
  4211. * parser.c (cp_parser_postfix_expression): Call
  4212. finish_non_static_data_member, even when processing_template_decl.
  4213. PR c++/9912
  4214. * cp-tree.h (is_ancestor): New function.
  4215. (handle_class_head): Change prototype.
  4216. * decl2.c (is_namespace_ancestor): Rename to ...
  4217. (namespace_anecestor): ... this.
  4218. (set_decl_namespace): Adjust accordingly.
  4219. (handle_class_head): Remove unnecessary parameters.
  4220. * parser.c (cp_parser_class_head): Check that
  4221. nested-name-specifiers are used appropriately.
  4222. 2003-03-07 Mark Mitchell <mark@codesourcery.com>
  4223. * call.c (reference_binding): Remove REF_IS_VAR parameter.
  4224. (implicit_conversion): Adjust call to reference_binding.
  4225. (make_temporary_var_for_ref_to_type): Add TYPE parameter.
  4226. (initialize_reference): Adjust handling for references bound to
  4227. rvalues.
  4228. * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
  4229. prototype.
  4230. (real_non_cast_lvalue_p): New method.
  4231. * cvt.c (build_up_reference): Adjust use of
  4232. make_temporary_var_for_ref_to_temp.
  4233. * tree.c (real_non_cast_lvalue_p): New method.
  4234. 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4235. * except.c (init_exception_processing): Use C90 prototype style.
  4236. (cp_protect_cleanup_actions): Likewise.
  4237. (prepare_eh_type): Likewise.
  4238. (build_eh_type_type): Likewise.
  4239. (build_exc_ptr): Likewise.
  4240. (do_begin_catch): Likewise.
  4241. (dtor_nothrow): Likewise.
  4242. (do_end_catch): Likewise.
  4243. (push_eh_cleanup): Likewise.
  4244. (decl_is_java_type): Likewise.
  4245. (choose_personality_routine): Likewise.
  4246. (initialize_handler_parm): Likewise.
  4247. (expand_start_catch_block): Likewise.
  4248. (expand_end_catch_block): Likewise.
  4249. (begin_eh_spec_block): Likewise.
  4250. (finish_eh_spec_block): Likewise.
  4251. (do_allocate_exception): Likewise.
  4252. (do_free_exception): Likewise.
  4253. (wrap_cleanups_r): Likewise.
  4254. (stabilize_throw_expr): Likewise.
  4255. (build_throw): Likewise.
  4256. (complete_ptr_ref_or_void_ptr_p): Likewise.
  4257. (is_admissible_throw_operand): Likewise.
  4258. (nothrow_libfn_p): Likewise.
  4259. (can_convert_eh): Likewise.
  4260. (check_handlers_1): Likewise.
  4261. (check_handlers): Likewise.
  4262. 2003-03-06 Mark Mitchell <mark@codesourcery.com>
  4263. * call.c (merge_conversion_sequences): New function.
  4264. (build_conv): Set ICS_USER_FLAG for USER_CONVs.
  4265. (convert_class_to_reference): Correct handling of second
  4266. standard conversion sequence in a user-defined conversion
  4267. sequence.
  4268. (build_user_type_conversion_1): Use merge_conversion_sequences.
  4269. * cp-tree.def: Add comments for CONV nodes.
  4270. * rtti.c (get_tinfo_decl): Use build_address/build_nop.
  4271. 2003-03-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4272. * error.c (init_error): Use C90 prototype style.
  4273. (dump_scope): Likewise.
  4274. (dump_qualifiers): Likewise.
  4275. (dump_template_argument): Likewise.
  4276. (dump_template_argument_list): Likewise.
  4277. (dump_template_parameter): Likewise.
  4278. (dump_template_bindings): Likewise.
  4279. (dump_type): Likewise.
  4280. (dump_typename): Likewise.
  4281. (class_key_or_enum): Likewise.
  4282. (dump_aggr_type): Likewise.
  4283. (dump_type_prefix): Likewise.
  4284. (dump_type_suffix): Likewise.
  4285. (dump_global_iord): Likewise.
  4286. (dump_simple_decl): Likewise.
  4287. (dump_decl): Likewise.
  4288. (dump_template_decl): Likewise.
  4289. (dump_function_decl): Likewise.
  4290. (dump_parameters): Likewise.
  4291. (dump_exception_spec): Likewise.
  4292. (dump_function_name): Likewise.
  4293. (dump_template_parms): Likewise.
  4294. (dump_char): Likewise.
  4295. (dump_expr_list): Likewise.
  4296. (dump_expr): Likewise.
  4297. (dump_binary_op): Likewise.
  4298. (dump_unary_op): Likewise.
  4299. (type_as_string): Likewise.
  4300. (expr_as_string): Likewise.
  4301. (decl_as_string): Likewise.
  4302. (context_as_string): Likewise.
  4303. (lang_decl_name): Likewise.
  4304. (cp_file_of): Likewise.
  4305. (cp_line_of): Likewise.
  4306. (decl_to_string): Likewise.
  4307. (expr_to_string): Likewise.
  4308. (fndecl_to_string): Likewise.
  4309. (code_to_string): Likewise.
  4310. (language_to_string): Likewise.
  4311. (parm_to_string): Likewise.
  4312. (op_to_string): Likewise.
  4313. (type_to_string): Likewise.
  4314. (assop_to_string): Likewise.
  4315. (args_to_string): Likewise.
  4316. (cv_to_string): Likewise.
  4317. (cxx_print_error_function): Likewise.
  4318. (cp_diagnostic_starter): Likewise.
  4319. (cp_diagnostic_finalizer): Likewise.
  4320. (cp_print_error_function): Likewise.
  4321. (function_category): Likewise.
  4322. (print_instantiation_full_context): Likewise.
  4323. (print_instantiation_partial_context): Likewise.
  4324. (maybe_print_instantiation_context): Likewise.
  4325. (print_instantiation_context): Likewise.
  4326. (cp_printer): Likewise.
  4327. (print_integer): Likewise.
  4328. (print_non_consecutive_character): Likewise.
  4329. (locate_error): Likewise.
  4330. 2003-03-06 Mark Mitchell <mark@codesourcery.com>
  4331. PR c++/9965
  4332. * call.c (reference_binding): Add ref_is_var parameter.
  4333. (implicit_conversion): Adjust call to reference_binding.
  4334. (initialize_reference): Likewise.
  4335. PR c++/9400
  4336. * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
  4337. PARM_DECLs.
  4338. PR c++/9791
  4339. * class.c (get_basefndecls): Use lookup_fnfields_1.
  4340. 2003-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4341. PR c++/9188
  4342. * parser.c (cp_parser_type_parameter): Remove redundant `expect'
  4343. in error message.
  4344. (cp_parser_single_declaration): Likewise.
  4345. 2003-03-05 Jason Merrill <jason@redhat.com>
  4346. PR c++/9440
  4347. * call.c (build_conditional_expr): Use convert rather than an
  4348. explicit NOP_EXPR.
  4349. 2003-03-02 Matt Austern <austern@apple.com>
  4350. * decl.c (cp_binding_level): Add static_decls varray member.
  4351. (add_decl_to_level): Add static/inline namespace scope
  4352. declarations to static_decls array.
  4353. (wrapup_global_for_namespace): Pass static_decls only, instead of
  4354. all decls, to wrapup_global_declarations/check_global_declarations.
  4355. (push_namespace): Initialize static_decls for ordinary namespaces.
  4356. (cxx_init_decl_processing): Initialize static_decls for global
  4357. namespace.
  4358. 2003-03-05 Mark Mitchell <mark@codesourcery.com>
  4359. * class.c (end_of_class): Correct thinko.
  4360. 2003-03-04 Nathanael Nerode <neroden@gcc.gnu.org>
  4361. * config-lang.in: Replace ${libstdcxx_version} by its value.
  4362. 2003-03-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4363. * cp-tree.h (cxx_saved_binding): Declare.
  4364. (struct saved_scope): Adjust type of field 'old_binding'.
  4365. * decl.c (cxx_saved_binding_make): New macro.
  4366. (struct cxx_saved_binding): Define.
  4367. (store_bindings): Adjust prototype. Use cxx_saved_binding to save
  4368. C++ bindings.
  4369. (maybe_push_to_top_level): Adjust local variable type.
  4370. (pop_from_top_level): Likewise.
  4371. 2003-03-04 Tom Tromey <tromey@redhat.com>
  4372. * Make-lang.in (c++.tags): New target.
  4373. 2003-03-04 Neil Booth <neil@daikokuya.co.uk>
  4374. * Make-lang.in: Update.
  4375. 2003-03-03 Jason Merrill <jason@redhat.com>
  4376. * decl.c (finish_enum): Do set the type in a template. Simplify.
  4377. * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
  4378. 2003-03-03 Mark Mitchell <mark@codesourcery.com>
  4379. PR c++/9878
  4380. * call.c (convert_class_to_reference): Correct conversion
  4381. sequences.
  4382. (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
  4383. (implicit_conversion): Adjust call to reference_binding.
  4384. (add_candidate): Change type of candidates parameter.
  4385. (add_function_candidate): Likewise.
  4386. (add_conv_candidate): Likewise.
  4387. (build_builtin_candidate): Likewise.
  4388. (add_builtin_candidate): Likewise.
  4389. (add_builtin_candidates): Likewise.
  4390. (add_template_candidate_real): Likewise.
  4391. (add_template_candidate): Likewise.
  4392. (add_template_conv_candidate): Likewise.
  4393. (build_user_type_conversion_1): Adjust accordingly.
  4394. (build_object_call): Likewise.
  4395. (build_conditional_expr): Likewise.
  4396. (add_candidates): Likewise.
  4397. (build_new_op): Likewise.
  4398. (convert_like_real): Use USER_CONV_CAND. Use build_nop.
  4399. (build_new_method_call): Adjust calls to add_function_candidate.
  4400. (make_temporary_var_for_ref_to_temp): New function.
  4401. (initialize_reference): Add decl parameter.
  4402. * class.c (build_rtti_vtbl_entries): Use build_address and
  4403. build_nop.
  4404. * cp-tree.h (initialize_reference): Change prototype.
  4405. (make_temporary_var_for_ref_to_temp): New function.
  4406. (build_type_conversion): Change prototype.
  4407. (build_address): New function.
  4408. (build_nop): Likewise.
  4409. * cvt.c (cp_convert_to_pointer): Adjust call to
  4410. build_type_conversion. Avoid indicating redundant NOP_EXPRs.
  4411. Use build_nop.
  4412. (convert_to_pointer_force): Use build_nop.
  4413. (build_up_reference): Use make_temporary_var_for_ref_to_temp.
  4414. (convert_to_reference): Adjust call to build_type_conversion.
  4415. (ocp_convert): Likewise.
  4416. (build_type_conversion): Remove for_sure parameter.
  4417. * decl.c (grok_reference_init): Use initialize_reference.
  4418. * typeck.c (build_address): New function.
  4419. (build_nop): Likewise.
  4420. (build_unary_op): Use them.
  4421. (build_ptrmemfunc): Tidy slightly.
  4422. (convert_for_initialization): Adjust call to
  4423. initialize_reference.
  4424. * typeck2.c (store_init_value): Remove #if 0'd code.
  4425. 2003-03-03 Jason Merrill <jason@redhat.com>
  4426. * decl.c (start_function): Clear DECL_NUM_STMTS.
  4427. * class.c (get_vtable_decl): Use vtbl_type_node.
  4428. (build_primary_vtable): Check for it.
  4429. 2003-03-02 Aldy Hernandez <aldyh@redhat.com>
  4430. * decl.c (check_initializer): Check for vector_opaque_p.
  4431. 2003-03-02 Ashif Harji <asharji@uwaterloo.ca>
  4432. * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
  4433. invoke an external cpp during compilation.
  4434. 2003-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4435. * decl.c (duplicate_decls): Convert use of warning_with_decl() to
  4436. that of warning().
  4437. (start_decl): Likewise.
  4438. (start_function): Likewise.
  4439. 2003-03-01 Neil Booth <neil@daikokuya.co.uk>
  4440. * Make-lang.in (CXX_C_OBJS): Update.
  4441. 2003-02-28 Mark Mitchell <mark@codesourcery.com>
  4442. PR c++/9892
  4443. * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
  4444. instantiating it.
  4445. 2003-02-28 Aldy Hernandez <aldyh@redhat.com>
  4446. * parser.c (cp_parser_init_declarator): Revert opaque
  4447. vector_opaque_p change.
  4448. Do not include target.h.
  4449. 2003-02-28 Mark Mitchell <mark@codesourcery.com>
  4450. PR c++/9879
  4451. * cp-tree.h (build_zero_init): Add parameter.
  4452. * decl.c (cp_finish_decl): Adjust call.
  4453. * init.c (build_zero_init): Add nelts parameter. Adjust recursive
  4454. calls.
  4455. (build_default_init): Add nelts parameter. Adjust calls to
  4456. build_zero_init.
  4457. (build_new_1): Adjust call to build_default_init.
  4458. * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
  4459. 2003-02-26 Devang Patel <dpatel@apple.com>
  4460. * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
  4461. required. Postpone enum setting for template decls.
  4462. (build_enumerator): Delay copying value node until finish_enum
  4463. (). Remove #if 0'ed code.
  4464. * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
  4465. (tsubst_copy): Add check for enum type.
  4466. 2003-02-25 Mark Mitchell <mark@codesourcery.com>
  4467. PR c++/9683
  4468. * decl2.c (prune_vars_needing_no_initialization): Do not throw
  4469. away initializations for DECL_EXTERNAL VAR_DECLs.
  4470. (finish_file): Adjust accordingly.
  4471. * pt.c (instantiate_decl): Do not defer VAR_DECLs.
  4472. 2003-02-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4473. * decl.c (add_binding): Time TV_NAME_LOOKUP.
  4474. (push_class_binding): Likewise.
  4475. (set_namespace_binding): Likewise.
  4476. 2003-02-24 Mark Mitchell <mark@codesourcery.com>
  4477. PR c++/9836
  4478. * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
  4479. specializations back to the main template.
  4480. * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
  4481. * pt.c (resolve_typename_type): Likewise.
  4482. 2003-02-24 Jeffrey D. Oldham <oldham@codesourcery.com>
  4483. PR c++/9778
  4484. * pt.c (tsubst_copy_and_build): For a templated function inside a
  4485. scope, process template arguments.
  4486. 2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4487. PR c++/9602
  4488. * typeck2.c (abstract_virtuals_error): Don't check when
  4489. TYPE is still template parameter dependent.
  4490. 2003-02-23 Mark Mitchell <mark@codesourcery.com>
  4491. PR c++/5333
  4492. * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
  4493. * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
  4494. * pt.c (instantiate_class_template): Don't try to instantiate
  4495. dependent types.
  4496. (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
  4497. 2003-02-21 Mark Mitchell <mark@codesourcery.com>
  4498. PR c++/9749
  4499. * decl.c (grokdeclarator): Do not allow parameters with variably
  4500. modified types.
  4501. 2003-02-21 Nathan Sidwell <nathan@codesourcery.com>
  4502. * search.c (grow_bfs_bases): Remove. Fold into ...
  4503. (bfs_walk): ... here, fix fencepost error. Fix merge lossage
  4504. in previous patch.
  4505. 2003-02-20 Mark Mitchell <mark@codesourcery.com>
  4506. PR c++/9729
  4507. * mangle.c (mangle_conv_op_name_for_type): Issue an error message
  4508. when the G++ 3.2 ABI prevents correct compilation.
  4509. 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
  4510. Change base class access representation. Share virtual base
  4511. binfos.
  4512. * cp/call.c (build_special_member_call): Remove binfo_for_vbase
  4513. call.
  4514. * cp/class.c (build_base_path): Likewise.
  4515. (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
  4516. (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
  4517. (make_new_vtable): Adjust.
  4518. (force_canonical_binfo_r): Delete.
  4519. (force_canonical_binfo): Delete.
  4520. (mark_primary_virtual_base): Delete.
  4521. (dfs_unshared_virtual_bases): Delete.
  4522. (mark_primary_bases): Adjust.
  4523. (maybe_warn_about_overly_private_class): Adjust.
  4524. (dfs_base_derived_from): Delete.
  4525. (base_derived_from): Follow the inheritance chain.
  4526. (struct find_final_overrider_data): Add vpath member.
  4527. (dfs_find_final_overrider): Adjust.
  4528. (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
  4529. (find_final_overrider): Adjust.
  4530. (update_vtable_entry_for_fn): Adjust.
  4531. (modify_all_vtables): Adjust.
  4532. (walk_subobject_offsets): Adjust.
  4533. (layout_nonempty_base_or_field): Adjust.
  4534. (layout_empty_base): Remove last parameter. Adjust.
  4535. (build_base_field): Adjust.
  4536. (build_base_fields): Adjust.
  4537. (propagate_binfo_offsets): Remove last parameter. Adjust.
  4538. (dfs_set_offset_for_unshared_vbases): Delete.
  4539. (layout_virtual_bases): Adjust.
  4540. (finish_struct_1): Adjust.
  4541. (init_class_processing): Don't init access nodes.
  4542. (dfs_get_primary_binfo): Delete.
  4543. (get_primary_binfo): Adjust.
  4544. (dump_class_hierarchy_r): Remove most derived arg, add IGO
  4545. parameter. Adjust.
  4546. (dump_class_hierarchy): Adjust.
  4547. (finish_vtbls): Adjust.
  4548. (get_original_base): Delete.
  4549. (build_vtt_inits): Adjust.
  4550. (dfs_build_secondary_vptr_vtt_inits): Adjust.
  4551. (dfs_ctor_vtable_bases_queue_p): Adjust.
  4552. (build_ctor_vtbl_group): Adjust.
  4553. (dfs_accumulate_vtbl_inits): Adjust.
  4554. (build_vtbl_initializer): Adjust.
  4555. (build_vbase_offset_vtbl_entries): Adjust.
  4556. (add_vcall_offset_vtbl_entries_1): Adjust.
  4557. * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
  4558. (access_*_node): Remove.
  4559. (CANONICAL_BINFO): Delete.
  4560. (BINFO_UNSHARED_MARKED): Remove.
  4561. (BINFO_MARKED): Set LANG_FLAG_0 directly.
  4562. (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
  4563. (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
  4564. (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
  4565. Delete.
  4566. (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
  4567. (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
  4568. (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
  4569. Delete.
  4570. (BINFO_DEPENDENT_BASE_P): New.
  4571. (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
  4572. index.
  4573. (markedp, unmarkedp): Adjust.
  4574. (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
  4575. dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
  4576. find_vbase_instance, binfo_for_vbase): Delete.
  4577. (copied_binfo, original_binfo): Declare.
  4578. (finish_base_specifier): Add virtual_p arg.
  4579. (unshare_base_binfos): Delete.
  4580. (copy_base_binfos): Declare.
  4581. (reverse_path): Delete.
  4582. * cp/decl.c (xref_basetypes): Access and virtuality passed
  4583. differently. Don't copy direct base binfos here. Call
  4584. copy_base_binfos.
  4585. * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
  4586. (initialize_vtbl_ptrs): Adjust.
  4587. (expand_member_init): Adjust.
  4588. * cp/parser.c (cp_parser_base_specifier): Adjust.
  4589. * cp/pt.c (instantiate_class_template): Adjust.
  4590. (get_template_base_recursive): Adjust.
  4591. * cp/rtti.c (get_pseudo_ti_init): Adjust.
  4592. (get_pseudo_ti_desc): Adjust.
  4593. * cp/tree.c (unshare_base_binfos): Rename to ...
  4594. (copy_base_binfos): ... here, reimplement.
  4595. (make_binfo): Set BINFO_DEPENDENT_BASE_P.
  4596. (reverse_path): Remove.
  4597. * cp/typeck.c (get_delta_difference): Adjust error messages.
  4598. * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
  4599. * cp/search.c (lookup_base_r): Adjust.
  4600. (dynamic_cast_base_recurse): Adjust.
  4601. (canonical_binfo): Remove.
  4602. (dfs_canonical_queue): Remove.
  4603. (dfs_assert_unmarked_p): Remove.
  4604. (assert_canonical_unmarked): Remove.
  4605. (shared_marked_p, shared_unmarked_p): Remove.
  4606. (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
  4607. (dfs_access_in_type): Adjust.
  4608. (access_in_type): Adjust.
  4609. (dfs_accessible_queue_p): Adjust.
  4610. (dfs_accessible_p): Adjust.
  4611. (is_subobject_of_p_1, is_subobject_of_p): Remove.
  4612. (struct lookup_field_info): Remove from_dep_base_p field.
  4613. (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
  4614. (lookup_field_r): Remove dependent base code.
  4615. (lookup_member): Likewise.
  4616. (dfs_walk, dfs_walk_real): Add access arg to queue fn.
  4617. (dfs_unmarked_real_bases_queue_p): Remove.
  4618. (dfs_marked_real_bases_queue_p): Remove.
  4619. (dfs_skip_vbases): Remove.
  4620. (dfs_get_pure_virtuals): Adjust.
  4621. (markedp, unmarkedp): Adjust.
  4622. (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
  4623. (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
  4624. (dfs_unmark): Adjust.
  4625. (dfs_get_vbase_types):Remove.
  4626. (dfs_build_inheritance_graph_order): Remove.
  4627. (get_vbase_types): Remove
  4628. (dfs_find_vbase_instance): Remove.
  4629. (find_vbase_instance): Remove.
  4630. (dfs_debug_unmarkedp): Adjust.
  4631. (dependent_base_p): Remove.
  4632. (dfs_push_type_decls): Adjust.
  4633. (dfs_push_decls): Adjust.
  4634. (dfs_no_overlap_yet): Adjust.
  4635. (copied_binfo): New function.
  4636. (original_binfo): New function.
  4637. (binfo_for_vbase): Remove.
  4638. 2003-02-18 Zack Weinberg <zack@codesourcery.com>
  4639. * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
  4640. (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
  4641. vectors, for speed.
  4642. 2003-02-18 Mark Mitchell <mark@codesourcery.com>
  4643. PR c++/9704
  4644. * class.c (layout_class_type): In the 3.2 ABI, take into account
  4645. trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
  4646. 2003-02-18 Matt Austern <austern@apple.com>
  4647. * cp/cp-lang.c: Change lang hooks so that final_write_globals does
  4648. nothing for C++.
  4649. * cp/decl.c (wrapup_globals_for_namespace): Remove special
  4650. handling of global namespace.
  4651. 2003-02-18 Geoffrey Keating <geoffk@apple.com>
  4652. * cp-tree.h (rid_to_yy): Delete.
  4653. (C_RID_YYCODE): Delete.
  4654. (finish_file): Delete redundant declaration.
  4655. 2003-02-18 Jason Merrill <jason@redhat.com>
  4656. PR c++/9623
  4657. * decl.c (reshape_init): Don't mess with initializer labels.
  4658. PR c++/9485
  4659. * parser.c (cp_parser_postfix_expression): Set idk properly for
  4660. object->scope::member.
  4661. 2003-02-18 Ben Elliston <bje@redhat.com>
  4662. PR other/7350
  4663. * decl.c (duplicate_decls): Fix typo in comment.
  4664. 2003-02-17 Michael Elizabeth Chastain <mec@shout.net>
  4665. PR debug/9717
  4666. * class.c (build_base_field): Mark fields for base classes with
  4667. DECL_IGNORED_P.
  4668. 2003-02-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4669. PR c++/9457
  4670. * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
  4671. CONSTRUCTOR_ELTS only once.
  4672. 2003-02-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4673. PR c++/9459
  4674. * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
  4675. (dump_type_suffix): Likewise.
  4676. 2003-02-14 Nathan Sidwell <nathan@codesourcery.com>
  4677. * search.c: ANSIfy function declarations and definitions.
  4678. * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
  4679. * call.c (build_method_call, resolve_scoped_fn_name,
  4680. build_java_interface_fn_ref): Adjust lookup_field, lookup_member
  4681. calls.
  4682. * class.c (handle_using_decl): Likewise.
  4683. * decl.c (make_typename_type, make_unmound_class_template,
  4684. start_decl, compute_array_index_type): Likewise.
  4685. * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
  4686. * init.c (expand_member_init, build_member_call): Likewise.
  4687. * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
  4688. resolve_typename_type): Likewise.
  4689. * typeck.c (lookup_destructor, finish_class_member_access_exprm
  4690. build_prememfunc_access_expr): Likewise.
  4691. 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4692. * decl2.c: Include "timevar.h".
  4693. (namespace_ancestor): Time name lookup.
  4694. (add_using_namespace): Likewise.
  4695. (lookup_using_namespace): Likewise.
  4696. (qualified_lookup_using_namespace): Likewise.
  4697. (decl_namespace): Likewise.
  4698. (lookup_arg_dependent): Likewise.
  4699. * lex.c (do_identifier): Likewise.
  4700. (do_scoped_id): Likewise.
  4701. * pt.c (lookup_template_class): Likewise.
  4702. 2003-02-14 Andrew Pinski <pinskia@physics.uc.edu>
  4703. * decl.c: (define_label): Fix warning for return 0 instead of NULL.
  4704. 2003-02-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
  4705. * decl.c: Include "timevar.h".
  4706. (poplevel): Time name lookup.
  4707. (find_binding): Likewise.
  4708. (push_namespace): Likewise.
  4709. (pop_nested_namespace): Likewise.
  4710. (store_bindings): Likewise.
  4711. (maybe_push_to_top_level): Likewise.
  4712. (pop_from_top_level): Likewise.
  4713. (push_local_name): Likewise.
  4714. (pushtag): Likewise.
  4715. (pushdecl): Likewise.
  4716. (pushdecl_with_scope): Likewise.
  4717. (pushdecl_namespace_level): Likewise.
  4718. (pushdecl_top_level): Likewise.
  4719. (pushdecl_class_level): Likewise.
  4720. (push_class_level_binding): Likewise.
  4721. (push_using_decl): Likewise.
  4722. (push_using_directive): Likewise.
  4723. (push_overloaded_decl): Likewise.
  4724. (lookup_label): Likewise.
  4725. (define_label): Likewise.
  4726. (lookup_tag): Likewise.
  4727. (lookup_tag_reverse): Likewise.
  4728. (lookup_namespace_name): Likewise.
  4729. (select_decl): Likewise.
  4730. (unqualified_namespace_lookup): Likewise.
  4731. (lookup_name_real): Likewise.
  4732. (lookup_name_current_level): Likewise.
  4733. (lookup_type_current_level): Likewise.
  4734. (maybe_inject_for_scope_var): Likewise.
  4735. (xref_tag): Likewise.
  4736. * Make-lang.in (cp/decl.o): Add dependency on timevar.h
  4737. 2003-02-12 Phil Edwards <pme@gcc.gnu.org>
  4738. * decl.c (build_enumerator): Remove unneeded test.
  4739. 2003-02-09 Dan Nicolaescu <dann@ics.uci.edu>
  4740. * cp-tree.h (struct lang_type_header): Make all fields unsigned
  4741. char.
  4742. 2003-02-03 Mark Mitchell <mark@codesourcery.com>
  4743. PR c++/7129
  4744. * call.c (z_candidate): Add args.
  4745. (convert_class_to_reference): Set it.
  4746. (implicit_conversion): Tidy.
  4747. (add_candidate): Add args parameter.
  4748. (add_function_candidate): Adjust call to add_candidate.
  4749. (add_conv_candidate): Likewise.
  4750. (build_builtin_candidate): Likewise.
  4751. (build_user_type_conversion_1): Eliminate wasteful tree_cons
  4752. usage.
  4753. (build_new_function_call): Likewise.
  4754. (build_object_call): Likewise.
  4755. (add_candidates): New function.
  4756. (build_new_op): Use it.
  4757. (covert_like_real): Adjust call to build_over_call.
  4758. (build_over_call): Remove args parameter.
  4759. * operators.def: Add <?= and >?=.
  4760. 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
  4761. * typeck.c (build_indirect_ref): Don't check flag_volatile.
  4762. 2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4763. PR c++/8849
  4764. * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
  4765. 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
  4766. * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
  4767. BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
  4768. (BINFO_LANG_ELTS): New #define.
  4769. * tree.c (make_binfo): Use BINFO_LANG_ELTS.
  4770. 2003-01-30 Geoffrey Keating <geoffk@apple.com>
  4771. * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
  4772. 2003-01-30 Mark Mitchell <mark@codesourcery.com>
  4773. * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
  4774. for class types.
  4775. * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
  4776. rather than TYPE_LANG_FLAG_0.
  4777. (TYPE_BUILT_IN): Remove.
  4778. (TYPE_DEPENDENT_P): New macro.
  4779. (TYPE_DEPENDENT_P_VALID): Likewise.
  4780. (lang_type_class): Add fields_readonly.
  4781. * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
  4782. * pt.c (dependent_type_p_r): New function, split out from ...
  4783. (dependent_type_p): ... here. Memoize results.
  4784. * search.c (dependent_base_p): Use dependent_type_p, not
  4785. uses_template_parms.
  4786. * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
  4787. for class types.
  4788. 2003-01-29 Mark Mitchell <mark@codesourcery.com>
  4789. * call.c (build_field_call): Use build_new_op, not build_opfncall.
  4790. (prep_operand): New function.
  4791. (build_new_op): Use it. Remove dead code.
  4792. * class.c (pushclass): Change "modify" parameter type from int to
  4793. bool.
  4794. (currently_open_class): Use same_type_p, not pointer equality.
  4795. (push_nested_class): Adjust calls to pushclass, remove modify
  4796. parameter.
  4797. * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
  4798. (pushclass): Change prototype.
  4799. (push_nested_class): Likewise.
  4800. (grokoptypename): Remove.
  4801. (build_opfncall): Remove.
  4802. (value_dependent_expression_p): Declare.
  4803. (resolve_typename_type): Likewise.
  4804. (resolve_typename_type_in_current_instantiation): Likewise.
  4805. (enter_scope_of): Remove.
  4806. (tsubst): Remove.
  4807. (tsubst_expr): Likewise.
  4808. (tsubst_copy): Likewise.
  4809. (tsubst_copy_and_build): Likewise.
  4810. * decl.c (warn_about_implicit_typename_lookup): Remove.
  4811. (finish_case_label): Return error_mark_node for erroneous labels.
  4812. (start_decl): Adjust calls to push_nested_class.
  4813. (grokfndecl): Call push_scope/pop_scope around call to
  4814. duplicate_decls.
  4815. (grokdeclarator): Do not call tsubst.
  4816. (start_function): Adjust calls to push_nested_class.
  4817. * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
  4818. (check_classfn): Use push_scope/pop_scope around type comparisions.
  4819. (grokoptypename): Remove.
  4820. (push_sscope): Adjust call to push_nested_class.
  4821. * error.c (dump_type): Show cv-qualification of typename types.
  4822. * init.c (build_member_call): Use build_new_op, not
  4823. build_opfncall.
  4824. * method.c (build_opfncall): Remove.
  4825. * parser.c (cp_parser): Add allow_non_constant_expression_p and
  4826. non_constant_expression_p.
  4827. (cp_parser_constant_expression): Adjust prototype.
  4828. (cp_parser_resolve_typename_type): Remove.
  4829. (cp_parser_non_constant_expression): New function.
  4830. (cp_parser_non_constant_id_expression): Likewise.
  4831. (cp_parser_new): Set allow_non_constant_expression_p and
  4832. non_constant_expression_p.
  4833. (cp_parser_primary_expression): Reject `this' and `va_arg' in
  4834. constant-expressions. Note that dependent names aren't really
  4835. constant.
  4836. (cp_parser_postfix_expression): Reject conversions to non-integral
  4837. types in constant-expressions. Neither are increments or
  4838. decrements.
  4839. (cp_parser_unary_expression): Reject increments and decrements in
  4840. constant-expressions.
  4841. (cp_parser_direct_new_declarator): Adjust call to
  4842. cp_parser_constant_expression.
  4843. (cp_parser_cast_expression): Reject conversions to non-integral
  4844. types in constant-expressions.
  4845. (cp_parser_assignment_expression): Rejects assignments in
  4846. constant-expressions.
  4847. (cp_parser_expression): Reject commas in constant-expressions.
  4848. (cp_parser_labeled_statement): Adjust call to
  4849. cp_parser_constant_expression.
  4850. (cp_parser_direct_declarator): Simplify array bounds, even in
  4851. templates, when they are non-dependent. Use
  4852. resolve_typename_type, not cp_parser_resolve_typename_type.
  4853. (cp_parser_class_head): Use resolve_typename_type, not
  4854. cp_parser_resolve_typename_type.
  4855. (cp_parser_member_declaration): Adjust call to
  4856. cp_parser_constant_expression.
  4857. (cp_parser_constant_initializer): Likewise.
  4858. (cp_parser_constructor_declarator): Use resolve_typename_type, not
  4859. cp_parser_resolve_typename_type.
  4860. (cp_parser_late_parsing_default_args): Adjust call to
  4861. push_nested_class.
  4862. * pt.c (tsubst): Give it internal linkage.
  4863. (tsubst_expr): Likewise.
  4864. (tsubst_copy): Likewise.
  4865. (tsubst_copy_and_build): Likewise.
  4866. (push_access_scope_real): Likewise.
  4867. (tsubst_friend_class): Likewise.
  4868. (instantiate_class_template): Adjust call to pushclass.
  4869. (value_dependent_expression_p): Give it external linkage.
  4870. Robustify.
  4871. (resolve_typename_type): New function.
  4872. * semantics.c (finish_call_expr): Use build_new_op, not
  4873. build_opfncall.
  4874. (begin_constructor_declarator): Remove.
  4875. (begin_class_definition): Adjust call to pushclass.
  4876. (enter_scope_of): Remove.
  4877. * typeck.c (comptypes): Resolve typename types as appropriate.
  4878. (build_x_indirect_ref): Use build_new_op, not build_opfncall.
  4879. (build_x_compound_expr): Likewise.
  4880. (build_modify_expr): Likewise.
  4881. (build_x_modify_expr): Likewise.
  4882. * typeck2.c (build_x_arrow): Likewise.
  4883. 2003-01-29 Fariborz Jahanian <fjahanian@apple.com>
  4884. * pt.c (last_pending_template) Declare GTY().
  4885. 2003-01-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4886. PR c++/8591
  4887. * parser.c (cp_parser_elaborated_type_specifier): Convert
  4888. TEMPLATE_DECL to TYPE_DECL only when processing template friends.
  4889. (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
  4890. 2003-01-28 Nathan Sidwell <nathan@codesourcery.com>
  4891. PR c++/9437
  4892. * pt.c (unify): Don't unify '*T' with 'U C::*'.
  4893. PR c++/3902
  4894. * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
  4895. inside a declarator.
  4896. 2003-01-27 Nathan Sidwell <nathan@codesourcery.com>
  4897. * class.c (update_vtable_entry_for_fn): Add index parameter.
  4898. Generate vcall thunk for covariant overriding from a virtual
  4899. primary base.
  4900. (dfs_modify_vtables): Adjust.
  4901. 2003-01-25 Nathan Sidwell <nathan@codesourcery.com>
  4902. PR c++/9403
  4903. * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
  4904. template keyword.
  4905. (cp_parser_base_specifier): Look for and consume a
  4906. TEMPLATE keyword. Replace switch with array index.
  4907. PR c++/795
  4908. * semantics.c (finish_non_static_data_member): Remember the
  4909. field's type even in a template.
  4910. PR c++/9415
  4911. * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
  4912. already scoped.
  4913. PR c++/8545
  4914. * parser.c (cp_parser_cast_expression): Be more tentative.
  4915. 2003-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  4916. * cp-tree.h (flagged_type_tree_s): Remove.
  4917. (check_for_new_type): Likewise.
  4918. * typeck2.c (check_for_new_type): Likewise.
  4919. 2003-01-23 Nathanael Nerode <neroden@gcc.gnu.org>
  4920. * dump.c: ANSIfy function declarations and definitions.
  4921. * cp-tree.h, decl.h: Get rid of PARAMS. Again.
  4922. 2003-01-22 Mark Mitchell <mark@codesourcery.com>
  4923. PR c++/9354
  4924. * init.c (build_new): Set the type of the new-expression, even
  4925. when processing_templte_decl.
  4926. PR c++/9216
  4927. * parser.c (cp_parser_primary_expression): Improve error message
  4928. for templates used in an expression context.
  4929. PR c++/8696
  4930. * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
  4931. parse when encountering "typedef".
  4932. 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
  4933. * class.c, parser.c: ANSIfy function definitions and declarations.
  4934. 2003-01-22 Mark Mitchell <mark@codesourcery.com>
  4935. PR c++/9328
  4936. * error.c (dump_decl): For an OVERLOAD, just print the name of the
  4937. function; it doesn't make sense to try to print its type.
  4938. * semantics.c (finish_typeof): Issue errors about invalid uses.
  4939. PR c++/9298
  4940. * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
  4941. function.
  4942. (cp_parser_expression_statement): Use it.
  4943. (cp_parser_explicit_instantiation): Likewise.
  4944. * pt.c (do_decl_instantiation): Improve error handling logic.
  4945. 2003-01-22 Mark Mitchell <mark@codesourcery.com>
  4946. PR c++/9384
  4947. * parser.c (cp_parser_using_declaration): Issue error messages
  4948. about name resolution failures here.
  4949. PR c++/9388
  4950. * class.c (currently_open_derived_class): Use dependent_type_p.
  4951. * cp-tree.h (dependent_type_p): New function.
  4952. (dependent_template_arg_p): Likewise.
  4953. (dependent_template_p): Likewise.
  4954. (type_dependent_expression_p): Likewise.
  4955. * parser.c (cp_parser_dependent_type_p): Remove.
  4956. (cp_parser_value_dependent_type_p): Likewise.
  4957. (cp_parser_type_dependent_expression_p): Likewise.
  4958. (cp_parser_dependent_template_arg_p): Likewise.
  4959. (cp_parser_dependent_template_id_p): Likewise.
  4960. (cp_parser_dependent_template_p): Likewise.
  4961. (cp_parser_diagnose_invalid_type_name): Replace
  4962. cp_parser_dependent_type_p with dependent_type_p, etc.
  4963. (cp_parser_primary_expresion): Likewise.
  4964. (cp_parser_nested_name_specifier_opt): Likewise.
  4965. (cp_parser_postfix_expression): Likewise.
  4966. (cp_parser_unary_expression): Likewise.
  4967. (cp_parser_template_name): Likewise.
  4968. (cp_parser_class_name): Likewise.
  4969. (cp_parser_lookup_name): Likewise.
  4970. * pt.c (dependent_type_p): New function.
  4971. (value_dependent_expression_p): Likewise.
  4972. (type_dependent_expression_p): Likewise.
  4973. (dependent_template_arg_p): Likewise.
  4974. (dependent_template_id_p): Likewise.
  4975. (dependent_template_p): Likewise.
  4976. PR c++/9285
  4977. PR c++/9294
  4978. * parser.c (cp_parser_simple_declaration): Return quickly when
  4979. encountering errors.
  4980. 2003-01-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  4981. Make-lang.in (cp/decl.o-warn): Add -Wno-error.
  4982. 2003-01-17 Jason Merrill <jason@redhat.com>
  4983. PR c++/9167, c++/9358
  4984. * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
  4985. 2003-01-17 Jason Merrill <jason@redhat.com>
  4986. PR c++/9342
  4987. * call.c (build_conditional_expr): Always do lvalue-rvalue
  4988. conversion.
  4989. 2003-01-17 Mark Mitchell <mark@codesourcery.com>
  4990. PR c++/9294
  4991. * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
  4992. * cp-tree.h (BASELINK_BINFO): Adjust.
  4993. (BASELINK_FUNCTIONS): Likewise.
  4994. (BASELINK_ACCESS_BINFO): Likewise.
  4995. (tree_baselink): New structure.
  4996. (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
  4997. (lang_tree_node): Add baselink.
  4998. * decl.c (cp_tree_node_structure): Add BASELINK case.
  4999. * search.c (build_baselink): Adjust.
  5000. * tree.c (cp_walk_subtrees): Add BASELINK case. Remove BASELINK_P
  5001. test from TREE_LIST case.
  5002. PR c++/9272
  5003. * parser.c (cp_parser_constructor_declarator_p): Do not assume
  5004. that a constructor cannot be declared outside of its own class.
  5005. * parser.c (cp_parser_resolve_typename_type): If the scope cannot
  5006. be resolved, neither can the qualified name.
  5007. * rtti.c (get_pseudo_ti_desc): Fix thinko.
  5008. 2003-01-16 Jason Merrill <jason@redhat.com>
  5009. PR c++/8564
  5010. * init.c (build_vec_init): Re-add maxindex parm.
  5011. (perform_member_init, build_aggr_init): Pass it.
  5012. (build_new_1): Pass it. Use an incomplete array type for full_type.
  5013. * typeck.c (build_modify_expr): Pass it.
  5014. * cp-tree.h: Adjust.
  5015. 2003-01-16 Jeffrey D. Oldham <oldham@codesourcery.com>
  5016. * cp-tree.h (tsubst_copy_and_build): New declaration.
  5017. * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
  5018. (tsubst_expr): Use 'tsubst_copy_and_build'. Update initial comment.
  5019. (tsubst_copy_and_build): New function.
  5020. 2003-01-16 Mark Mitchell <mark@codesourcery.com>
  5021. * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
  5022. (PARTIAL_INSTANTIATION_P): Remove.
  5023. (IMPLICIT_TYPENAME_P): Likewise.
  5024. (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
  5025. (build_typename_type): Remove declaration.
  5026. (parmlist_is_exprlist): Likewise.
  5027. * decl.c (build_typename_type): Make it static, remove third
  5028. parameter.
  5029. (push_class_binding): Don't do implicit typename stuff.
  5030. (make_typename_type): Likewise.
  5031. (lookup_name_real): Likewise.
  5032. (grokdeclarator): Don't try to convert declarations into
  5033. initializations. Don't do implicit typename stuff.
  5034. (parmlist_is_exprlist): Remove.
  5035. (xref_basetypes): Simplify.
  5036. * decl2.c (grokfield): Don't try to convert declarations into
  5037. initializations.
  5038. (build_anon_union_vars): Do this while processing templates, too.
  5039. (finish_anon_union): Likewise.
  5040. * error.c (dump_type): Remove implicit typename handling.
  5041. * parser.c (cp_parser_diagnose_invalid_type_name): New method.
  5042. (cp_parser_primary_expression): Correct handling of names not
  5043. found by unqualified name lookup in templates.
  5044. (cp_parser_nested_name_specifier_opt): Avoid checking dependency
  5045. of types when possible.
  5046. (cp_parser_simple_declaration): Complain intelligently about some
  5047. invalid declarations.
  5048. (cp_parser_member_declaration): Likewise.
  5049. (cp_parser_constructor_declarator_p): Don't check when we're in a
  5050. function scope.
  5051. * pt.c (instantiate_class_template): Remove
  5052. PARTIAL_INSTANTIATION_P gunk.
  5053. * search.c (lookup_field_r): Don't build implicit typenames.
  5054. (marked_pushdecls_p): Don't enter dependent base types.
  5055. (unmarked_pushdecls_p): Likewise.
  5056. * semantics.c (begin_class_definition): Remove implicit typename
  5057. stuff.
  5058. 2003-01-16 Nathan Sidwell <nathan@codesourcery.com>
  5059. PR c++/9212
  5060. * parser.c (cp_parser_direct_declarator): If accepting either
  5061. abstract or named, the name must be an unqualified-id.
  5062. 2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5063. * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
  5064. 2003-01-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5065. * decl2.c (check_classfn): Fix uninitialized warning.
  5066. (build_anon_union_vars): Likewise.
  5067. * pt.c (tsubst_copy): Likewise.
  5068. 2003-01-14 Jeffrey D. Oldham <oldham@codesourcery.com>
  5069. Further conform g++'s __vmi_class_type_info to the C++ ABI
  5070. specification.
  5071. * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
  5072. the specification.
  5073. (class_hint_flags): Likewise.
  5074. 2003-01-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5075. * config-lang.in: Add semantics.c to gtfiles.
  5076. * cp-tree.h (flagged_type_tree_s): Remove lookups field.
  5077. (saved_scope): Likewise.
  5078. (type_lookups): Remove.
  5079. (deferred_access): New structure.
  5080. (type_access_control): Remove.
  5081. (save_type_access_control): Likewise.
  5082. (reset_type_access_control): Likewise.
  5083. (decl_type_access_control): Likewise.
  5084. (push_deferring_access_checks): Declare.
  5085. (resume_deferring_access_checks): Likewise.
  5086. (stop_deferring_access_checks): Likewise.
  5087. (pop_deferring_access_checks): Likewise.
  5088. (get_deferred_access_checks): Likewise.
  5089. (pop_to_parent_deferring_access_checks): Likewise.
  5090. (perform_deferred_access_checks): Likewise.
  5091. (perform_or_defer_access_check): Likewise.
  5092. * decl.c (make_typename_type): Use perform_or_defer_access_check.
  5093. (make_unbound_class_template): Likewise.
  5094. (grokdeclarator): Don't call decl_type_access_control.
  5095. * parser.c (cp_parser_context): Remove deferred_access_checks
  5096. and deferring_access_checks_p fields.
  5097. (cp_parser_context_new): Adjust.
  5098. (cp_parser): Remove access_checks_lists.
  5099. (cp_parser_defer_access_check): Remove.
  5100. (cp_parser_start_deferring_access_checks): Remove.
  5101. (cp_parser_stop_deferring_access_checks): Remove.
  5102. (cp_parser_perform_deferred_access_checks): Remove.
  5103. (cp_parser_nested_name_specifier_opt): Use new deferred access
  5104. functions.
  5105. (cp_parser_simple_declaration): Likewise.
  5106. (cp_parser_template_id): Likewise.
  5107. (cp_parser_function_definition): Likewise.
  5108. (cp_parser_class_specifier): Likewise.
  5109. (cp_parser_lookup_name): Likewise.
  5110. (cp_parser_single_declaration): Likewise.
  5111. (cp_parser_pre_parsed_nested_name_specifier): Likewise.
  5112. (cp_parser_parse_tentatively): Likewise.
  5113. (cp_parser_parse_definitely): Likewise.
  5114. (yyparse): Likewise.
  5115. (cp_parser_init_declarator): Remove access_checks parameter.
  5116. Use new deferred access functions.
  5117. (cp_parser_function_definition_from_specifiers_and_declarator):
  5118. Likewise.
  5119. (cp_parser_class_head): Remove deferring_access_checks_p and
  5120. saved_access_checks parameters. Use new deferred access functions.
  5121. (cp_parser_member_specification_opt): Don't call
  5122. reset_type_access_control.
  5123. * search.c (type_access_control): Remove.
  5124. * semantics.c: Include "gt-cp-semantics.h".
  5125. (deferred_type_access_control): Remove.
  5126. (deferred_access_stack): New variable.
  5127. (deferred_access_free_list): Likewise.
  5128. (push_deferring_access_checks): New function.
  5129. (resume_deferring_access_checks): Likewise.
  5130. (stop_deferring_access_checks): Likewise.
  5131. (pop_deferring_access_checks): Likewise.
  5132. (get_deferred_access_checks): Likewise.
  5133. (pop_to_parent_deferring_access_checks): Likewise.
  5134. (perform_deferred_access_checks): New function, adapted from
  5135. cp_parser_perform_deferred_access_checks.
  5136. (perform_or_defer_access_check): New function, adapted from
  5137. cp_parser_defer_access_check.
  5138. (current_type_lookups): Remove.
  5139. (deferred_type_access_control): Likewise.
  5140. (decl_type_access_control): Likewise.
  5141. (save_type_access_control): Likewise.
  5142. (reset_type_access_control): Likewise.
  5143. (begin_function_definition): Adjust.
  5144. (begin_class_definiton): Likewise.
  5145. 2003-01-13 Jason Merrill <jason@redhat.com>
  5146. PR c++/8748
  5147. * class.c (build_base_path): Take the address before calling save_expr.
  5148. * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
  5149. all the ambiguous conversions are bad.
  5150. * class.c (maybe_warn_about_overly_private_class): Don't stop
  5151. searching when we find a nonprivate method.
  5152. * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
  5153. 2003-01-12 Mark Mitchell <mark@codesourcery.com>
  5154. * cp-tree.h (get_arglist_len_in_bytes): Remove.
  5155. PR c++/9264
  5156. * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
  5157. typeame types more robustly.
  5158. 2003-01-11 Phil Edwards <pme@gcc.gnu.org>
  5159. * parser.c: Fix comment typos.
  5160. 2003-01-10 Mark Mitchell <mark@codesourcery.com>
  5161. PR c++/9099
  5162. * parser.c (cp_parser_scope_through_which_access_occurs): Handle
  5163. an object_type which is not a class type.
  5164. 2003-01-10 Geoffrey Keating <geoffk@apple.com>
  5165. * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
  5166. (cp_parser_late_parsing_default_args): Likewise.
  5167. 2003-01-10 Nathanael Nerode <neroden@gcc.gnu.org>
  5168. * cfns.gperf: ANSIfy function declarations.
  5169. * cfns.h: Regenerate.
  5170. * cp-tree.h: ANSIfy function declarations.
  5171. 2003-01-10 Mark Mitchell <mark@codesourcery.com>
  5172. * cp-tree.h (reparse_absdcl_as_expr): Remove.
  5173. (reparse_absdcl_as_casts): Likewise.
  5174. (reparse_decl_as_expr): Likewise.
  5175. (finish_decl_parsing): Likewise.
  5176. * decl2.c (reparse_absdcl_as_expr): Remove.
  5177. (reparse_absdcl_as_casts): Likewise.
  5178. (repase_decl_as_expr): Likewise.
  5179. (finish_decl_parsing): Likewise.
  5180. PR c++/9128
  5181. PR c++/9153
  5182. PR c++/9171
  5183. * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
  5184. function.
  5185. (cp_parser_nested_name_specifier_opt): Correct the
  5186. check_dependency_p false.
  5187. (cp_parser_postfix_expression): Fix formatting.
  5188. (cp_parser_decl_specifier_seq): Avoid looking for constructor
  5189. declarators when possible.
  5190. (cp_parser_template_id): Avoid performing name-lookup when
  5191. possible.
  5192. (cp_parser_class_head): Do not count specializations when counting
  5193. levels of templates.
  5194. (cp_parser_constructor_declarator_p): Return immediately if
  5195. there's no chance that the tokens form a constructor declarator.
  5196. * rtti.c (throw_bad_typeid): Add comment. Do not return an
  5197. expression with reference type.
  5198. (get_tinfo_decl_dynamic): Do not return an expression with
  5199. reference type.
  5200. (build_typeid): Add comment. Do not return an expression with
  5201. reference type.
  5202. * typeck.c (build_class_member_access_expr): Improve handling of
  5203. conditionals and comma-expressions as objects.
  5204. 2003-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
  5205. * cfns.gperf: ANSIfy function declarations.
  5206. * cfns.h: Regenerate.
  5207. * cp-tree.h: ANSIfy function declarations.
  5208. * parser.c: ANSIfy function declarations & definitions.
  5209. * decl.c (bad_specifiers): Fix parameter order error I introduced.
  5210. 2003-01-09 Geoffrey Keating <geoffk@apple.com>
  5211. Merge from pch-branch:
  5212. 2003-01-09 Geoffrey Keating <geoffk@apple.com>
  5213. Merge to tag pch-merge-20030102:
  5214. * semantics.c (finish_translation_unit): Don't call finish_file.
  5215. * parser.c: Don't include ggc.h.
  5216. (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
  5217. read first token here. Don't allow PCH files after the first
  5218. token is read.
  5219. (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
  5220. (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
  5221. (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
  5222. (cp_parser_late_parsing_for_member): Don't duplicate call to
  5223. cp_lexer_set_source_position_from_token.
  5224. (cp_parser_late_parsing_default_args): Likewise.
  5225. (yyparse): Call finish_file after clearing the_parser.
  5226. 2002-12-11 Geoffrey Keating <geoffk@apple.com>
  5227. * Make-lang.in: Remove $(GGC_H) from all dependencies.
  5228. (CXX_TREE_H): Add $(GGC_H).
  5229. * class.c: Don't include ggc.h.
  5230. (field_decl_cmp): Make parameters be 'const void *' to match qsort.
  5231. (method_name_cmp): Likewise.
  5232. (resort_data): New variable.
  5233. (resort_field_decl_cmp): New.
  5234. (resort_method_name_cmp): New.
  5235. (resort_sorted_fields): New.
  5236. (resort_type_method_vec): New.
  5237. (finish_struct_methods): Delete cast.
  5238. (finish_struct_1): Delete cast.
  5239. * cp-tree.h: Include ggc.h.
  5240. (struct lang_type_class): Add reorder attribute to field `methods'.
  5241. (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
  5242. (resort_sorted_fields): New prototype.
  5243. (resort_type_method_vec): New prototype.
  5244. * call.c: Don't include ggc.h.
  5245. * decl.c: Likewise.
  5246. * decl2.c: Likewise.
  5247. * init.c: Likewise.
  5248. * lex.c: Likewise.
  5249. * method.c: Likewise.
  5250. * optimize.c: Likewise.
  5251. * parse.y: Likewise.
  5252. * pt.c: Likewise.
  5253. * repo.c: Likewise.
  5254. * search.c: Likewise.
  5255. * semantics.c: Likewise.
  5256. * spew.c: Likewise.
  5257. * tree.c: Likewise.
  5258. * lang-specs.h: Remove comment.
  5259. 2002-12-03 Geoffrey Keating <geoffk@apple.com>
  5260. * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
  5261. (operator_name_info): Mark to be saved for PCH, specify size.
  5262. (assignment_operator_name_info): Likewise.
  5263. 2002-11-19 Geoffrey Keating <geoffk@apple.com>
  5264. * decl.c (anon_cnt): Mark to be saved for PCH.
  5265. 2002-10-25 Geoffrey Keating <geoffk@apple.com>
  5266. * lex.c (init_reswords): Delete now-untrue comment.
  5267. Allocate ridpointers using GGC.
  5268. 2002-10-04 Geoffrey Keating <geoffk@apple.com>
  5269. * cp-tree.h (union lang_decl_u2): Add tags to all fields.
  5270. * g++spec.c (lang_specific_driver): Don't include standard
  5271. libraries in `added'.
  5272. 2002-08-27 Geoffrey Keating <geoffk@redhat.com>
  5273. * decl2.c (finish_file): Call c_common_write_pch.
  5274. * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
  5275. 2002-08-17 Geoffrey Keating <geoffk@redhat.com>
  5276. * g++spec.c (lang_specific_driver): Treat .h files as C++ header
  5277. files when using g++.
  5278. * lang-specs.h: Handle compiling C++ header files.
  5279. 2003-01-09 Jakub Jelinek <jakub@redhat.com>
  5280. * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
  5281. 2003-01-09 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5282. * pt.c (push_access_scope_real): Call push_to_top_level for
  5283. function in namespace scope.
  5284. (pop_access_scope): Call pop_from_top_level for function in
  5285. namespace scope.
  5286. 2003-01-09 Jakub Jelinek <jakub@redhat.com>
  5287. * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
  5288. 2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
  5289. * Make-lang.in (c++.install-common, c++.install-man,
  5290. c++.uninstall): Prepend $(DESTDIR) to destination paths in
  5291. all (un)installation commands.
  5292. (c++.install-common): Rewrite $(LN) commands to support
  5293. DESTDIR with "ln" as well as with "ln -s".
  5294. 2003-01-08 Jason Merrill <jason@redhat.com>
  5295. * parser.c (cp_parser_primary_expression): See through explicitly
  5296. scoped ALIAS_DECLs, too.
  5297. 2003-01-08 Nathanael Nerode <neroden@gcc.gnu.org>
  5298. * decl.c: Remove some #if 0 code.
  5299. * decl.c: ANSIfy function declarations.
  5300. 2003-01-07 Mark Mitchell <mark@codesourcery.com>
  5301. * parser.c (cp_parser_asm_definition): Correct handling of omitted
  5302. operands.
  5303. 2003-01-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
  5304. PR c++/9030
  5305. * decl.c (make_typename_type): Check access only when tf_error.
  5306. (make_unbound_class_template): Likewise.
  5307. * pt.c (saved_access_scope): New variable.
  5308. (push_access_scope_real): New function.
  5309. (push_access_scope): Likewise.
  5310. (pop_access_scope): Likewise.
  5311. (tsubst_default_argument): Use them.
  5312. (instantiate_template): Likewise.
  5313. (regenerate_decl_from_template): Likewise.
  5314. (instantiate_decl): Likewise.
  5315. (get_mostly_instantiated_function_type): Likewise.
  5316. 2003-01-07 Nathanael Nerode <neroden@gcc.gnu.org>
  5317. * tree.c: Delete bogus #if 0 code.
  5318. 2003-01-07 Andreas Schwab <schwab@suse.de>
  5319. * class.c (layout_class_type): Don't use
  5320. PCC_BITFIELD_TYPE_MATTERS if not defined.
  5321. 2003-01-06 Mark Mitchell <mark@codesourcery.com>
  5322. PR c++/9165
  5323. * decl2.c (build_cleanup): Mark the object as used.
  5324. * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
  5325. (hash_local_specialization): New function.
  5326. (register_local_specialization): Revert 2003-01-05 change.
  5327. (instantiate_decl): Use hash_local_specialization when creating
  5328. the local_specializations table.
  5329. * decl2.c (mark_used): Do not synthesize thunks.
  5330. * class.c (layout_class_type): Correct handling of unnamed
  5331. bitfields wider than their types.
  5332. PR c++/9189
  5333. * parser.c (cp_parser): Remove default_arg_types. Update
  5334. documentation for unparsed_functions_queues.
  5335. (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
  5336. parameter.
  5337. (cp_parser_new): Don't set parser->default_arg_types.
  5338. (cp_parser_function_definition): Adjust usage of
  5339. unparsed_funtions_queues.
  5340. (cp_parser_class_specifier): Don't mess with
  5341. parser->default_arg_types. Handle default argument processing in
  5342. a separate phase from function body processing.
  5343. (cp_parser_template_declaration_after_export): Adjust usage of
  5344. unparsed_functions_queues.
  5345. (cp_parser_late_parsing_for_member): Do not handle default
  5346. arguments.
  5347. 2003-01-06 Nathan Sidwell <nathan@codesourcery.com>
  5348. PR c++/9109
  5349. * parser.c (cp_parser_declarator_kind): New enum.
  5350. (cp_parser_declarator): Adjust.
  5351. (cp_parser_direct_declarator): Adjust. Allow for either named or
  5352. abstract declarator. Prefer abstract, if possible. Allow
  5353. parenthesized function name.
  5354. (cp_parser_condition): Adjust cp_parser_declarator call.
  5355. (cp_parser_explicit_instantiation): Likewise.
  5356. (cp_parser_init_declarator): Likewise.
  5357. (cp_parser_type_id): Likewise.
  5358. (cp_parser_function_definition): Likewise.
  5359. (cp_parser_member_declaration): Likewise.
  5360. (cp_parser_parameter_declaration): Use cp_parser_declarator to do
  5361. the tentative parsing.
  5362. (cp_parser_exception_declaration): Likewise.
  5363. 2003-01-05 Mark Mitchell <mark@codesourcery.com>
  5364. * parser.c (cp_parser_template_parameter): Adjust call to
  5365. cp_parser_parameter_declaration.
  5366. (cp_parser_parameter_declaration_list): Likewise.
  5367. (cp_parser_parameter_declaration): Replace
  5368. greater_than_is_operator_p with template_parm_p parameter. Do not
  5369. cache tokens for template default arguments.
  5370. * pt.c (retrieve_local_specialization): Use htab_find, not
  5371. htab_find_with_hash.
  5372. (register_local_specialization): Use htab_find_slot, not
  5373. htab_find_slot_with_hash.
  5374. (instantiate_decl): Pass a hash function to htab_create.
  5375. 2003-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
  5376. * parser.c (cp_parser_binary_expression,
  5377. cp_parser_multiplicative_expression,
  5378. cp_parser_additive_expression, cp_parser_shift_expression,
  5379. cp_parser_relational_expression, cp_parser_equality_expression,
  5380. cp_parser_and_expression, cp_parser_exclusive_or_expression,
  5381. cp_parser_inclusive_or_expression,
  5382. cp_parser_logical_and_expression, cp_parser_logical_or_expression,
  5383. cp_parser_binary_expression): Const-ify.
  5384. 2003-01-04 Mark Mitchell <mark@codesourcery.com>
  5385. * method.c (use_thunk): Disable access control while building the
  5386. body of the thunk.
  5387. 2003-01-03 Nathanael Nerode <neroden@gcc.gnu.org>
  5388. * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
  5389. front end.
  5390. 2003-01-03 Matt Austern <austern@apple.com>
  5391. * cp-tree.h (struct lang_type_class): add field for key method
  5392. (cp_global_trees): rename dynamic_classes to keyed_classes
  5393. (key_method): add definition
  5394. * class.c (finish_struct_1): compute class's key method, and add
  5395. the class to keyed_classes list if there is no key method.
  5396. * decl.c (finish_function): add class to keyed_classes list if we
  5397. see a definition of the class's key method.
  5398. * pt.c (instantiate_class_template): add template specialization
  5399. of a dynamic class to keyed_classes list.
  5400. * decl2.c (key_method): remove
  5401. (finish_file): iterate only through keyed_classes list when
  5402. deciding whether to emit vtables, remove class from its list after
  5403. we do the emission.
  5404. 2003-01-02 Jason Merrill <jason@redhat.com>
  5405. * call.c (build_conditional_expr): Stabilize lvalues properly.
  5406. * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
  5407. * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
  5408. Don't allow CALL_EXPR or VA_ARG_EXPR, either.
  5409. * call.c (convert_like_real): Call decl_constant_value for an
  5410. IDENTITY_CONV even if there are no more conversions.
  5411. * cvt.c (build_up_reference): Don't push unnamed temps.
  5412. * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
  5413. * dump.c (cp_dump_tree): Don't try to dump class-specific fields
  5414. for a backend struct.
  5415. * except.c (wrap_cleanups_r, build_throw): Make
  5416. MUST_NOT_THROW_EXPRs void.
  5417. * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
  5418. * init.c (build_vec_delete_1): Pre-evaluate the base address.
  5419. * init.c (get_temp_regvar): Simplify logic.
  5420. * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
  5421. our replacement is a decl.
  5422. * decl.c (cp_make_fname_decl): Push the decls inside the
  5423. outermost scope.
  5424. 2003-01-03 Nathan Sidwell <nathan@codesourcery.com>
  5425. PR c++/45, c++/3784
  5426. * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
  5427. the same too.
  5428. 2003-01-03 Graham Stott <graham.stott@btinternet.com>
  5429. * parser.c (struct cp_parser): Add access_checks_lists field
  5430. (cp_parser_simple_declaration): Use.
  5431. (cp_parser_init_declarator): Likewise.
  5432. 2003-01-02 Mark Mitchell <mark@codesourcery.com>
  5433. * parser.c (cp_parser_declaration): Accept the __extension__
  5434. keyword before the declaration.
  5435. PR c++/2843
  5436. * parser.c (cp_parser_parameter_declaration): Allow attributes to
  5437. appear after the declarator.
  5438. * call.c (build_new_method_call): Fix typo in message format
  5439. string.
  5440. 2003-01-02 Mark Mitchell <mark@codesourcery.com>
  5441. * parser.c (cp_lexer_next_token_is): Declare it inline.
  5442. (cp_lexer_set_source_position_from_token): Likewise.
  5443. (cp_lexer_debugging_p): Likewise.
  5444. (cp_parser_parsing_tentatively): Likewise.
  5445. (cp_parser_nested_name_specifier_opt): Reduce the number of calls
  5446. to the cp_lexer_peek_token.
  5447. * parser.c (cp_parser_sizeof_operand): Do not evaluate the
  5448. expression.
  5449. 2003-01-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
  5450. * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
  5451. cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
  5452. cp/repo.c: Fix copyright years.
  5453. 2003-01-01 Neil Booth <neil@daikokuya.co.uk>
  5454. * lex.c: Remove superfluous include of cpplib.h.
  5455. (CONSTRAINT): Define without conditions.
  5456. (init_cp_pragma): Use c_register_pragma.
  5457. Copyright (C) 2003 Free Software Foundation, Inc.
  5458. Copying and distribution of this file, with or without modification,
  5459. are permitted in any medium without royalty provided the copyright
  5460. notice and this notice are preserved.