[PATCH] [Mips] Generate warning for invalid combination of '-mnan' and '-march' options.

Petar Jovanovic petar.jovanovic at imgtec.com
Mon Mar 16 10:57:00 PDT 2015


================
Comment at: lib/Basic/Targets.cpp:5769
@@ +5768,3 @@
+        .Case("mips32r3", NanLegacy | Nan2008)
+        .Case("mips32r5", NanLegacy | Nan2008)
+        .Case("mips32r6", Nan2008)
----------------
It might be me only, but seeing a function that returns enum but can actually return non-enumerated value seems wrong (I am not saying it is illegal though).
I see this is already done for ArchDefineTypes within PPCTargetInfo, but it still looks wrong (to me).
Would not this trigger a runtime error in clang if it was compiled with "-fsanitize=enum"?

http://reviews.llvm.org/D8170

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list