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 d9c80a5a7aad1d603ae78ac4ace6d38a86e28310..275d7879fd6fb45ec3da25afd1f147006f01dd13 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 0d7aa3feb4828100f4ad8981c0d22bd6d5fe8ed1..b83c584c701952daa608f1b5cb4f29118a92d136 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;
        }
     }