[Bug middle-end/70125] attributes diagnostics missing essential context

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Feb 3 22:58:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70125

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |middle-end
      Known to fail|                            |9.0

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
No progress in GCC 9.0.  This problem also isn't limited to C++.  It affects
all front-ends that support attributes that take arguments.  The test case in
comment #0 can be modified to illustrate the same issue in C source code:

$ cat pr70125.C && gcc -S -Wall -xc pr70125.C
void f (void*);

__attribute__ ((always_inline, artificial)) static inline
void g (int N)
{
  typedef int V __attribute__ ((vector_size (N)));
  V v = { 0 };
  f (&v);
}

void h (void)
{
  g (16);
  g (31);
}
pr70125.C: In function ‘g’:
pr70125.C:6:3: warning: ‘vector_size’ attribute ignored [-Wattributes]
    6 |   typedef int V __attribute__ ((vector_size (N)));
      |   ^~~~~~~


More information about the Gcc-bugs mailing list