GNOME Bugzilla – Bug 566128
Wrong picture of recursive function
Last modified: 2018-07-30 10:24:52 UTC
When having a recursive function, the function is depicted wrong in the call graph in the .h file and in the caller graph with the .c file. (This function might be related to bug 527049 which deals with a non recusive function but defined in .h file as well). Example code: bug_r.h: int bug_r(int val); bug_r.c: #include "bug_r.h" int bug_r(int val) { if (val <= 1) return 1; return(val * bug_r(val -1)); }
Created attachment 125574 [details] Project with source files and resulting doxygen output
In case of Fortran no graph is displayed at all. Example code: recursive integer function rec_fie(i) integer i if (i == 0) then rec_fie = 0 else rec_fie = i + rec_fie(i-1) endif end recursive subroutine rec_sub(i, res) integer i integer res if (i == 0) then res = 0 else call rec_sub(i-1, res) res = res + i endif end
Bug is still open in DoxyGen Version 1.8.7. Here is one additional example. ----------------- void tic() { tac(); } void tac() { toc(); } void toc() { tic(); } int fact(int n) { int x=1; while(n>1) { x=n*fact(n-1); //recursive function in C } return(x); } void main() { fact(5); tic(); }
Created attachment 278448 [details] Call graph does not show recursive functions Call graph does not show recursive functions
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to https://github.com/doxygen/doxygen/issues All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github. Hence I am closing this GNOME Bugzilla ticket. Please use the corresponding ticket in Github instead. Thanks a lot!