bugGNU cflow - Bugs: bug #31792, function calls inside functions:...


bug #31792: function calls inside functions: 1) returning struct * + 2) old style arguments declaration

Submitted by:  None
Submitted on:  Sun 05 Dec 2010 11:06:21 AM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Sergey Poznyakoff <gray>
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 07 Feb 2014 02:27:19 PM UTC, comment #1:

Fixed by commit 0f28750f.

Sergey Poznyakoff <gray>
Project AdministratorIn charge of this item.
Sun 05 Dec 2010 11:06:21 AM UTC, original submission:

.) cflow does not see calls to function inside a function
1) returning a pointer to a struct
2) with arguments declared using old style (Kernighan & Ritchie)
instead of "modern" ANSI C style


System Setup
On GNU/Linux ubuntu 9.10 karmic
kernel: Linux 2.6.31-22-generic)
architecture: i386
$ uname -a
Linux henri 2.6.31-22-generic #68-Ubuntu SMP Tue Oct 26 16:38:35 UTC 2010 i686 GNU/Linux

cflow version

-----%< cflow-OK.c -------------------------------------------
struct s * foo (int arg)
----->% cflow-OK.c -------------------------------------------

-----%< cflow-BUG.c -------------------------------------------
struct s * foo (arg)
int arg;
----->% cflow-BUG.c -------------------------------------------

$ cflow --xref cflow-OK.c
bar cflow-OK.c:3
foo * cflow-OK.c:1 struct s foo (int arg)

$ cflow --xref cflow-BUG.c
foo * cflow-BUG.c:1 struct s foo (arg)

The call to bar() DOES NOT SHOW UP

you need BOTH
1) old style arguments declaration
2) function returning struct of pointer to a struct

to trigger the bug. otherwhise old style arguments declarations or
functions returning struct or pointer to struct are handled correctly
Even inserting a declaration for bar... and making sure that
"gcc -Wall -ansi -pedantic" accepts the test case does not help:

-----%< cflow-STRICT.c -------------------------------------------
extern struct s * bar(void);
struct s * foo (arg)
int arg;
return (bar());
----->% cflow-STRICT.c -------------------------------------------



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gray (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Feb 2014 02:27:19 PM UTCgrayStatusNone=>Fixed
      Assigned toNone=>gray

    Back to the top

    Powered by Savane 3.1-cleanup1