aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/regcomp.c')
-rw-r--r--llvm/lib/Support/regcomp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index 9d484195a6d6..4e9082cec456 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -329,7 +329,15 @@ llvm_regcomp(llvm_regex_t *preg, const char *pattern, int cflags)
/* set things up */
p->g = g;
+ /* suppress warning from the following explicit cast. */
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif /* __GNUC__ */
p->next = (char *)pattern; /* convenience; we do not modify it */
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif /* __GNUC__ */
p->end = p->next + len;
p->error = 0;
p->ncsalloc = 0;