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

 
 
Show feedback again

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: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sun 05 Dec 2010 11:06:21 AM UTC, original submission:

Summary
=======
.) 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

Details
=======

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
-------------
ftp://download.gnu.org.ua/pub/release/cflow/cflow-1.3.tar.gz

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

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

Results
-------
$ 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

Remarks
-------
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 -------------------------------------------

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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):

 

 

No Changes Have Been Made to This Item
Show feedback again

Back to the top


Powered by Savane 3.1-cleanup