https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118539
Bug ID: 118539 Summary: Unsorted -march suggestions Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: egor.pugin at gmail dot com Target Milestone: --- When specifying invalid -march argument, some valid suggestions are printed sorted and some are not. sorted example: cc1plus: error: unknown value 'armv9.4-h+sve2x' for '-march' cc1plus: note: valid arguments are: armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8.6-a armv8.7-a armv8.8-a armv8.9-a armv8-r armv9-a armv9.1-a armv9.2-a armv9.3-a armv9.4-a unsorted example 1 (on arm64): cc1plus: error: invalid feature modifier 'sve2x' in '-march=armv9.4-a+sve2x' cc1plus: note: valid arguments are: rng flagm flagm2 lse fp simd dotprod sm4 rdma crc sha2 aes crypto sha3 fp16 fp16fml jscvt fcma rcpc rcpc2 rcpc3 frintts i8mm bf16 sve sve-b16b16 f32mm f64mm sve2 sve2-aes sve2-bitperm sve2-sha3 sve2-sm4 sve2p1 sme memtag sb predres ssbs profile tme pauth ls64 wfxt xs sme-f64f64 sme-i16i64 sme2 sme2p1 sme-b16b16 sme-f16f16 mops cssc lse128 d128 the gcs fp8 fp8fma ssve-fp8fma faminmax fp8dot4 ssve-fp8dot4 fp8dot2 ssve-fp8dot2 lut; did you mean 'sve2'? unsorted example 2 (on x64): error: unknown target CPU 'armv9.4-a+sve2x' note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, rocketlake, icelake-server, tigerlake, sapphirerapids, alderlake, raptorlake, meteorlake, arrowlake, arrowlake-s, lunarlake, gracemont, pantherlake, sierraforest, grandridge, graniterapids, graniterapids-d, emeraldrapids, clearwaterforest, diamondrapids, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, znver4, znver5, x86-64, x86-64-v2, x86-64-v3, x86-64-v4 Considering how many options there are, is it worth to print them all sorted for the sake of readability and searching?