Add `-pedantic` as an illegal flag

Ignore-AOSP-First: Make backporting easier.
Bug: b/383382218
Change-Id: I3885de831e95aeeca2ca5c0f03434e26a05c6403
diff --git a/cc/config/global.go b/cc/config/global.go
index 5011acd..e81ac0d 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -373,6 +373,9 @@
 	// Flags that must not appear in any command line.
 	IllegalFlags = []string{
 		"-w",
+		"-pedantic",
+		"-pedantic-errors",
+		"-Werror=pedantic",
 	}
 
 	CStdVersion               = "gnu23"