+2014-05-08 Marek Polacek <polacek@redhat.com>
+
+ PR c/61077
+ * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
+ parameter type of main.
+
2014-05-07 DJ Delorie <dj@redhat.com>
* c-cppbuiltin.c (print_bits_of_hex): New.
if (type == void_type_node || type == error_mark_node )
break;
+ tree t = type;
+ if (TYPE_ATOMIC (t))
+ pedwarn (input_location, OPT_Wmain,
+ "%<_Atomic%>-qualified parameter type %qT of %q+D",
+ type, decl);
+ while (POINTER_TYPE_P (t))
+ {
+ t = TREE_TYPE (t);
+ if (TYPE_ATOMIC (t))
+ pedwarn (input_location, OPT_Wmain,
+ "%<_Atomic%>-qualified parameter type %qT of %q+D",
+ type, decl);
+ }
+
++argct;
switch (argct)
{
+2014-05-08 Marek Polacek <polacek@redhat.com>
+
+ PR c/61077
+ * c-decl.c (start_function): Warn for _Atomic-qualified return type
+ of main.
+
2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
Mike Stump <mikestump@comcast.net>
Richard Sandiford <rdsandiford@googlemail.com>
if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (decl1)))
!= integer_type_node)
pedwarn (loc, OPT_Wmain, "return type of %qD is not %<int%>", decl1);
+ else if (TYPE_ATOMIC (TREE_TYPE (TREE_TYPE (decl1))))
+ pedwarn (loc, OPT_Wmain, "%<_Atomic%>-qualified return type of %qD",
+ decl1);
check_main_parameter_types (decl1);
+2014-05-08 Marek Polacek <polacek@redhat.com>
+
+ PR c/61077
+ * gcc.dg/pr61077.c: New test.
+
2014-05-08 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray_collectives_1.f90: New.
--- /dev/null
+/* PR c/61077 */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -Wall" } */
+
+_Atomic int
+main (_Atomic int argc, _Atomic char **argv)
+/* { dg-warning "qualified return type" "return" { target *-*-* } 6 } */
+/* { dg-warning "qualified parameter type.*int" "parameter" { target *-*-* } 6 } */
+/* { dg-warning "qualified parameter type.*char" "parameter" { target *-*-* } 6 } */
+{
+ return 0;
+}