summaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog18
-rw-r--r--gcc/c-family/c-cppbuiltin.c2
-rw-r--r--gcc/c-family/c-opts.c1
-rw-r--r--gcc/c-family/c-pragma.c38
-rw-r--r--gcc/c-family/c.opt8
5 files changed, 58 insertions, 9 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 067c1341180..68929521087 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,21 @@
+2013-11-05 Tobias Burnus <burnus@net-b.de>
+
+ * c.opt (-Wdate-time): New option
+ * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
+
+2013-11-05 Joseph Myers <joseph@codesourcery.com>
+
+ * c-cppbuiltin.c (cpp_iec_559_value): Test
+ flag_excess_precision_cmdline not flag_excess_precision.
+
+2013-11-05 Tobias Burnus <burnus@net-b.de>
+
+ * c.opt (fopenmp-simd): New option.
+ * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
+ (omp_pragmas): ... this new struct.
+ (c_pp_lookup_pragma): Also walk omp_pragmas.
+ (init_pragma): Init pragmas for -fopenmp-simd.
+
2013-11-04 Marek Polacek <polacek@redhat.com>
PR c++/58979
diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c
index 94f72eceb2e..ec8b1834b7e 100644
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -734,7 +734,7 @@ cpp_iec_559_value (void)
if (flag_iso
&& !c_dialect_cxx ()
&& TARGET_FLT_EVAL_METHOD != 0
- && flag_excess_precision != EXCESS_PRECISION_STANDARD)
+ && flag_excess_precision_cmdline != EXCESS_PRECISION_STANDARD)
ret = 0;
/* Various options are contrary to IEEE 754 semantics. */
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 702fe1a8bdf..2de5425e654 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -1198,6 +1198,7 @@ sanitize_cpp_opts (void)
cpp_opts->unsigned_char = !flag_signed_char;
cpp_opts->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS;
+ cpp_opts->warn_date_time = cpp_warn_date_time;
/* Wlong-long is disabled by default. It is enabled by:
[-Wpedantic | -Wtraditional] -std=[gnu|c]++98 ; or
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 8915f441d7d..8bda6eddfda 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -1172,31 +1172,35 @@ static const struct omp_pragma_def omp_pragmas[] = {
{ "cancel", PRAGMA_OMP_CANCEL },
{ "cancellation", PRAGMA_OMP_CANCELLATION_POINT },
{ "critical", PRAGMA_OMP_CRITICAL },
- { "declare", PRAGMA_OMP_DECLARE_REDUCTION },
- { "distribute", PRAGMA_OMP_DISTRIBUTE },
{ "end", PRAGMA_OMP_END_DECLARE_TARGET },
{ "flush", PRAGMA_OMP_FLUSH },
- { "for", PRAGMA_OMP_FOR },
{ "master", PRAGMA_OMP_MASTER },
{ "ordered", PRAGMA_OMP_ORDERED },
- { "parallel", PRAGMA_OMP_PARALLEL },
{ "section", PRAGMA_OMP_SECTION },
{ "sections", PRAGMA_OMP_SECTIONS },
- { "simd", PRAGMA_OMP_SIMD },
{ "single", PRAGMA_OMP_SINGLE },
- { "target", PRAGMA_OMP_TARGET },
- { "task", PRAGMA_OMP_TASK },
{ "taskgroup", PRAGMA_OMP_TASKGROUP },
{ "taskwait", PRAGMA_OMP_TASKWAIT },
{ "taskyield", PRAGMA_OMP_TASKYIELD },
- { "teams", PRAGMA_OMP_TEAMS },
{ "threadprivate", PRAGMA_OMP_THREADPRIVATE }
};
+static const struct omp_pragma_def omp_pragmas_simd[] = {
+ { "declare", PRAGMA_OMP_DECLARE_REDUCTION },
+ { "distribute", PRAGMA_OMP_DISTRIBUTE },
+ { "for", PRAGMA_OMP_FOR },
+ { "parallel", PRAGMA_OMP_PARALLEL },
+ { "simd", PRAGMA_OMP_SIMD },
+ { "target", PRAGMA_OMP_TARGET },
+ { "task", PRAGMA_OMP_TASK },
+ { "teams", PRAGMA_OMP_TEAMS },
+};
void
c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
{
const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
+ const int n_omp_pragmas_simd = sizeof (omp_pragmas_simd)
+ / sizeof (*omp_pragmas);
int i;
for (i = 0; i < n_omp_pragmas; ++i)
@@ -1207,6 +1211,14 @@ c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
return;
}
+ for (i = 0; i < n_omp_pragmas_simd; ++i)
+ if (omp_pragmas_simd[i].id == id)
+ {
+ *space = "omp";
+ *name = omp_pragmas_simd[i].name;
+ return;
+ }
+
if (id >= PRAGMA_FIRST_EXTERNAL
&& (id < PRAGMA_FIRST_EXTERNAL + registered_pp_pragmas.length ()))
{
@@ -1359,6 +1371,16 @@ init_pragma (void)
cpp_register_deferred_pragma (parse_in, "omp", omp_pragmas[i].name,
omp_pragmas[i].id, true, true);
}
+ if (flag_openmp || flag_openmp_simd)
+ {
+ const int n_omp_pragmas_simd = sizeof (omp_pragmas_simd)
+ / sizeof (*omp_pragmas);
+ int i;
+
+ for (i = 0; i < n_omp_pragmas_simd; ++i)
+ cpp_register_deferred_pragma (parse_in, "omp", omp_pragmas_simd[i].name,
+ omp_pragmas_simd[i].id, true, true);
+ }
if (!flag_preprocess_only)
cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index b862eb9e276..46391fa496c 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -640,6 +640,10 @@ Wpragmas
C ObjC C++ ObjC++ Var(warn_pragmas) Init(1) Warning
Warn about misuses of pragmas
+Wdate-time
+Common Var(cpp_warn_date_time) Warning
+Warn about __TIME__, __DATE__ and __TIMESTAMP__ usage
+
Wproperty-assign-default
ObjC ObjC++ Var(warn_property_assign_default) Init(1) Warning
Warn if a property for an Objective-C object has no assign semantics specified
@@ -1069,6 +1073,10 @@ fopenmp
C ObjC C++ ObjC++ Var(flag_openmp)
Enable OpenMP (implies -frecursive in Fortran)
+fopenmp-simd
+C ObjC C++ ObjC++ Var(flag_openmp_simd)
+Enable OpenMP's SIMD directives
+
foperator-names
C++ ObjC++
Recognize C++ keywords like \"compl\" and \"xor\"