aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-common.cc
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-09-14 19:35:24 +0100
committerGaius Mulley <gaiusmod2@gmail.com>2023-09-14 19:35:24 +0100
commit4e1c5d5faf6b3dd32a9c8644d4fbf6471b7d9705 (patch)
tree07e18a89fc420e47656c61e2be659b15cb59b052 /gcc/ggc-common.cc
parent3c834d85f2ec42c60995c2b678196a06cb744959 (diff)
downloadgcc-4e1c5d5faf6b3dd32a9c8644d4fbf6471b7d9705.zip
gcc-4e1c5d5faf6b3dd32a9c8644d4fbf6471b7d9705.tar.gz
gcc-4e1c5d5faf6b3dd32a9c8644d4fbf6471b7d9705.tar.bz2
modula2: introduce case checking when switching on subranges
This patch extends the -Wcase-enum warning to catch missing elements from subranges. The patch also includes removal of unused parameters from M2SymInit.mod and M2CaseList.mod. gcc/m2/ChangeLog: * gm2-compiler/M2CaseList.mod (appendString): New procedure. (appendEnum): Re-implement. (NoOfSetElements): New procedure function. (isPrintableChar): New procedure function. (appendTree): New procedure. (SubrangeErrors): New procedure. (EmitMissingRangeErrors): Call SubrangeErrors if appropriate. * gm2-compiler/M2SymInit.mod (SetFieldInitializedNo): Avoid using a temporary variable once. (IsLocalVar): Comment out. (RecordContainsVarient): Remove fieldtype. (GenerateNoteFlow): Remove lst parameter. (CheckDeferredRecordAccess): Remove lst parameter. (CheckUnary): Remove lst parameter. Remove procSym. (CheckBinary): Remove lst parameter. Remove procSym. (CheckIndrX): Remove lst parameter. Remove procSym. (CheckXIndr): Remove bblst and procSym parameters. (CheckRecordField): Remove procSym, op1tok, op2tok and op2. (CheckBecomes): Remove procSym and bblst. (CheckComparison): Remove procSym and bblst. (CheckAddr): Remove procSym parameter. * gm2-gcc/m2expr.cc (m2expr_CSTIntToString): New function. (m2expr_CSTIntToChar): New function. * gm2-gcc/m2expr.def (CSTIntToString): New procedure function declaration. (CSTIntToChar): New procedure function declaration. * gm2-gcc/m2expr.h (m2expr_CSTIntToChar): New prototype. (m2expr_CSTIntToString): New prototype. gcc/testsuite/ChangeLog: * gm2/switches/case/fail/subrangecase.mod: New test. * gm2/switches/case/fail/subrangecase2.mod: New test. * gm2/switches/case/fail/subrangecase3.mod: New test. * gm2/switches/case/fail/subrangecase4.mod: New test. * gm2/switches/case/fail/subrangecase5.mod: New test. * gm2/switches/case/fail/subrangecase6.mod: New test. * gm2/switches/case/pass/subrangecase.mod: New test. * gm2/switches/case/pass/subrangecase2.mod: New test. * gm2/switches/case/pass/subrangecase3.mod: New test. * gm2/switches/case/pass/subrangecase4.mod: New test. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc/ggc-common.cc')
0 files changed, 0 insertions, 0 deletions