/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
/* { dg-additional-options "-std=c++20" { target c++ } } */
-/* { dg-additional-options "-std=c2x" { target c } } */
+/* { dg-additional-options "-std=c23" { target c } } */
int f(int i)
{
/*
{ dg-do compile }
- { dg-options "-Wformat-overflow -std=c2x" }
+ { dg-options "-Wformat-overflow -std=c23" }
*/
extern int sprintf (char* restrict, const char* restrict, ...);
/* Test :: token handling in asm. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
void
f (void)
/* Test atomic_is_lock_free for char8_t. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdatomic.h>
#include <stdint.h>
-/* Test ATOMIC_VAR_INIT not in C2x. */
+/* Test ATOMIC_VAR_INIT not in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdatomic.h>
-/* Test atomic_is_lock_free for char8_t with -std=gnu2x. */
+/* Test atomic_is_lock_free for char8_t with -std=gnu23. */
/* { dg-do run } */
-/* { dg-options "-std=gnu2x -pedantic-errors" } */
+/* { dg-options "-std=gnu23 -pedantic-errors" } */
#include "c2x-stdatomic-lockfree-char8_t.c"
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdatomic.h>
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdatomic.h>
/* Portable assumptions */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
int
f1 (int i)
/* Portable assumptions */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
[[gnu::__assume__ (1)]] void f1 (void); /* { dg-warning "'assume' attribute not followed by ';'" } */
/* { dg-warning "'assume' attribute ignored" "" { target *-*-* } .-1 } */
/* Portable assumptions */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void
foo (int x)
/* PR tree-optimization/107369 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -O1" } */
+/* { dg-options "-std=c23 -O1" } */
void
foo (int x)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void
foo (int x)
/* PR c/102989 */
/* { dg-do compile { target { bitint && dfp } } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 129
void
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
int
foo (_BitInt(127) x, _BitInt(127) y)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=gnu2x -w" } */
+/* { dg-options "-O2 -std=gnu23 -w" } */
_BitInt(37)
foo (_BitInt(37) x, _BitInt(37) y)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 315
_Bool
/* PR c/102989 */
/* { dg-do compile { target bitint575 } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
enum A : _BitInt(15) { A0 = 0, A1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */
enum B : unsigned _BitInt(575) { B0 = 0, B1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */
/* PR c/102989 */
/* { dg-do compile { target bitint575 } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
enum A : _BitInt(15) { A0 = 0, A1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */
enum B : unsigned _BitInt(575) { B0 = 0, B1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
_BitInt(15) a;
_BitInt(42) b;
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#define expr_has_type(e, t) _Generic (e, default : 0, t : 1)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
_Atomic _BitInt(15) a;
_Atomic(_BitInt(15)) b;
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
#define expr_has_type(e, t) _Generic (e, default : 0, t : 1)
/* PR c/102989 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define expr_has_type(e, t) _Generic (e, default : 0, t : 1)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
void
foo (_Complex int ci, _Complex long long cl)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
#define IB __SIZEOF_INT__ * __CHAR_BIT__
typedef _BitInt(IB) V1 __attribute__((vector_size (sizeof (_BitInt(IB))))); /* { dg-error "invalid vector type for attribute 'vector_size'" } */
// PR c/102989
// { dg-do compile { target bitint } }
-// { dg-options "-std=c2x -pedantic-errors" }
+// { dg-options "-std=c23 -pedantic-errors" }
_BitInt(63) a;
signed _BitInt(15) b;
// PR c/102989
// { dg-do compile { target bitint } }
-// { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" }
+// { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" }
_BitInt(63) a; /* { dg-warning "ISO C does not support '_BitInt\\\(63\\\)' before C23" } */
signed _BitInt(15) b; /* { dg-warning "ISO C does not support 'signed _BitInt\\\(15\\\)' before C23" } */
// PR c/102989
// { dg-do compile { target bitint } }
-// { dg-options "-std=c11 -Wno-c11-c2x-compat -pedantic-errors" }
+// { dg-options "-std=c11 -Wno-c11-c23-compat -pedantic-errors" }
_BitInt(63) a;
signed _BitInt(15) b;
/* PR c/102989 */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* PR c/102989 */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
_BitInt(32) a, b = 2147483647wb;
_BitInt(64) c, d = 9223372036854775807wb;
/* PR c/102989 */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* PR c/102989 */
/* { dg-do run } */
/* { dg-require-effective-target fenv } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <limits.h>
/* PR c/102989 */
/* Test that -funsigned-bitfields doesn't affect _BitInt bit-fields which are always signed. */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -funsigned-bitfields" } */
+/* { dg-options "-std=c23 -funsigned-bitfields" } */
struct S { _BitInt(22) a : 7; signed _BitInt(22) b : 7; unsigned _BitInt(22) c : 7; } s;
/* PR c/102989 */
/* { dg-do compile { target { bitint && { float32 && int32 } } } } */
-/* { dg-options "-std=c2x -Wconversion -Wfloat-conversion" } */
+/* { dg-options "-std=c23 -Wconversion -Wfloat-conversion" } */
/* { dg-add-options float32 } */
void
/* PR c/102989 */
/* { dg-do compile { target { bitint } } } */
-/* { dg-options "-std=c2x -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
+/* { dg-options "-std=c23 -Wint-in-bool-context -Waddress -Wpointer-to-int-cast -Wint-to-pointer-cast -Wint-conversion -Wshift-negative-value -Wshift-count-overflow -Wdiv-by-zero" } */
extern char *ax[];
/* PR c/102989 */
/* { dg-do run { target { bitint } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#if __BITINT_MAXWIDTH__ >= 16319
constexpr unsigned _BitInt(16319) a = 468098567701677261276215481936770442254383643766995378241600227179396283432916865881332215867106489159251577495372085663487092317743244770597287633199005374998455333587280357490149993101811392051483761495987108264964738337118155155862715438910721661230332533185335581757600511846854115932637261969633134365868695363914570578110064471868475841348589366933645410987699979080140212849909081188170910464967486231358935212897096260626033055536141835599284498474737858487658470115144771923114826312283863035503700600141440724426364699636330240414271275626021294939422483250619629005959992243418661230122132667769781183790338759345884903821695590991577228520523725302048215447841573113840811593638413425054938213262961448317898574140533090004992732688525115004782973893244091427000396890427152225308661078954671066069234453757593181753900865203439035402480306413572239610467142591920809187367438071170100969567440044691427487959785637338381651309916782063670286046547585240837892307170928849485877186793280707600840866783471799148179250818387716183127323346199533387463363442356218803779697005759324410376476855222420876262425985571982818180353870410149824214544313013285199544193496624223219986402944849622489422007678564946174797892795089330899535624727777525330789492703574564112252955147770942929761545604350869404246558274752353510370157229485004402131043153454290397929387276374054938578976878606467217359398684275050519104413914286024106808116340712273059427362293703151355498336213170698894448405369398757188523160460292714875857879968173578328191358215972493513271297875634400793301929250052822258636015650857683023900709845410838487936778533250407886180954576046340697908584020951295048844938047865657029072850797442976146895294184993736999505485665742811313795405530674199848055802759901786376822069529342971261963119332476504064285869362049662083405789828433132154933242817432809415810548180658750393692272729586232842065658490971201927780014258815333115459695117942273551876646844821076723664040282772834511419891351278169017103987094803829594286352340468346618726088781492626816188657331359104171819822673805856317828499039088088223137258297373929043307673570090396947789598799922928643843532617012164811074618881774622628943539037974883812689130801860915090035870244061005819418130068390986470314677853605080103313411837904358287837401546257413240466939893527508931541065241929872307203876443882106193262544652290132364691671910332006127864146991404015366683569317248057949596070354929361158326955551600236075268435044105880162798380799161607987365282458662031599096921825176202707890730023698706855762932691688259365358964076595824577775275991183149118372047206055118463112864604063853894820407249837871368934941438119680605528546887256934334246075596746410297954458632358171428714141820918183384435681332379317541048252391710712196623406338702061195213724569303285402242853671386113148211535691685461836458295037538034378318055108240082414441205300401526732399959228346926528586852743389490978734787926721999855388794711837164423007719626109179005466113706450765269687580819822772189301084503627297389675134228222337286867641110511061980231247884533492442898936743429641958314135329073406495776369208158032115883850691010569048983941126771477990976092252391972812691669847446798507244106121667885423025613769258102773855537509733295805013313937402282804897213847221072647111605172349464564089914906493508133855389627177663426057763252086286325343811254757681803068276278048757997425284334713190226818463023074461900176958010055572434983135171145365242339273326984465181064287264645470832091115100640584104375577304056951969456200138485313560009272338228103637763863289261673258726736753407044143664079479496972580560534494806170810469304773005873590626280072387999668522546747985701599613975101188543857852141559251634058676718308000324869809628199442681565615662912626022796064414496106344236431285697688357707992989966561557171729972093533007476947862215922583204811189015550505642082475400647639520782187776825395598257421714106473869797642678266380755873356747812273977691604147842741151722919464734890326772594979022403228191075586910464204870254674290437668861177639713112762996390246102030994917186957826982084194156870398312336059100521566034092740694642613192909850644003933745129291062576341213874815510099835708723355432970090139671120232910747665906191360160259512198160849784197597300106223945960886603127136037120000864968668651452411048372895607382907494278810971475663944948791458618662250238375166523484847507342040066801856222328988662049579299600545682490412754483621051190231623196265549391964259780178070495642538883789503379406531279338866955157646654913405181879254189185904298325865503395688786311067669273609670603076582607253527084977744533187145642686236350165593980428575119329911921382240780504527422630654086941060242757131313184709635181001199631726283364158943337968797uwb;
/* PR c/102989 */
/* { dg-do run { target { bitint } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#if __BITINT_MAXWIDTH__ >= 65472
constexpr unsigned _BitInt(65472) a = 65874028414853418769511496113653036945710467528674240836188871502976748745763974525826911024024988631776491096261751992694895296214498585327384601121850230477827515082843619768846499801840836477230687590770231681718268338714887172330888785411211246357940293072535006266916583089772232445667160886208448607927748489013059344141951625673199213945267073377588652374198634016718719257659199541018970117033192039851653491638992986532515557336069337719046396088060414869427270972708809318734227046883806081011951941853679439848321781173016681200685359617693806920032604807641414656615976627881030905633504995608500926313100449123752592887306455273713086084720226711163858729450345307982160835189085198339193053545528326363004277216519521996803653047233696840937893926439475024000274633924716672022043462512673682343650888234611610847904449303938980580750614829479521364941526248038103556791184166137132891705498670203747450648138794675915927809475689266431674447401721770257807894864574772637777546833262526951307916013054159424871918674386303422478917660124313218179561460069927914109853781325554791226906771269776791232118969314470480394982481391738558649576936680153086613697764141243587961259345656781466911451311347049773832249980208428530724233103217369963103642890811580190014250767734527431460062555356767163656837728658921843437422091225040343040245536763579475902218857185893576553568913202523567943581185934074140454243365677691321402599868371075480132367548064644179457549106582668003278353839811901755098775042915492192962256439240717885562228560807300368546591938513564249673935563354224669505426548315283725161174366021701375396395313621732692448055488113835736519133847733806933661608336123237017767589792413707136130610229516496362268872996002408911802982404007464241164929849341909484070765678046190680486057484835560562448063002010171248868062856794398851279347048705720960974749673146662296765976038110218870942100630056574273343812309347877934257043013803766940137680754965100302990989281818211387137383832600675317434920893732120105407723736041635958085676519190305809361514850656066374765384629954359307080862256105691419898168955679806156443004466405913142123628524231555115399711321193475052976374230374739915275763990520499641653144284448959338924397090731568126860006699218100212808418951593973346259258754997140003401228249592046733643429633842927437674005630309466335475488976044970815680337796705251785679176317921969250255914644143927301143156940750728409691193837462118411451140103456466642917621794037963804154558563563784540744625286045320380647149505894465602074709712052403213672513944120580472196908870481008605753502378254869195510822476848807886998210212224568817665331382282682183443019436910934518254905570403017861343476981516822213043567878416094061997484366094926060989684786188719853361377592613245034788253106057223977996442867392634883776229675223227731721808083021736947720678172726157569358655251453763272147556197009586238264046136725977202440532459363521159216893005875943650891355683793285122481839809223042446177899018320884858378858428482004887350002248475654126695437381791039346060525159596388199191045220810622260461623488951548300045143031946225548627356322494072635246741690369797703750001744527651635248045159165227990904076792563599086736013143689002450121560791866918627656264249547156379687514841821979600884946973379386059970849524777822542279884834069088756993835503335163308439818940407550289076454404410002526269749323403673331561005855976564163112359624884449722076806747002050900060486557888988389190561491837653913417576996782073392887675547243908721620711696799096385497090726000898536841269644251102949559919330359725680095583471880505317680844666709274840966390417748140336028128180466837002340200275922083519953988906089254843320339560405442077901688830870404393361047302469466448124739846498711286663890861622125303854725244017935265801954966781478807230955537079573035800508809193696776558659380041474673947719614891591483335826961674762867599639802412473648680441069062029676465317014339608126488486239504818779896608289143566814074344128163474927248996300958043211993182818053822887583188270715520756855009877038634425539657265881288715061989818229395878573316718153726750826355803265260984266618144751818838129431927560052524725127582765549442372461635957790507428542296212660482883830778100032262628335685268361076110653003933720753658626342498598108207113591628523223931344937962257434088745568685381473222813754713557301137685188707577771735719907385875925945361215971464704808214927499603711487344132091326731184707081884630565832911532419130163514966778562434847861021362218993469451376667702490745897248165073801412613710459059823342004801266188992270518474584690584110796775040192964553128155321278735400418222301274509554699483242906248842528643927491916050334115601214082061834286251573797771471610462890207070038990113517384314874988389218929593573595769992957934439472313648608872221417538591099909547681713055197851963217806394271932283786418963737083378263837851866770792294581430370179812803807766812134735008944094254924133000181138341444754146592554240244926530488085797161607440296312032375671384766799546314294952639429116053444305204179954961737670754928180951211327209631174491438566704748775957423647631106931872353072411758039523701355399245986495256131899939578128637906193987861515696267624022768855677386145040750676905386076271594075012645017847456843861067907361603785482067517607711397078496893391404908466039763474426356995787412728936302077788321037622089836944185920214948667492076372211507958383725993147568828022520584628113743069072098077681737646616832744282683301027940111008949487559489400280166812162349769417565580841259074013682180200573711186777726659689975490119163357473183919117291539140678034476458394800768806683673132266242343880852243749183854335527770813216391997262974885810843114429314160237463276656664218915730925460828760711378046669902410716387688714853282313680765227107400697209645981183025449661912571103890490913039864188897637949556486744952841792160388971558166205393610932705442433631027753841798811000777130265365602851965515681643984169325435610742993940251263241305792519709217930230875279761194839959584662947191743403356700820347334268850390650844637405501531301921096571026263943432066459294971843089035394861220552532758517810050362565876624718715634556912646641949968260622504116224630219284301623921188277675205384056375364778072061649987278221213051902862594711798265704318920329526303415071651490215159169436665502967051371583199355417397040849618260976239182865708899876580220885148819958098892407447384776849540577596373076572931387032303318606938946805395609756474317173037851890190086080334220234266081872276699590277311605725492019621206245108261399321173649438883031907502103004618343981447073270063780499728342099870986514585907891949892308658040261024667776373424978390909682927910796351757483974443865702371792838882771005747543496062821233816175876149479890010870200215632229210706418785910292789638550348725797240661293132307251159131784402794068309831964186085953199517245335059417823074979114015927625438852575505515547130205018453380351113945679912359116614886302675918646948307265762938004110601513658895196700081824586705020282825093739598881081540708217418131914073953341509242444578622435984145983493347604029272854899321609106849286714028483886414825128479818859724734438344906945298606455406699287820316660695989544913612976004949026573679384907850688667479190435572179237006408685754560762141977321367339517301097820953022755318954649838568359278646708109095740043295665248217530811189495831329465924529060656867586984790794628582957651073768585090489278140555182834690421510195303839613545873092108913694594537183285417682903243454311391369375810654906662974651031976593576633213427096627363649424527674138186816206523669842323707281027980506733634096495865602720885328039147475167492532627097604997707385503393991456792672459352936820122822469556596945676396903590546739682393729575454493944807057345819069181271569904644175551803259147445317231361820692382321822423289376965920517760072762131028848540838123733912106843655308311750496550815033703056692798798011918005011348199727933997069164542544843124651534694478753855625309629960678863623815672915274926726965714364858257611221106385074050699918280948177141442387115797213194242870596023564029577989498938485534058029690537190534744252272824857327493965876618976643677984346169877601719298683399281042997338804443874233186946808040598508364557521255575013579815682146068863549337248303001248078807047378108920762143811221461759354620875369589065024312588898065507971561029929345527858159313129820327669633132293160565999400466976147547125003253164886640290777125287017292361727094985547014756417512102317970262384641051079277427351725574074131116107146600399234403647819323600759586671280733725982209124764267999221147483008839140602670257205078780970624480127071396543158542953522136110465710368242064084840890205082187266645629140357952494765688460918507878486426042065278647584015295279651155982623258616377485606104157632043716067693156340573589748375359059722913343059515310846221532353844339794755668848402309080774422293295651170084782844354070621520168937868316086040235069146058345289688192907685918900389066798118530800450286088002427616043549842138481236713776013883531628590595300042847329197168381891936968101967776014081901912034332263670677828204428422384434715718704595120461430375574175765702011953092786008531618841562463621545904938593447520015052398913473747165675739128227729860522837856493359404981275620405156088407724873896814306917527150300142982470028171920769744429179320431741610875850043999674743188496908160129431272106464679454201996897333414256543788368259896759637862338268498926658644196226425393282232669383401043410041622131834269331249053253163263805617292232014554953766603366944449281936436163348007550264881313734403499866885910422096847245868983837395381509905362814510495294417227071475516750438538914922504534834593033205080900795488912148742019119549014001554366911119067584994744299018308039208210417466906415185076706749205801012799329399986289204986294786437588639612782571971507723771937929701163710244163043404564826267800950589676152533594989418618014288641614520385570184240884586130870870741886347468641829857183453740491569842565622064996027914799445938815414612045489948609894048719358464589599498624644809962127765563981065415756251258118421436949142446606626464150436046745354962830933231617087191036634528282763930864590672989015325808346540917086018285482216294776630407604444017209836386813546251369184558393180862727824133618231105407565377726874201016716874747193298110226548713113055804386335542276584785327642141420979789128607575389126059449056231221655504322975168824547921598754212580284860341317067232171503075318659142194545497016145803181512026343421286297638468103352223053704896868265116206256544679438575897966426762874745106558292347134875728572127325337754733765251105470177415270966206899861267252369448068927266102835975020557437913164840102135985178231875990189340734544654744647827441286010902235438982564998068477390121580268067852517302500958493927727155669887335454802232441766876959727296032213883872141451322900261005024406412638925534447309297109774680653396839068981982303959449585919601951784676269338509798444492284027198527534729264816863223855205480827392176674198533541998652285208950844368772121015938775827868718348053651466660945842822857135950701469458166244446036560410696408598768008796242326788817178564489668276079897020785729862548025216683403145162467545641729518620497596028019199039246447845134132855463133735174323788649842018758419435906318743206053356800088370917852318294527105533345230477001222310383402828126358397712503413591645611054601866497386469412638491773728614643382590286186308330017723253240683781406419919818813502414034869402770627046602136910556735340620577006649826384200614066464173557086745764379665102794298748986565199421337796563169859800331533497258203854653725133871631985474523134061290217790871839012014060652170431386706390526266713354909666532894989712338707426377288105959729380930582675275553400044698473843175010204608057871421993855679325795511343440323540375249581001966431109313820512103729737415876492397855350709356620428053728631513279657137136751691815273101807269203767363250781488995922177169506473238033222632470640191052132325977988500916888797348877819383961059260577892204584222324373872871821748974613401628203875338762555211387910748411152327539619567997694542831475663395895555090404922654858513105597129946139446385944075046977527087443129745077809595756576233514427417022666744060487857898390789948480719931806881956529624868523931326204018924742455510988728560620886881508902552006781252685182126521983698023601752690226917489683075686040459944761124984353820735928331227975669811495025536004835557357866887952405925158206358648460053744971810759800516971341251283976744691594110219822376535068050425606180275339861939768053672977590839860433707369056754028768873245370748243872093908425321452790676005744239063004090812287994171654371534280527461204785965744686899037505526748205474829861508775633341610106216825084287086663714002411976655574453853711919148720158805545980786494280975922278491841813051023374114075744194873828536865132926198728339588170375472796201352742410432853435729363112226201941628255002535490275056766586373821459331811284350772302429368659539685224295962240105465692745743117250558134122530552966969305908586250082284865580325406190790343864287037227316258520732020059190355270848306662653818702002897039308630618431243314449931945150585878901504845973215101937953823928461721757938572553687288827606914187939448631587847341567152264836920949873736396479054462466993545281884314888041635210657865924492733477634678092762053049423724420978749565535935202527272735525538857856532535829727403758248515676377734964271319895603733369499282090619370644390912703118190967699735839422150118676090812589197956828432883454591775506142072991995255477162685456179917844477810916117758366522467183885517800565518850836567463260579936570404378905085631880126835957647088321534365595303983957495652572590640830763831479030713794949481583992861854626122255507636651728698938040296394529620734556222565311409570754214795520535003346400553934254868951469742466063081282009587365288248731116040001268793498485153779630516908276030764263795595829834765298430173859886036974114210469592900822522496578393807022364135855868617791972115817676751055814736691157277719078078363722995682352787453931398544225888615155245513172842244076107970477685087347438625378887619302413866466619117008334792748656074141300284702324314107158575021092021045201219104849568044014318163216648167167102545567590192051572811882759399171815091482243321889561619871953313830812925825376241612376634587322435846044799053536631550927269169032948586514626083989734654942487786073128339707925635994571914892483303685762083840487806131930731387849170685349079864020207179382689618594010162070659159447889344283707204286255036729730123415253795453381392363525730409662963512930464146567702953413882972452890687402324823676434623668607417451713252684608112007770743378032124178068076627655591705783142289469636449645674093183854831679943102480054334422336004642534472137802293959591564047787165742281711262045913463889166614975785367285123231848489964947168259259859651331806294100233514606935240876224388286907295795623525145565485264076203685696921301244157049222399694261123517677386771518164905737344603978252996052580868902923124475552914011730528812300179021230309867253769880851013594703320917123515967493597713163002806913617288734951731859626757112576606989339415205916570757259477367425003980820415407690284037569443414621271531087857711540292395118940327930085917648961413854880713533683379365683118321440194053278494655321531901445796224168264056771141704976004602347371222102339725674327295424584923438972729801604160881606371129484752571956550759895866459266634599318934331132992268419492312051515244634605489726581981774372625890847390663222639677778599130509229036502941438146903740421129745765409463741046041724109743995541832910890810043237637250838512421266274159269838087162966877339415320918445838084607926482487326890808603331454937071756872582541587950869617374867497291942434166388340736188426522646778126260187474459305273317048369223194305392592429269796065446394224285706245837186991386807972768134945406804843677986121363618283994623075786820519030677924524631232773053566327068836914008068880508593892814413599933512127846256450189605965007722408749599327105633360191669226811125705464166865932685139499043188417058408145619475137407704309057096253453970943431010208805958880441668536636630984528024738383726952579394912266155766194059496573034122939179354744906886317447299846294675145801761429867331920860320689436106861896387056042301081513818264319294187170363122704106526138368915635603316494940799629455580847884255301629707874127819875328740309245368068925386845081146527751898281929519183808884694732922929381859998068561552287796638630153557107517603976885737408961385726894117817772124305384275773752681561772589162896726543848118292224854735017911552771598879672195419903142467189758288893617797981332645308463000380199968291172662286342433407530992399311582382371037051384107721693674935016059465473282177680148455402959465472212928981753238596329614601855483413398833842270568295296640743598590779752989551301629995771523000231911679050279485698305095423321484021804360883790254659446161386801194534079288499545690468910577746611299797864563154863490832639144410652702292169488612519356587316152787229543906355470677554502438539602268426767473565515536424169935736875415273620834081490730213150398951736650842108450857240742774594217852879173672688751229305531115825014850231000546945150122964624749643195594303796058701805941210884086651903723484629069594503110445498020891082678423358251793036052092074949457345902128190663782180041297332240668738760754685732067836519097118357790131727679935781054122263807112935237022613351668926147398489883137771515688789600851256388568716495659230435230035583859074576720408679091908831650422755099588394054135377265310497551564802196750405263555192208913371509621178676044203357752939238134233705209988483613418357068790410292407284985250078216801955681819735640889915286539424767699291558260497936451862444377162411777198512727507682930531190062304184267580007068243872442587201835784461931300341180739516168341521559240873860541511979663086972805839349071094889623734952370289999461430319855751397225742175395567834824532612348799185498233668108399584932908791423527338415192594890797161640870428514483903241405192766090688820461474694129483396941450655378070502596902012960005925071407505634409039374591587356995126256441595045666991786542475413106212634440243252914105680546441834800933952893940680530366893360583164583102871341878638954296317852245050855362654227742890577697939811035528084823005072060163844309859018655879693761266441850506107247499887845837529072734963012358189223535309540488630641402694119285809766132525455640455074277103890569921925511571780900429074779519535887352143224202076526307608773803900609314478528807884041223459718478713147780482731067298371645459172074879456665672144659257063151846218815521853521538039105580092129093604550652176702149722267464711925176295825259195451897982973468788292910834248649486634164719847512355589622486356044931885992391641340252366296529307289311708336501951699737694422661506981734291820308445302217945166uwb;
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
_BitInt(2)
foo (_BitInt(2) x, _BitInt(15) y)
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdarg.h>
#include <stdlib.h>
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int *q, *r, *s;
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 257
void
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-O2 -std=c2x -Wno-uninitialized" } */
+/* { dg-options "-O2 -std=c23 -Wno-uninitialized" } */
#if __BITINT_MAXWIDTH__ >= 135
_BitInt(135)
/* PR c/102989 */
/* { dg-do compile { target { bitint && exceptions } } } */
-/* { dg-options "-O2 -std=gnu2x -fnon-call-exceptions -fexceptions" } */
+/* { dg-options "-O2 -std=gnu23 -fnon-call-exceptions -fexceptions" } */
__attribute__((noipa)) void
baz (int *p)
-/* Test C2x attribute syntax: rejected in C11, but warning disabled
- with -Wno-c11-c2x-compat. */
+/* Test C23 attribute syntax: rejected in C11, but warning disabled
+ with -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic -Wno-c11-c23-compat" } */
[[]];
-/* Test C11 built-in functions: test functions new in C2x are not
+/* Test C11 built-in functions: test functions new in C23 are not
declared as built-in for C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11" } */
-/* Test C2x storage class specifiers in compound literals not permitted for
+/* Test C23 storage class specifiers in compound literals not permitted for
C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test C2x storage class specifiers in compound literals not permitted for
+/* Test C23 storage class specifiers in compound literals not permitted for
C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic" } */
-/* Test C2x storage class specifiers in compound literals not permitted for
- C11, but -Wno-c11-c2x-compat disables the -pedantic diagnostic for that. */
+/* Test C23 storage class specifiers in compound literals not permitted for
+ C11, but -Wno-c11-c23-compat disables the -pedantic diagnostic for that. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c23-compat" } */
int *ps = &(static int) { 1 };
int ss = sizeof (static int) { 1 };
-/* Test C2x digit separators not in C11. */
+/* Test C23 digit separators not in C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* Test C11 does not support empty initializers. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
struct s { int a; };
struct s s = {}; /* { dg-warning "empty initializer" } */
-/* Test C2x enumerations with values not representable in int are diagnosed for
+/* Test C23 enumerations with values not representable in int are diagnosed for
C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test C2x enumerations with values not representable in int are diagnosed for
+/* Test C23 enumerations with values not representable in int are diagnosed for
C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic" } */
-/* Test C2x enumerations with values not representable in int are not diagnosed
- for C11 with -pedantic-errors -Wno-c11-c2x-compat. */
+/* Test C23 enumerations with values not representable in int are not diagnosed
+ for C11 with -pedantic-errors -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c23-compat" } */
enum e1 { e1a = -__LONG_LONG_MAX__ - 1 };
-/* Test C2x enumerations with fixed underlying type are diagnosed for C11. */
+/* Test C23 enumerations with fixed underlying type are diagnosed for C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test C2x enumerations with fixed underlying type are diagnosed for C11. */
+/* Test C23 enumerations with fixed underlying type are diagnosed for C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic" } */
-/* Test C2x enumerations with fixed underlying type are not diagnosed for C11
- with -pedantic-errors -Wno-c11-c2x-compat. */
+/* Test C23 enumerations with fixed underlying type are not diagnosed for C11
+ with -pedantic-errors -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c23-compat" } */
enum e1 : int;
enum e2 : short { A };
/* { dg-do compile } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
/* { dg-add-options float32 } */
/* { dg-add-options float64 } */
/* { dg-add-options float32x } */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
/* { dg-add-options float128 } */
/* { dg-require-effective-target float128 } */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
/* { dg-add-options float16 } */
/* { dg-require-effective-target float16 } */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
/* { dg-add-options float64x } */
/* { dg-require-effective-target float64x } */
/* Test restrictions on the kind of declarations permitted in for loops removed
- in C2X, and thus with -std=c11 -pedantic -Wno-c11-c2x-compat. */
+ in C23, and thus with -std=c11 -pedantic -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic -Wno-c11-c23-compat" } */
#include "c99-fordecl-2.c"
/* Test restrictions on the kind of declarations permitted in for loops removed
- in C2X, and thus with -std=c11 -pedantic -Wno-c11-c2x-compat. */
+ in C23, and thus with -std=c11 -pedantic -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic -Wno-c11-c23-compat" } */
#include "c99-fordecl-3.c"
-/* Test new C2x keywords not keywords in C11. */
+/* Test new C23 keywords not keywords in C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test old-style function definitions not in C2x: allowed in C11. */
+/* Test old-style function definitions not in C23: allowed in C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test old-style function definitions not in C2x: () does not give
+/* Test old-style function definitions not in C23: () does not give
type with a prototype for older standards. */
/* { dg-do compile } */
/* { dg-options "-std=c11" } */
-/* Test omitted parameter names not in C11: -pedantic -Wno-c11-c2x-compat. */
+/* Test omitted parameter names not in C11: -pedantic -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic -Wno-c11-c23-compat" } */
void f (int) { }
-/* Test that qualifiers are lost in tertiary operator for pointers to arrays before C2X, PR98397 */
+/* Test that qualifiers are lost in tertiary operator for pointers to arrays before C23, PR98397 */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors -Wno-discarded-array-qualifiers" } */
/* Test C11 static assertions. Omitting the string not supported, but
- -Wno-c11-c2x-compat disables the -pedantic diagnostic for that. */
+ -Wno-c11-c23-compat disables the -pedantic diagnostic for that. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic -Wno-c11-c23-compat" } */
_Static_assert (1);
/* Test variadic functions with no named parameters not supported in C11, but
- diagnostic disabled with -Wno-c11-c2x-compat. */
+ diagnostic disabled with -Wno-c11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c2x-compat" } */
+/* { dg-options "-std=c11 -pedantic-errors -Wno-c11-c23-compat" } */
int f (...);
int g (int (...));
-/* Test compatibility of unprototyped and prototyped function types (C2x made
+/* Test compatibility of unprototyped and prototyped function types (C23 made
the case of types affected by default argument promotions compatible, before
removing unprototyped functions completely). Test affected usages are not
accepted for C11. */
-/* Test compatibility of unprototyped and prototyped function types (C2x made
+/* Test compatibility of unprototyped and prototyped function types (C23 made
the case of types affected by default argument promotions compatible, before
- removing unprototyped functions completely). Test always-invalid-in-C2x
+ removing unprototyped functions completely). Test always-invalid-in-C23
usages, in C11 mode. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test C2x UTF-8 characters. Test not accepted for C11. */
+/* Test C23 UTF-8 characters. Test not accepted for C11. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic-errors" } */
-/* Test that we don't predefine `nullptr' pre-C2X. */
+/* Test that we don't predefine `nullptr' pre-C23. */
/* { dg-do compile } */
/* { dg-options "-std=c17 -pedantic-errors" } */
-/* Test C2x alignment support. Test valid code. */
+/* Test C23 alignment support. Test valid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stddef.h>
-/* Test C2x alignof returning minimum alignment for a type. */
+/* Test C23 alignof returning minimum alignment for a type. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define _Alignas alignas
#define _Alignof alignof
-/* Test C2x deprecated attribute: valid uses. */
+/* Test C23 deprecated attribute: valid uses. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Similar to tests from gnu2x-attrs-1.c, but using the standard
attribute instead of gnu::deprecated, and sometimes using
-/* Test C2x deprecated attribute: invalid contexts. */
+/* Test C23 deprecated attribute: invalid contexts. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* This attribute is not valid in most cases on types other than their
definitions, or on labels, or on statements, or as an
-/* Test C2x deprecated attribute: invalid syntax. */
+/* Test C23 deprecated attribute: invalid syntax. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[deprecated()]] int a; /* { dg-error "parentheses must be omitted if attribute argument list is empty" } */
-/* Test C2x deprecated attribute: duplicates (allowed after N2557). */
+/* Test C23 deprecated attribute: duplicates (allowed after N2557). */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[deprecated, __deprecated__]] int a;
[[__deprecated__, deprecated("message")]] int b;
-/* Test C2x attribute syntax. Valid use of fallthrough attribute. */
+/* Test C23 attribute syntax. Valid use of fallthrough attribute. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wextra" } */
int
f (int a, int c)
-/* Test C2x attribute syntax. Invalid use of fallthrough attribute. */
+/* Test C23 attribute syntax. Invalid use of fallthrough attribute. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wextra" } */
[[fallthrough]]; /* { dg-error "'fallthrough' attribute at top level" } */
-/* Test C2x attribute syntax. Invalid use of fallthrough attribute
+/* Test C23 attribute syntax. Invalid use of fallthrough attribute
outside switch. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wextra" } */
int
f (int a)
-/* Test C2x fallthrough attribute: duplicates (allowed after N2557). */
+/* Test C23 fallthrough attribute: duplicates (allowed after N2557). */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int
f (int a)
-/* Test C2x fallthrough attribute: mixtures with other attributes. */
+/* Test C23 fallthrough attribute: mixtures with other attributes. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Use of other standard attributes together with "fallthrough" goes
through a different path to diagnosing ignored attributes from that
-/* Test C2x attribute syntax. Invalid use of fallthrough attribute in
+/* Test C23 attribute syntax. Invalid use of fallthrough attribute in
bad context inside switch. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wextra" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wextra" } */
int
f (int a)
-/* Test C2x maybe_unused attribute: valid uses. */
+/* Test C23 maybe_unused attribute: valid uses. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wall -Wextra -Wunused" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra -Wunused" } */
[[maybe_unused]] static void f1 (void) {}
-/* Test C2x maybe_unused attribute: invalid contexts. */
+/* Test C23 maybe_unused attribute: invalid contexts. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* This attribute is not valid in most cases on types other than their
definitions, or on statements, or as an attribute-declaration. */
-/* Test C2x maybe_unused attribute: invalid syntax. */
+/* Test C23 maybe_unused attribute: invalid syntax. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[maybe_unused()]] int a; /* { dg-error "does not take any arguments" } */
-/* Test C2x maybe_unused attribute: duplicates (allowed after N2557). */
+/* Test C23 maybe_unused attribute: duplicates (allowed after N2557). */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[maybe_unused, __maybe_unused__]] int a;
[[__maybe_unused__, maybe_unused]] int b;
-/* Test C2x deprecated attribute: valid uses. */
+/* Test C23 deprecated attribute: valid uses. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[nodiscard]] int c1 (void); /* { dg-message "declared here" } */
[[__nodiscard__ ("some reason")]] int c2 (void); /* { dg-message "declared here" } */
-/* Test C2x nodiscard attribute: invalid contexts. */
+/* Test C23 nodiscard attribute: invalid contexts. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* This attribute is not valid on types other than their definitions,
or on declarations other than function declarations, or on
-/* Test C2x nodiscard attribute: invalid syntax. */
+/* Test C23 nodiscard attribute: invalid syntax. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[nodiscard()]] int a (void); /* { dg-error "parentheses must be omitted if attribute argument list is empty" } */
-/* Test C2x nodiscard attribute: duplicates (allowed after N2557). */
+/* Test C23 nodiscard attribute: duplicates (allowed after N2557). */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[nodiscard, __nodiscard__]] int f (void);
[[__nodiscard__, nodiscard("message")]] int g (void);
-/* Test C2x noreturn attribute: valid uses. */
+/* Test C23 noreturn attribute: valid uses. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[noreturn]] void exit (int);
-/* Test C2x noreturn attribute: invalid contexts. */
+/* Test C23 noreturn attribute: invalid contexts. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[noreturn]]; /* { dg-error "ignored" } */
-/* Test C2x noreturn attribute: invalid syntax. */
+/* Test C23 noreturn attribute: invalid syntax. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[noreturn()]] void a(); /* { dg-error "does not take any arguments" } */
-/* Test C2x attribute syntax. Basic tests of valid uses of empty
+/* Test C23 attribute syntax. Basic tests of valid uses of empty
attributes. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[ [ ] ] [[]];
-/* Test C2x attribute syntax. Test ignored attributes diagnosed. */
+/* Test C23 attribute syntax. Test ignored attributes diagnosed. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* A GNU attribute that is valid in some contexts, but should be
diagnosed in contexts where all attributes are ignored (attribute
-/* Test C2x attribute syntax. Invalid uses of attributes. */
+/* Test C23 attribute syntax. Invalid uses of attributes. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Prefix attributes not allowed on declarations without declarators. */
-/* Test C23 attribute syntax: diagnosed with -Wc11-c2x-compat. */
+/* Test C23 attribute syntax: diagnosed with -Wc11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
[[]]; /* { dg-warning "attributes before C23" } */
-/* Test C2x attribute syntax. Test unknown standard attributes
+/* Test C23 attribute syntax. Test unknown standard attributes
diagnosed with a pedwarn. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
[[unknown_attribute]]; /* { dg-error "attribute ignored" } */
/* Test C23 attribute syntax: use of __extension__ in C11 mode. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
#define FOO ::
#define BAR :
-/* Test C2x auto. Valid code, compilation tests. */
+/* Test C23 auto. Valid code, compilation tests. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
auto i = 1;
extern int i;
-/* Test C2x auto. Valid code, execution tests. Based on auto-type-1.c. */
+/* Test C23 auto. Valid code, execution tests. Based on auto-type-1.c. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-require-effective-target alloca } */
extern void abort (void);
-/* Test C2x auto. Invalid code. */
+/* Test C23 auto. Invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
auto; /* { dg-error "empty declaration" } */
auto *p = (int *) 0; /* { dg-error "plain identifier" } */
-/* Test C2x auto. -Wc11-c2x-compat warning. */
+/* Test C23 auto. -Wc11-c23-compat warning. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
auto x = 2; /* { dg-warning "ISO C does not support 'auto' type deduction before" } */
-/* Test C2x binary constants. Valid syntax and types. */
+/* Test C23 binary constants. Valid syntax and types. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include "binary-constants-1.c"
/* Test that binary constants are accepted in C23 mode: compat warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
int a = 0b1; /* { dg-warning "C23 feature" } */
#if 0b101 /* { dg-warning "C23 feature" } */
-/* Test C2x binary constants. Invalid constants. */
+/* Test C23 binary constants. Invalid constants. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int a = 0b; /* { dg-error "invalid suffix" } */
int b = 0B2; /* { dg-error "invalid suffix" } */
-/* Test macro expansions in <stdbool.h> in C2x. */
+/* Test macro expansions in <stdbool.h> in C23. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdbool.h>
-/* Test bool, true and false keywords in C2x. */
+/* Test bool, true and false keywords in C23. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
extern void abort (void);
extern void exit (int);
-/* Test limits for _Bool in <limits.h> in C2x. */
+/* Test limits for _Bool in <limits.h> in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <limits.h>
-/* Test C2x built-in functions: test functions new in C2x are indeed
+/* Test C23 built-in functions: test functions new in C23 are indeed
declared as built-in as expected. Non-DFP tests. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
int exp10 (void); /* { dg-warning "conflicting types for built-in function" } */
int exp10f (void); /* { dg-warning "conflicting types for built-in function" } */
-/* Test storage duration of compound literals in parameter lists for C2x. */
+/* Test storage duration of compound literals in parameter lists for C23. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
extern void abort (void);
extern void exit (int);
-/* Test C2x storage class specifiers in compound literals. */
+/* Test C23 storage class specifiers in compound literals. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stddef.h>
-/* Test C2x storage class specifiers in compound literals. Thread-local
+/* Test C23 storage class specifiers in compound literals. Thread-local
cases, compilation tests. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-require-effective-target tls } */
#include <stddef.h>
-/* Test C2x storage class specifiers in compound literals. Thread-local
+/* Test C23 storage class specifiers in compound literals. Thread-local
cases, execution tests. */
/* { dg-do run } */
-/* { dg-options "-pthread -std=gnu2x -pedantic-errors" } */
+/* { dg-options "-pthread -std=gnu23 -pedantic-errors" } */
/* { dg-require-effective-target pthread_h } */
/* { dg-require-effective-target pthread } */
/* { dg-require-effective-target tls_runtime } */
-/* Test C2x storage class specifiers in compound literals: invalid code. */
+/* Test C23 storage class specifiers in compound literals: invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int *p = &(register int) { 0 }; /* { dg-error "file-scope compound literal specifies" } */
void
h ()
{
- /* The following cases are not part of the C2x syntax, but are detected
+ /* The following cases are not part of the C23 syntax, but are detected
specially by the parser. */
(static int) 0; /* { dg-error "storage class specifier in cast" } */
sizeof (static int); /* { dg-error "storage class specifier in" } */
-/* Test C2x storage class specifiers in compound literals diagnosed with
- -Wc11-c2x-compat. */
+/* Test C23 storage class specifiers in compound literals diagnosed with
+ -Wc11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
int *ps = &(static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
int ss = sizeof (static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
-/* Test C2x storage class specifiers in compound literals diagnosed with
- -Wc11-c2x-compat, but not errors with -pedantic-errors. */
+/* Test C23 storage class specifiers in compound literals diagnosed with
+ -Wc11-c23-compat, but not errors with -pedantic-errors. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat -pedantic-errors" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat -pedantic-errors" } */
int *ps = &(static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
int ss = sizeof (static int) { 1 }; /* { dg-warning "forbids storage class specifiers in compound literals" } */
-/* Test C2x storage class specifiers in compound literals: inline function
+/* Test C23 storage class specifiers in compound literals: inline function
constraints. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
inline void
f1 ()
/* Test errors for bad string literal concatenation. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void *pLU = L"" U""; /* { dg-error "non-standard concatenation" } */
void *pL_U = L"" "" U""; /* { dg-error "non-standard concatenation" } */
-/* Test C2x constexpr. Valid code, compilation tests. */
+/* Test C23 constexpr. Valid code, compilation tests. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
-/* Test C2x constexpr. Valid code, execution test. */
+/* Test C23 constexpr. Valid code, execution test. */
/* { dg-do link } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-additional-sources "c2x-constexpr-2b.c" } */
extern void abort (void);
-/* Test C2x constexpr. Second file for link test. */
+/* Test C23 constexpr. Second file for link test. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* constexpr objects at file scope have internal linkage. */
constexpr int a = 3;
-/* Test C2x constexpr. Invalid code. */
+/* Test C23 constexpr. Invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
extern constexpr int v0 = 0; /* { dg-error "'constexpr' used with 'extern'" } */
/* { dg-warning "initialized and declared 'extern'" "initialized extern" { target *-*-* } .-1 } */
-/* Test C2x constexpr. Valid code, compilation tests, signed char. */
+/* Test C23 constexpr. Valid code, compilation tests, signed char. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -fsigned-char" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsigned-char" } */
constexpr char v1[] = "\x00\xff";
constexpr signed char v2[] = "\x7f\x80";
-/* Test C2x constexpr. Valid code, compilation tests, unsigned char. */
+/* Test C23 constexpr. Valid code, compilation tests, unsigned char. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -funsigned-char" } */
+/* { dg-options "-std=c23 -pedantic-errors -funsigned-char" } */
constexpr char v1[] = "\x00\xff";
constexpr signed char v2[] = "\x7f\x00";
-/* Test C2x constexpr. Invalid code, compilation tests, signed char. */
+/* Test C23 constexpr. Invalid code, compilation tests, signed char. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -fsigned-char" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsigned-char" } */
constexpr unsigned char v3[] = "\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
constexpr char v4[] = u8"\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
-/* Test C2x constexpr. Invalid code, compilation tests, unsigned char. */
+/* Test C23 constexpr. Invalid code, compilation tests, unsigned char. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -funsigned-char" } */
+/* { dg-options "-std=c23 -pedantic-errors -funsigned-char" } */
constexpr signed char v2[] = "\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
constexpr signed char v5[] = u8"\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
-/* Test C2x constexpr. Valid code, compilation tests, IEEE arithmetic. */
+/* Test C23 constexpr. Valid code, compilation tests, IEEE arithmetic. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target inff } */
-/* Test C2x constexpr. Invalid code, compilation tests, IEEE arithmetic. */
+/* Test C23 constexpr. Invalid code, compilation tests, IEEE arithmetic. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target inff } */
-/* Test C2x digit separators. Valid usages. */
+/* Test C23 digit separators. Valid usages. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
_Static_assert (123'45'6 == 123456);
_Static_assert (0'123 == 0123);
-/* Test C2x digit separators. Invalid usages. */
+/* Test C23 digit separators. Invalid usages. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void
tf (void)
-/* Test C2x digit separators. Test token pasting avoided for preprocessed
+/* Test C23 digit separators. Test token pasting avoided for preprocessed
output. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -save-temps" } */
+/* { dg-options "-std=c23 -save-temps" } */
#define ZERO 0
-/* Test C2X support for empty initializers: valid use cases. */
+/* Test C23 support for empty initializers: valid use cases. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
extern void exit (int);
extern void abort (void);
-/* Test C2X support for empty initializers: invalid use cases. */
+/* Test C23 support for empty initializers: invalid use cases. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Empty initialization is invalid for arrays of unknown size. This is
diagnosed via the diagnostic for zero-size arrays. */
-/* Test empty initializers diagnosed in C2X mode with -Wc11-c2x-compat. */
+/* Test empty initializers diagnosed in C23 mode with -Wc11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
struct s { int a; };
struct s s = {}; /* { dg-warning "empty initializer" } */
-/* Test C2x enumerations with values not representable in int. */
+/* Test C23 enumerations with values not representable in int. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Check a type while defining an enum (via a diagnostic for incompatible
pointer types if the wrong type was chosen). */
-/* Test C2x enumerations with values not representable in int. Test values
+/* Test C23 enumerations with values not representable in int. Test values
outside the range of standard or extended integer types are diagnosed, even
when they can be represented in __int128. */
/* { dg-do compile { target int128 } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
enum e1 { e1a = __LONG_LONG_MAX__, e1b }; /* { dg-error "enumerator value outside the range" } */
-/* Test C2x enumerations with values not representable in int. Test values
+/* Test C23 enumerations with values not representable in int. Test values
outside the range of standard or extended integer types are diagnosed,
when __int128 is unsupported. */
/* { dg-do compile { target { ! int128 } } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
enum e1 { e1a = __LONG_LONG_MAX__, e1b }; /* { dg-error "overflow in enumeration values" } */
-/* Test C2x enumerations with values not representable in int. Test overflow
+/* Test C23 enumerations with values not representable in int. Test overflow
of __int128 is diagnosed. */
/* { dg-do compile { target { int128 } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
enum e1 { e1a = (__int128) (((unsigned __int128) -1) >> 1), e1b }; /* { dg-error "overflow in enumeration values" } */
-/* Test C2x enumerations with values not representable in int. Test
- -Wc11-c2x-compat warnings. */
+/* Test C23 enumerations with values not representable in int. Test
+ -Wc11-c23-compat warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
enum e1 { e1a = -__LONG_LONG_MAX__ - 1 }; /* { dg-warning "ISO C restricts enumerator values" } */
-/* Test C2x enumerations with fixed underlying type. Valid code. */
+/* Test C23 enumerations with fixed underlying type. Valid code. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Check a type while defining an enum (via a diagnostic for incompatible
pointer types if the wrong type was chosen). */
-/* Test C2x enumerations with fixed underlying type. Invalid code. */
+/* Test C23 enumerations with fixed underlying type. Invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* An enum type specifier may only be used when the enum is defined, or in a
declaration of the form "enum name enum-type-specifier;". */
-/* Test C2x enumerations with fixed underlying type. Test -Wc11-c2x-compat
+/* Test C23 enumerations with fixed underlying type. Test -Wc11-c23-compat
warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
enum e1 : int; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */
enum e2 : short { E2 }; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */
/* Test *_NORM_MAX macros. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
/* Test *_IS_IEC_60559 macros. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
/* Test INFINITY macro. Test when infinities not supported. */
/* { dg-do compile { target { ! inff } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
-/* Test C2x definition of LDBL_EPSILON. */
+/* Test C23 definition of LDBL_EPSILON. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
-/* Test __STDC_VERSION_FLOAT_H__ in C2x. */
+/* Test __STDC_VERSION_FLOAT_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
/* Test INFINITY macro. Generic test. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -w" } */
+/* { dg-options "-std=c23 -w" } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target inff } */
/* Test INFINITY macro. Test when infinities supported. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target inff } */
/* Test NAN macro. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options ieee } */
#include <float.h>
not signaling. */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* Test SNAN macros. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors -fsignaling-nans" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsignaling-nans" } */
/* { dg-add-options ieee } */
#include <float.h>
signaling. */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x -pedantic-errors -fsignaling-nans" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsignaling-nans" } */
/* { dg-add-options ieee } */
#include <fenv.h>
signaling. */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions_double } */
-/* { dg-options "-std=c2x -pedantic-errors -fsignaling-nans" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsignaling-nans" } */
/* { dg-add-options ieee } */
#include <fenv.h>
signaling. */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions_long_double } */
-/* { dg-options "-std=c2x -pedantic-errors -fsignaling-nans" } */
+/* { dg-options "-std=c23 -pedantic-errors -fsignaling-nans" } */
/* { dg-add-options ieee } */
#include <fenv.h>
/* Test including <math.h> then <float.h> does not result in errors
from duplicate NAN and INFINITY macros. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <math.h>
#include <float.h>
/* Test including <float.h> then <math.h> does not result in errors
from duplicate NAN and INFINITY macros. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <float.h>
#include <math.h>
/* Test DFP macros not defined in <float.h> if no DFP support. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
/* Test DFP macros not defined in <float.h> if no DFP support. Test
with feature test macros defined. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#define __STDC_WANT_DEC_FP__
#define __STDC_WANT_IEC_60559_DFP_EXT__
/* Test DFP macros not defined in <float.h> if no DFP support.
Infinity and NaN macros. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
Infinity and NaN macros. Test with feature test macros
defined. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#define __STDC_WANT_DEC_FP__
#define __STDC_WANT_IEC_60559_DFP_EXT__
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options float32 } */
/* { dg-add-options float64 } */
/* { dg-add-options float32x } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options float128 } */
/* { dg-require-effective-target float128 } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options float16 } */
/* { dg-require-effective-target float16 } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-add-options float64x } */
/* { dg-require-effective-target float64x } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
/* { dg-add-options float32 } */
/* { dg-add-options float64 } */
/* { dg-add-options float32x } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
/* { dg-add-options float128 } */
/* { dg-require-effective-target float128 } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
/* { dg-add-options float16 } */
/* { dg-require-effective-target float16 } */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
/* { dg-add-options float64x } */
/* { dg-require-effective-target float64x } */
/* Test restrictions on the kind of declarations permitted in for loops removed
- in C2X. */
+ in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include "c99-fordecl-2.c"
/* Test restrictions on the kind of declarations permitted in for loops removed
- in C2X. */
+ in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include "c99-fordecl-3.c"
/* Test for C99 declarations in for loops. Test constraints are diagnosed with
- -Wc11-c2x-compat for C2X. Based on c99-fordecl-2.c. */
+ -Wc11-c23-compat for C23. Based on c99-fordecl-2.c. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
void
foo (void)
/* Test for C99 declarations in for loops. Test constraints are diagnosed with
- -Wc11-c2x-compat for C2X: struct and union tags can't be declared there
+ -Wc11-c23-compat for C23: struct and union tags can't be declared there
(affirmed in response to DR#277). Based on c99-fordecl-3.c. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
void
foo (void)
/* Test __has_c_attribute. Test basic properties. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#ifdef __has_c_attribute
/* OK. */
/* Test __has_c_attribute. Test supported attributes. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#if __has_c_attribute ( nodiscard ) != 202311L
#error "bad result for nodiscard"
/* Test __has_c_attribute. Test GNU attributes. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#if __has_c_attribute (gnu::packed) != 1
#error "bad result for gnu::packed"
/* Test __has_c_attribute. Test syntax errors. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#if __has_c_attribute /* { dg-error "missing '\\('" } */
#endif
/* Tests for labels before declarations and at ends of compound statements. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int f(int x)
{
/* Tests for labels before declarations and at ends of compound statements. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
int f(int x)
{
/* Tests for labels before declarations and at ends of compound statements
* in combination with attributes. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wall" } */
+/* { dg-options "-std=c23 -Wall" } */
int f(void)
{
-/* Test __STDC_VERSION_LIMITS_H__ in C2x. */
+/* Test __STDC_VERSION_LIMITS_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <limits.h>
/* Test DFP types and constants rejected if no DFP support. Bug
91985. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
_Decimal32 d32a; /* { dg-error "not supported" } */
_Decimal64 d64a; /* { dg-error "not supported" } */
/* Test valid usage of C23 nullptr. */
/* { dg-do run } */
// { dg-require-effective-target thread_fence }
-/* { dg-options "-std=c2x -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */
#include <stdarg.h>
(void) (_Generic(0, int : nullptr) != p);
/* "(nullptr_t)nullptr" has type nullptr_t but isn't an NPC; these
- comparisons are valid after C2X CD comments GB-071 and FR-073 were
+ comparisons are valid after C23 CD comments GB-071 and FR-073 were
resolved by the wording in N3077. */
(void) ((nullptr_t)nullptr == p);
(void) ((nullptr_t)nullptr != p);
/* Test nullptr_t from <stddef.h>. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stddef.h>
/* Test wrong usage of C23 nullptr. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra -Wno-unused-variable" } */
typedef __typeof__(nullptr) nullptr_t;
-/* Test that -Wc11-c2x-compat issues a warning (not a pedwarn) about
+/* Test that -Wc11-c23-compat issues a warning (not a pedwarn) about
`nullptr' in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
int *
fn (int *p)
/* Test that we don't lose side-effects when converting from nullptr_t. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int i;
nullptr_t fn () { ++i; return nullptr; }
/* PR c/108424 */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
struct S {
int i;
-/* Test old-style function definitions not in C2x: warnings. */
+/* Test old-style function definitions not in C23: warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void
f (x) /* { dg-warning "old-style function definition" } */
-/* Test old-style function definitions not in C2x: errors. */
+/* Test old-style function definitions not in C23: errors. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void
f (x) /* { dg-error "old-style function definition" } */
-/* Test old-style function definitions not in C2x: warnings disabled
+/* Test old-style function definitions not in C23: warnings disabled
by -Wno-old-style-definition. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wno-old-style-definition" } */
+/* { dg-options "-std=c23 -Wno-old-style-definition" } */
void
f (x)
-/* Test old-style function definitions not in C2x: () gives type with
+/* Test old-style function definitions not in C23: () gives type with
a prototype. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void
f ()
-/* Test old-style function definitions not in C2x: () does not warn
+/* Test old-style function definitions not in C23: () does not warn
with -Wold-style-definition. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wold-style-definition" } */
+/* { dg-options "-std=c23 -Wold-style-definition" } */
void
f ()
-/* Test old-style function definitions not in C2x: () gives a type with
+/* Test old-style function definitions not in C23: () gives a type with
a prototype for all declarations. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void f1 (); /* { dg-message "declared here" } */
-/* Test omitted parameter names in C2x. */
+/* Test omitted parameter names in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void f (int) { }
-/* Test omitted parameter names in C2x. Warning test: there should be
+/* Test omitted parameter names in C23. Warning test: there should be
no warning for an unnamed parameter being unused. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wall -Wextra" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wall -Wextra" } */
int
f (int a, int, int c, int d) /* { dg-warning "unused parameter 'd'" } */
-/* Test omitted parameter names in C2x. Execution test. */
+/* Test omitted parameter names in C23. Execution test. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
extern void abort (void);
extern void exit (int);
-/* Test omitted parameter names in C2x: diagnosed with -Wc11-c2x-compat. */
+/* Test omitted parameter names in C23: diagnosed with -Wc11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
void f (int) { } /* { dg-warning "omitting parameter names" } */
-/* Tests related to qualifiers and pointers to arrays in C2X, PR98397 */
+/* Tests related to qualifiers and pointers to arrays in C23, PR98397 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
-/* test that qualifiers are preserved in tertiary operator for pointers to arrays in C2X */
+/* test that qualifiers are preserved in tertiary operator for pointers to arrays in C23 */
void f(void)
{
/* Tests related to qualifiers and pointers to arrays in C23, PR98397 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
/* test that qualifiers are preserved in tertiary operator for pointers to arrays in C23 */
/* Tests related to qualifiers and pointers to arrays in C23, PR98397 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat -pedantic-errors" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat -pedantic-errors" } */
/* test that qualifiers are preserved in tertiary operator for pointers to arrays in C23 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void tvoid(void* x);
void transpose0(double* out, const double* in) { }
void transpose1(double out[2][2], const double in[2][2]) { }
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void tvoid(void* x);
void transpose0(double* out, const double* in) { }
void transpose1(double out[2][2], const double in[2][2]) { }
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat -pedantic-errors" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat -pedantic-errors" } */
void tvoid(void* x);
void transpose0(double* out, const double* in) { }
void transpose1(double out[2][2], const double in[2][2]) { }
-/* Tests related to qualifiers and pointers to arrays in C2X, PR98397 */
+/* Tests related to qualifiers and pointers to arrays in C23, PR98397 */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
-/* test that _Atomic qualifier is not preserved in tertiary operator for pointers to arrays in C2X */
+/* test that _Atomic qualifier is not preserved in tertiary operator for pointers to arrays in C23 */
void f(void)
{
-/* Test C2x static assertions. Omitting the string supported. */
+/* Test C23 static assertions. Omitting the string supported. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic" } */
+/* { dg-options "-std=c23 -pedantic" } */
_Static_assert (1);
-/* Test C2x static assertions. Omitting the string supported. Failed
+/* Test C23 static assertions. Omitting the string supported. Failed
assertions. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic" } */
+/* { dg-options "-std=c23 -pedantic" } */
_Static_assert (0); /* { dg-error "static assertion failed" } */
-/* Test C2x static assertions. static_assert keyword. */
+/* Test C23 static assertions. static_assert keyword. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic" } */
+/* { dg-options "-std=c23 -pedantic" } */
static_assert (1);
static_assert (1, "message");
-/* Test C2x static assertions. static_assert keyword. Failed assertions. */
+/* Test C23 static assertions. static_assert keyword. Failed assertions. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic" } */
+/* { dg-options "-std=c23 -pedantic" } */
static_assert (0); /* { dg-error "static assertion failed" } */
static_assert (0, "message"); /* { dg-error "message" } */
-/* Test C2x variadic functions with no named parameters. Compilation tests,
+/* Test C23 variadic functions with no named parameters. Compilation tests,
valid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int f (...);
int g (int (...));
-/* Test C2x variadic functions with no named parameters. Compilation tests,
+/* Test C23 variadic functions with no named parameters. Compilation tests,
valid code, verify not considered unprototyped functions. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wstrict-prototypes -Wold-style-definition" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wstrict-prototypes -Wold-style-definition" } */
int f (...);
int g (int (...));
-/* Test C2x variadic functions with no named parameters. Compilation tests,
+/* Test C23 variadic functions with no named parameters. Compilation tests,
invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int f (...); /* { dg-message "previous declaration" } */
int f (); /* { dg-error "conflicting types" } */
-/* Test C2x variadic functions with no named parameters, or last named
+/* Test C23 variadic functions with no named parameters, or last named
parameter with a declaration not allowed in C17. Execution tests. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdarg.h>
-/* Test __STDC_VERSION_STDARG_H__ in C2x. */
+/* Test __STDC_VERSION_STDARG_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdarg.h>
-/* Test __STDC_VERSION_STDATOMIC_H__ in C2x. */
+/* Test __STDC_VERSION_STDATOMIC_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdatomic.h>
-/* Test __STDC_VERSION_STDDEF_H__ in C2x. */
+/* Test __STDC_VERSION_STDDEF_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stddef.h>
-/* Test __STDC_VERSION_STDINT_H__ in C2x. */
+/* Test __STDC_VERSION_STDINT_H__ in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors -ffreestanding" } */
+/* { dg-options "-std=c23 -pedantic-errors -ffreestanding" } */
#include <stdint.h>
-/* Test C2x thread_local keyword. */
+/* Test C23 thread_local keyword. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
thread_local int a;
thread_local void f (void); /* { dg-error "storage class" } */
/* Test that thread-local declarations are not considered tentative definitions
- in C2x. */
+ in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
thread_local int a; /* { dg-message "previous" } */
thread_local int a; /* { dg-error "redefinition" } */
-/* Test C2x typeof and typeof_unqual. Valid code. */
+/* Test C23 typeof and typeof_unqual. Valid code. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int i;
extern typeof (i) i;
-/* Test C2x typeof and typeof_unqual. Invalid code. */
+/* Test C23 typeof and typeof_unqual. Invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
struct s { int i : 2; } x;
union u { unsigned int j : 1; } y;
-/* Test C2x typeof and typeof_unqual. -fno-asm has no effect on keywords in
- C2x mode. */
+/* Test C23 typeof and typeof_unqual. -fno-asm has no effect on keywords in
+ C23 mode. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -fno-asm" } */
+/* { dg-options "-std=c23 -pedantic-errors -fno-asm" } */
int i;
extern typeof (i) i;
/* Test compatibility of prototyped function types with and without arguments
- (C2x made the case of types affected by default argument promotions
+ (C23 made the case of types affected by default argument promotions
compatible, before removing unprototyped functions completely). Test
- affected usages are not accepted for C2x. */
+ affected usages are not accepted for C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void f1 (); /* { dg-message "previous declaration" } */
void f1 (float); /* { dg-error "conflicting types" } */
/* Test compatibility of prototyped function types without arguments and with
- variable arguments (C2x made the case of types affected by default argument
+ variable arguments (C23 made the case of types affected by default argument
promotions compatible, before removing unprototyped functions completely).
- Test always-invalid-in-C2x usages, in C2X mode. */
+ Test always-invalid-in-C23 usages, in C23 mode. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void f1 (); /* { dg-message "previous declaration" } */
void f1 (int, ...); /* { dg-error "conflicting types" } */
-/* Test that declaring a function with () is the same as (void) in C2X. Valid
+/* Test that declaring a function with () is the same as (void) in C23. Valid
use cases. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -Wstrict-prototypes" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wstrict-prototypes" } */
void f1 ();
void f1 (void);
-/* Test that declaring a function with () is the same as (void) in C2X.
+/* Test that declaring a function with () is the same as (void) in C23.
Invalid use cases. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
void f1 (); /* { dg-message "previous declaration" } */
void f1 (int); /* { dg-error "conflicting types" } */
-/* Test unreachable in <stddef.h> for C2x. */
+/* Test unreachable in <stddef.h> for C23. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors -O2" } */
+/* { dg-options "-std=c23 -pedantic-errors -O2" } */
#include <stddef.h>
-/* Test C2x UTF-8 characters. Test valid usages. */
+/* Test C23 UTF-8 characters. Test valid usages. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
unsigned char a = u8'a';
_Static_assert (u8'a' == 97);
-/* Test C2x UTF-8 characters. Character values not affected by
+/* Test C23 UTF-8 characters. Character values not affected by
different execution character set. */
/* { dg-do compile } */
/* { dg-require-iconv "IBM1047" } */
-/* { dg-options "-std=c2x -pedantic-errors -fexec-charset=IBM1047" } */
+/* { dg-options "-std=c23 -pedantic-errors -fexec-charset=IBM1047" } */
_Static_assert (u8'a' == 97);
_Static_assert (u8'a' != (unsigned char) 'a');
-/* Test C2x UTF-8 characters. Test errors for invalid code. */
+/* Test C23 UTF-8 characters. Test errors for invalid code. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
unsigned char a = u8''; /* { dg-error "empty character constant" } */
unsigned char b = u8'ab'; /* { dg-error "character constant too long for its type" } */
-/* Test C2X UTF-8 string literal type. */
+/* Test C23 UTF-8 string literal type. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
_Static_assert (_Generic (u8"text", unsigned char*: 1, default: 2) == 1, "UTF-8 string literals have an unexpected type");
_Static_assert (_Generic (u8"x"[0], unsigned char: 1, default: 2) == 1, "UTF-8 string literal elements have an unexpected type");
-/* Test initialization by UTF-8 string literal in C2X. */
+/* Test initialization by UTF-8 string literal in C23. */
/* { dg-do compile } */
/* { dg-require-effective-target wchar } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
typedef __CHAR8_TYPE__ char8_t;
typedef __CHAR16_TYPE__ char16_t;
void
f (void)
{
- /* This should have type int following C90 rules, whereas in C2x it
+ /* This should have type int following C90 rules, whereas in C23 it
would have type double. */
auto x = 1.5;
int *p = &x;
-/* Test C2x storage class specifiers in compound literals not permitted for
+/* Test C23 storage class specifiers in compound literals not permitted for
C90, but without a duplicate diagnostic, just the diagnostic for compound
literals not being permitted in C90 at all. */
/* { dg-do compile } */
/* Test #warning not in C11. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=c11 -Wc11-c23-compat" } */
#warning example text /* { dg-warning "example text" } */
/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */
-/* Test #elifdef and #elifndef in C2x. */
+/* Test #elifdef and #elifndef in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define A
#undef B
-/* Test #elifdef and #elifndef in C2x: erroneous usages. */
+/* Test #elifdef and #elifndef in C23: erroneous usages. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define A
#undef B
-/* Test :: token in C2x. */
+/* Test :: token in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define CONCAT(x, y) x ## y
-/* Test :: token in C2x: preprocessed output. */
+/* Test :: token in C23: preprocessed output. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors -P" } */
+/* { dg-options "-std=c23 -pedantic-errors -P" } */
#define COLON() :
#define TEST() ABC
-/* Test trigraphs not supported in C2x. */
+/* Test trigraphs not supported in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
const char a[] = "??=??(??/??/??)??'??<??!??>??-";
const char b[] = "?""?=?""?(?""?/?""?/?""?)?""?'?""?<?""?!?""?>?""?-";
-/* Test trigraphs supported in C2x with -trigraphs used. */
+/* Test trigraphs supported in C23 with -trigraphs used. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors -trigraphs" } */
+/* { dg-options "-std=c23 -pedantic-errors -trigraphs" } */
#include "trigraphs.c"
-/* Test characters not permitted in UCNs in C2x. */
+/* Test characters not permitted in UCNs in C23. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#if U'\u0000' /* { dg-error "is not a valid universal character" } */
#endif
-/* Test C2x (= Unicode) rules for characters in identifiers. */
+/* Test C23 (= Unicode) rules for characters in identifiers. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
¨
-/* Test C2x (= Unicode) rules for characters in identifiers. */
+/* Test C23 (= Unicode) rules for characters in identifiers. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
\u00A8 /* { dg-error "is not valid in an identifier" } */
/* Test __VA_OPT__ and no "..." arguments in a call to a variable-arguments
- macro accepted for C2X. */
+ macro accepted for C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#define CALL(F, ...) F (7 __VA_OPT__(,) __VA_ARGS__)
#define M(X, ...) X
-/* Test #warning in C2x. */
+/* Test #warning in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#warning example text /* { dg-warning "example text" } */
-/* Test #warning in C23: -Wc11-c2x-comapt. */
+/* Test #warning in C23: -Wc11-c23-compat. */
/* { dg-do preprocess } */
-/* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
#warning example text /* { dg-warning "example text" } */
/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */
/* Test #warning not in C11. */
/* { dg-do preprocess } */
-/* { dg-options "-std=gnu11 -Wc11-c2x-compat" } */
+/* { dg-options "-std=gnu11 -Wc11-c23-compat" } */
#warning example text /* { dg-warning "example text" } */
/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */
-/* Test #warning in C2x. */
+/* Test #warning in C23. */
/* { dg-do preprocess } */
-/* { dg-options "-std=gnu2x -pedantic-errors" } */
+/* { dg-options "-std=gnu23 -pedantic-errors" } */
#warning example text /* { dg-warning "example text" } */
-/* Test #warning in C23: -Wc11-c2x-comapt. */
+/* Test #warning in C23: -Wc11-c23-compat. */
/* { dg-do preprocess } */
-/* { dg-options "-std=gnu2x -pedantic-errors -Wc11-c2x-compat" } */
+/* { dg-options "-std=gnu23 -pedantic-errors -Wc11-c23-compat" } */
#warning example text /* { dg-warning "example text" } */
/* { dg-warning "#warning before C23 is a GCC extension" "compat" { target *-*-* } .-1 } */
-/* Test TS 18661-1 CR_DECIMAL_DIG: not in C2X without
+/* Test TS 18661-1 CR_DECIMAL_DIG: not in C23 without
__STDC_WANT_IEC_60559_BFP_EXT__ defined. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
-/* Test C2x CR_DECIMAL_DIG: defined for __STDC_WANT_IEC_60559_EXT__. */
+/* Test C23 CR_DECIMAL_DIG: defined for __STDC_WANT_IEC_60559_EXT__. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#define __STDC_WANT_IEC_60559_EXT__
#include <float.h>
/* Test non-canonical BID significands: _Decimal128. Bug 91226. */
/* { dg-do run { target lp64 } } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
extern void abort (void);
extern void exit (int);
combination field starts 11. Bug 91226. */
/* { dg-do run { target lp64 } } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
extern void abort (void);
extern void exit (int);
/* Test non-canonical BID significands: _Decimal128. Bug 91226. */
/* { dg-do run { target lp64 } } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O0" } */
+/* { dg-options "-std=gnu23 -O0" } */
#include "bid-non-canonical-d128-1.c"
combination field starts 11. Bug 91226. */
/* { dg-do run { target lp64 } } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O0" } */
+/* { dg-options "-std=gnu23 -O0" } */
#include "bid-non-canonical-d128-2.c"
/* Test non-canonical BID significands: _Decimal32. Bug 91226. */
/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
extern void abort (void);
extern void exit (int);
/* Test non-canonical BID significands: _Decimal32. Bug 91226. */
/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O0" } */
+/* { dg-options "-std=gnu23 -O0" } */
#include "bid-non-canonical-d32-1.c"
/* Test non-canonical BID significands: _Decimal64. Bug 91226. */
/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
extern void abort (void);
extern void exit (int);
/* Test non-canonical BID significands: _Decimal64. Bug 91226. */
/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O0" } */
+/* { dg-options "-std=gnu23 -O0" } */
#include "bid-non-canonical-d64-1.c"
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _BitInt(192)
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _BitInt(192)
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _BitInt(192)
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _Decimal64
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _Decimal32
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-O2 -std=c2x -pedantic-errors" } */
+/* { dg-options "-O2 -std=c23 -pedantic-errors" } */
#if __BITINT_MAXWIDTH__ >= 192
__attribute__((noipa)) _Decimal128
/* Test non-canonical BID significands. */
/* { dg-do run { target bitint } } */
/* { dg-require-effective-target dfp_bid } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
union U32
{
/* PR c/102989 */
/* { dg-do run { target bitint } } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <fenv.h>
-/* Test C2x built-in functions: test functions new in C2x are indeed
+/* Test C23 built-in functions: test functions new in C23 are indeed
declared as built-in as expected. DFP tests. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
int fabsd32 (void); /* { dg-warning "conflicting types for built-in function" } */
int fabsd64 (void); /* { dg-warning "conflicting types for built-in function" } */
-/* Test that DFP constants are accepted in C2X mode. */
+/* Test that DFP constants are accepted in C23 mode. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int a = (int) 1.1DF;
int b = (int) 2.df;
/* Test that DFP constants are accepted in C23 mode: compat warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
int a = (int) 1.1DF; /* { dg-warning "C23 feature" } */
int b = (int) 2.df; /* { dg-warning "C23 feature" } */
-/* Test C2x constexpr. Valid code, compilation tests, DFP. */
+/* Test C23 constexpr. Valid code, compilation tests, DFP. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
constexpr _Decimal32 v1 = __DEC32_MIN__;
constexpr _Decimal32 v2 = __DEC32_SUBNORMAL_MIN__;
-/* Test C2x constexpr. Invalid code, compilation tests, DFP. */
+/* Test C23 constexpr. Invalid code, compilation tests, DFP. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* Test conversions between binary and decimal. */
constexpr double v2 = 0.0DF; /* { dg-error "'constexpr' initializer for a binary floating-point type is of decimal type" } */
/* Test DFP macros defined in <float.h> with DFP support. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
/* Test DFP macros defined in <float.h> with DFP support. TS 18661-2
feature test macro does not change what is defined. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#define __STDC_WANT_IEC_60559_DFP_EXT__
/* Test DFP macros defined in <float.h> with DFP support. TR 24732
feature test macro causes *_SUBNORMAL_MIN macros to be defined. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#define __STDC_WANT_DEC_FP__
#include <float.h>
/* Test DEC_INFINITY defined in <float.h> with DFP support. */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
/* Test DEC_NAN defined in <float.h> with DFP support. */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
support in libgcc does not integrate with hardware exceptions.) */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <fenv.h>
#include <float.h>
/* Test DEC*_SNAN macros defined in <float.h> with DFP support. */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <float.h>
support. */
/* { dg-do run } */
/* { dg-require-effective-target fenv_exceptions_dfp } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <fenv.h>
#include <float.h>
-/* Test that _Decimal* keywords are accepted in C2X mode. */
+/* Test that _Decimal* keywords are accepted in C23 mode. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
_Decimal32 d32;
_Decimal64 d64;
-/* Test that _Decimal* keywords are accepted in C2X mode: compat warnings. */
+/* Test that _Decimal* keywords are accepted in C23 mode: compat warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=c23 -Wc11-c23-compat" } */
_Decimal32 d32; /* { dg-warning "ISO C does not support" } */
_Decimal64 d64; /* { dg-warning "ISO C does not support" } */
# error "DEC128_SUBNORMAL_MIN not defined"
#endif
-/* These macros from C2X should not be defined. */
+/* These macros from C23 should not be defined. */
#ifdef DEC32_TRUE_MIN
# error "DEC32_TRUE_MIN defined"
/* Test DFP macros defined in <float.h> with DFP support. TS 18661-2
- feature test macro causes same macros to be defined as for C2X. */
+ feature test macro causes same macros to be defined as for C23. */
/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */
/* PR c/102989 */
/* { dg-do compile { target bitint } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
void
foo (void)
-/* Test for printf formats: rejection of C2X (and C2X-recommended) formats in
+/* Test for printf formats: rejection of C23 (and C23-recommended) formats in
pedantic mode. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic -Wformat" } */
-/* Test for printf formats: rejection of C2X formats in pedantic mode. */
+/* Test for printf formats: rejection of C23 formats in pedantic mode. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic -Wformat" } */
/* Test for printf formats: acceptance of DFP formats in pedantic mode. */
/* { dg-do compile } */
/* { dg-require-effective-target dfp } */
-/* { dg-options "-std=c2x -pedantic -Wformat" } */
+/* { dg-options "-std=c23 -pedantic -Wformat" } */
#include "format.h"
/* Test for scanf formats: acceptance of DFP formats in pedantic mode. */
/* { dg-do compile } */
/* { dg-require-effective-target dfp } */
-/* { dg-options "-std=c2x -pedantic -Wformat" } */
+/* { dg-options "-std=c23 -pedantic -Wformat" } */
#include "format.h"
-/* Test for printf formats. Formats using C2X features. */
+/* Test for printf formats. Formats using C23 features. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic -Wformat" } */
+/* { dg-options "-std=c23 -pedantic -Wformat" } */
#include "format.h"
-/* Test for scanf formats. Formats using C2X features. */
+/* Test for scanf formats. Formats using C23 features. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic -Wformat" } */
+/* { dg-options "-std=c23 -pedantic -Wformat" } */
#include "format.h"
-/* Test for strftime formats. Formats using C2x features. */
+/* Test for strftime formats. Formats using C23 features. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic -Wformat" } */
+/* { dg-options "-std=c23 -pedantic -Wformat" } */
#include "format.h"
-/* Test for scanf format extensions using formats from C2X. */
+/* Test for scanf format extensions using formats from C23. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x -Wformat" } */
+/* { dg-options "-std=gnu23 -Wformat" } */
#include "format.h"
/* Test for printf format extensions using formats from or recommended by
- C2X. */
+ C23. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x -Wformat" } */
+/* { dg-options "-std=gnu23 -Wformat" } */
#include "format.h"
/* Test typeof propagation of noreturn function attributes with -std=gnu11:
these are part of the type of a function pointer with GNU typeof, but not
- with C2x typeof. */
+ with C23 typeof. */
/* { dg-do link } */
/* { dg-options "-std=gnu11 -O2" } */
-/* Test C2x attribute syntax. Basic tests of valid uses of empty
+/* Test C23 attribute syntax. Basic tests of valid uses of empty
attributes with GNU C features. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* Attributes can be used in declarations after __extension__, and
before asm statements. */
-/* Test C2x attribute syntax. Invalid uses of attributes with GNU C
+/* Test C23 attribute syntax. Invalid uses of attributes with GNU C
features. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x -w" } */
+/* { dg-options "-std=gnu23 -w" } */
/* Attributes cannot be used as prefix attributes on old-style
parameter declarations or on function declarators with identifier
- lists (removed from C2x). */
+ lists (removed from C23). */
void (*f(a, b) [[]])() int a, b; { } /* { dg-error "expected" } */
-/* Test C2x attribute syntax. Test GNU attributes appertain to
+/* Test C23 attribute syntax. Test GNU attributes appertain to
appropriate constructs. */
/* { dg-do compile } */
/* { dg-require-alias "" } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
void f (void) {};
-/* Test C2x attribute syntax. Test GNU attributes appertain to
+/* Test C23 attribute syntax. Test GNU attributes appertain to
appropriate constructs. Attributes on types not being defined at
the time. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x -Wformat" } */
+/* { dg-options "-std=gnu23 -Wformat" } */
typedef void va_type (const char *, ...);
typedef va_type [[gnu::format (printf, 1, 2)]] printf_like_1;
-/* Test C2x auto. Invalid code with GNU extensions. */
+/* Test C23 auto. Invalid code with GNU extensions. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
void
f ()
-/* Test C2x built-in functions: test DFP built-in functions are not
+/* Test C23 built-in functions: test DFP built-in functions are not
available when no DFP support. Bug 91985. */
/* { dg-do compile { target { ! dfp } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
int fabsd32 (void);
int fabsd64 (void);
-/* Test C2x storage class specifiers in compound literals: GNU use of alignof
+/* Test C23 storage class specifiers in compound literals: GNU use of alignof
on objects (tested separately since alignof parsing handles the type name of
compound literals). */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
int a = alignof (static int) { 0 };
-/* Test C2x storage class specifiers in compound literals. Thread-local
+/* Test C23 storage class specifiers in compound literals. Thread-local
cases, compilation tests, GNU __thread used. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-require-effective-target tls } */
#include <stddef.h>
-/* Test C2x constexpr. Valid code using GNU extensions, compilation tests. */
+/* Test C23 constexpr. Valid code using GNU extensions, compilation tests. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
struct s { struct { int x, y; } x; };
constexpr struct s v = { { 123, 150 } };
-/* Test C2X support for empty initializers: valid use cases with GNU
+/* Test C23 support for empty initializers: valid use cases with GNU
extensions. */
/* { dg-do run } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
extern void exit (int);
extern void abort (void);
-/* Test C2X support for empty initializers: invalid use cases with GNU
+/* Test C23 support for empty initializers: invalid use cases with GNU
extensions. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
void
f (int a)
-/* Test C2x enumerations with fixed underlying type together with GNU
+/* Test C23 enumerations with fixed underlying type together with GNU
extensions: an enum cannot be forward declared without a fixed underlying
type and then declared or defined with one. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
enum e1;
enum e1 : int; /* { dg-error "'enum' declared both with and without fixed underlying type" } */
/* Test C11 static assertions. Omitting the string diagnosed with
- -Wc11-c2x-compat. */
+ -Wc11-c23-compat. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x -Wc11-c2x-compat" } */
+/* { dg-options "-std=gnu23 -Wc11-c23-compat" } */
_Static_assert (1); /* { dg-warning "does not support omitting the string" } */
/* Test variadic functions with no named parameters do not accept GNU
attributes before '...'. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
int f (__attribute__(()) ...); /* { dg-error "expected" } */
int g (int (__attribute__(()) ...)); /* { dg-error "expected" } */
-/* Test __typeof__ propagation of noreturn function attributes with -std=gnu2x:
+/* Test __typeof__ propagation of noreturn function attributes with -std=gnu23:
these are part of the type of a function pointer with GNU __typeof__, but
- not with C2x typeof. */
+ not with C23 typeof. */
/* { dg-do link } */
-/* { dg-options "-std=gnu2x -O2" } */
+/* { dg-options "-std=gnu23 -O2" } */
_Noreturn void f (void);
-/* Test C2x UTF-8 characters. Test accepted with -std=gnu2x. */
+/* Test C23 UTF-8 characters. Test accepted with -std=gnu23. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
#include "c2x-utf8char-1.c"
-/* Test C2X UTF-8 string literal type with -std=gnu2x. */
+/* Test C23 UTF-8 string literal type with -std=gnu23. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
#include "c2x-utf8str-type.c"
-/* Test initialization by UTF-8 string literal in C2X with -std=gnu2x. */
+/* Test initialization by UTF-8 string literal in C23 with -std=gnu23. */
/* { dg-do compile } */
/* { dg-require-effective-target wchar } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
typedef __CHAR8_TYPE__ char8_t;
typedef __CHAR16_TYPE__ char16_t;
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-1.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x -ffat-lto-objects -fdump-tree-gimple" } */
+/* { dg-options "-fopenmp -std=c23 -ffat-lto-objects -fdump-tree-gimple" } */
extern void abort ();
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x -Wno-attributes" } */
+/* { dg-options "-fopenmp -std=c23 -Wno-attributes" } */
void
foo ()
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#pragma omp declare target
#pragma omp declare target
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
[[omp::directive(error)]]; /* { dg-error "'pragma omp error' encountered" } */
[[omp::directive(error, at(compilation))]]; /* { dg-error "'pragma omp error' encountered" } */
/* PR c++/102413 */
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
[[omp::directive(error]]; /* { dg-error "expected|declare" } */
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#pragma omp begin assumes absent (target)
#pragma omp begin assumes absent (target)
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-16.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-17.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#pragma omp begin declare target
#pragma omp begin declare target device_type (any)
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
void foo1 ();
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-2.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x -ffat-lto-objects -fdump-tree-gimple" } */
+/* { dg-options "-fopenmp -std=c23 -ffat-lto-objects -fdump-tree-gimple" } */
extern void abort ();
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" */
+/* { dg-options "-fopenmp -std=c23" */
void
foo ()
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
int i;
int t1, t2, t3, t4, t5, t6, t7;
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
void
foo (int x)
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-5.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
void
foo ()
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
void
foo ()
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-8.C"
/* { dg-do compile } */
-/* { dg-options "-fopenmp -std=c2x" } */
+/* { dg-options "-fopenmp -std=c23" } */
#include "../../g++.dg/gomp/attrs-9.C"
-/* Test C2X width macros in <limits.h>. */
+/* Test C23 width macros in <limits.h>. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <limits.h>
-/* Test qualifiers on function return types in C2X (C2X version of
+/* Test qualifiers on function return types in C23 (C23 version of
qual-return-6.c): those qualifiers are now ignored for all purposes,
including _Atomic, but should still get warnings. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -Wignored-qualifiers" } */
+/* { dg-options "-std=c23 -Wignored-qualifiers" } */
const int f1 (void); /* { dg-warning "qualifiers ignored" } */
volatile int f2 (void) { return 0; } /* { dg-warning "qualifiers ignored" } */
-/* Test qualifiers on function return types in C2X (C2X version of
+/* Test qualifiers on function return types in C23 (C23 version of
qual-return-5.c): those qualifiers are now ignored for all purposes,
including _Atomic. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
int f1 (void);
const int f1 (void);
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* PR c/104822 */
#include <stddef.h>
/* Test C23 Checked Integer Arithmetic macros in <stdckdint.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <stdckdint.h>
/* Test C23 Checked Integer Arithmetic macros in <stdckdint.h>. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
#include <stdckdint.h>
-/* Test C2X width macros in <stdint.h>. */
+/* Test C23 width macros in <stdint.h>. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -ffreestanding" } */
+/* { dg-options "-std=c23 -ffreestanding" } */
/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#include <stddef.h>
-/* Test various erroneous or ignored uses of C2X attribute syntax. */
+/* Test various erroneous or ignored uses of C23 attribute syntax. */
/* { dg-do compile } */
/* { dg-options "-fgnu-tm" } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && int32plus } } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target { bitint && float16_runtime } } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* { dg-add-options float16 } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
/* PR c/102989 */
/* { dg-do run { target bitint } } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
-/* Test C2X enables -fno-fp-int-builtin-inexact. */
+/* Test C23 enables -fno-fp-int-builtin-inexact. */
/* { dg-do run } */
-/* { dg-options "-std=c2x" } */
+/* { dg-options "-std=c23" } */
/* { dg-require-effective-target fenv_exceptions } */
#include "builtin-fp-int-inexact.c"
-/* Test C2x variadic functions with no named parameters, or last named
+/* Test C23 variadic functions with no named parameters, or last named
parameter with a declaration not allowed in C17. Execution tests split
between source files. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-additional-sources "c2x-stdarg-split-1b.c" } */
extern void abort (void);
-/* Test C2x variadic functions with no named parameters, or last named
+/* Test C23 variadic functions with no named parameters, or last named
parameter with a declaration not allowed in C17. Execution tests split
between source files. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors" } */
+/* { dg-options "-std=c23 -pedantic-errors" } */
#include <stdarg.h>
/* Test _Float128 NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float128 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float128_runtime } */
/* Test _Float128x NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float128x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float128x_runtime } */
/* Test _Float16 NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float16 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float16_runtime } */
/* Test _Float32 NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float32 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float32_runtime } */
/* Test _Float32x NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float32x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float32x_runtime } */
/* Test _Float64 NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float64 } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float64_runtime } */
/* Test _Float64x NaNs in <float.h>. */
/* { dg-do run } */
-/* { dg-options "-std=c2x -fsignaling-nans" } */
+/* { dg-options "-std=c23 -fsignaling-nans" } */
/* { dg-add-options float64x } */
/* { dg-add-options ieee } */
/* { dg-require-effective-target float64x_runtime } */
-/* Test C2x constexpr. Valid code, compilation tests, excess precision. */
+/* Test C23 constexpr. Valid code, compilation tests, excess precision. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -mfpmath=387 -fexcess-precision=standard" } */
+/* { dg-options "-std=c23 -pedantic-errors -mfpmath=387 -fexcess-precision=standard" } */
constexpr long double ld = 1.0 / 3.0;
constexpr long double ld2 = 1.1;
-/* Test C2x constexpr. Invalid code, compilation tests, excess precision. */
+/* Test C23 constexpr. Invalid code, compilation tests, excess precision. */
/* { dg-do compile } */
-/* { dg-options "-std=c2x -pedantic-errors -mfpmath=387 -fexcess-precision=standard" } */
+/* { dg-options "-std=c23 -pedantic-errors -mfpmath=387 -fexcess-precision=standard" } */
constexpr double d = 1.0 / 3.0; /* { dg-error "'constexpr' initializer not representable in type of object" } */
constexpr double d2 = 1.1; /* { dg-error "'constexpr' initializer not representable in type of object" } */
return [check_no_compiler_messages bitint object {
_BitInt (2) a = 1wb;
unsigned _BitInt (__BITINT_MAXWIDTH__) b = 0uwb;
- } "-std=c2x"]
+ } "-std=c23"]
}
# Return 1 if the target supports _BitInt(128), 0 otherwise.
return [check_no_compiler_messages bitint128 object {
_BitInt (2) a = 1wb;
unsigned _BitInt (128) b = 0uwb;
- } "-std=c2x"]
+ } "-std=c23"]
}
# Return 1 if the target supports _BitInt(575), 0 otherwise.
return [check_no_compiler_messages bitint575 object {
_BitInt (2) a = 1wb;
unsigned _BitInt (575) b = 0uwb;
- } "-std=c2x"]
+ } "-std=c23"]
}
# Return 1 if the target supports compiling decimal floating point,
-/* Test C2x attribute syntax. Test empty attributes accepted. */
+/* Test C23 attribute syntax. Test empty attributes accepted. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu2x" } */
+/* { dg-options "-std=gnu23" } */
#include "../../gcc.dg/c2x-attr-syntax-1.c"