c-decl.c (grokdeclarator): Call error_at instead of error and pass LOC to it.
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Aug 2015 11:26:39 +0000 (11:26 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 12 Aug 2015 11:26:39 +0000 (11:26 +0000)
* c-decl.c (grokdeclarator): Call error_at instead of error and pass
LOC to it.

From-SVN: r226807

gcc/c/ChangeLog
gcc/c/c-decl.c

index d9c80a5..275d787 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-12  Marek Polacek  <polacek@redhat.com>
+
+       * c-decl.c (grokdeclarator): Call error_at instead of error and pass
+       LOC to it.
+
 2015-08-03  Marek Polacek  <polacek@redhat.com>
 
        PR c/67088
index 0d7aa3f..b83c584 100644 (file)
@@ -6233,9 +6233,9 @@ grokdeclarator (const struct c_declarator *declarator,
       if (type_quals & TYPE_QUAL_ATOMIC)
        {
          if (name)
-           error ("bit-field %qE has atomic type", name);
+           error_at (loc, "bit-field %qE has atomic type", name);
          else
-           error ("bit-field has atomic type");
+           error_at (loc, "bit-field has atomic type");
          type_quals &= ~TYPE_QUAL_ATOMIC;
        }
     }