- According the conclusion in RISC-V C API document, we decide to deprecat
the __riscv_cmodel_pic marco
- __riscv_cmodel_pic is deprecated and will removed in next GCC
release.
[1] https://github.com/riscv/riscv-c-api-doc/pull/11
gcc/ChangeLog:
* config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
__riscv_cmodel_medany when PIC mode.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/predef-3.c: Update testcase.
* gcc.target/riscv/predef-6.c: Ditto.
builtin_define ("__riscv_cmodel_medlow");
break;
+ case CM_PIC:
+ /* __riscv_cmodel_pic is deprecated, and will removed in next GCC release.
+ see https://github.com/riscv/riscv-c-api-doc/pull/11 */
+ builtin_define ("__riscv_cmodel_pic");
+ /* FALLTHROUGH. */
+
case CM_MEDANY:
builtin_define ("__riscv_cmodel_medany");
break;
- case CM_PIC:
- builtin_define ("__riscv_cmodel_pic");
- break;
}
}
#if defined(__riscv_cmodel_medlow)
#error "__riscv_cmodel_medlow"
#endif
-#if defined(__riscv_cmodel_medany)
-#error "__riscv_cmodel_medlow"
+#if !defined(__riscv_cmodel_medany)
+#error "__riscv_cmodel_medany"
#endif
#if !defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
+#error "__riscv_cmodel_pic"
#endif
return 0;
#if defined(__riscv_cmodel_medlow)
#error "__riscv_cmodel_medlow"
#endif
-#if defined(__riscv_cmodel_medany)
-#error "__riscv_cmodel_medlow"
+#if !defined(__riscv_cmodel_medany)
+#error "__riscv_cmodel_medany"
#endif
#if !defined(__riscv_cmodel_pic)
-#error "__riscv_cmodel_medlow"
+#error "__riscv_cmodel_medpic"
#endif
return 0;