bug-cflow
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cflow] other attribute parsing test case


From: Britton Kerin
Subject: [bug-cflow] other attribute parsing test case
Date: Wed, 6 Apr 2016 23:25:44 -0800

Using __attribute__ sort of in the middle of a declaration seems to
cause trouble as shown below.  I didn't know you could declare attrs
like this and GCC manual might not be explicitly supporting this form
(honestly I couldn't tell) but the code I'm working on does do it.

$ cat test2.c

static void
__attribute__((unused)) test (void)
{
  int foo = 42;

  foo = foo;
}

int
main (void)
{
  test ();

  return 0;
}
$ gcc -Wall -Wextra -Werror test2.c
$ cflow --symbol __attribute__:wrapper test2.c
cflow:test2.c:7: foo redefined
cflow:test2.c:5: this is the place of previous definition
main() <int main (void) at test2.c:11>
$



reply via email to

[Prev in Thread] Current Thread [Next in Thread]