|
From: Cary R. <cy...@ya...> - 2014-07-11 17:16:29
|
Hi Larry,
If I understand this correctly #3 seems like too much work, #4 looks wrong since these are not static functions they are extern. I understand not wanting the warnings so that implies that #2 is the best choice. Can sys_priv.h be used to define these functions? I'm guessing most of the files already include it. Or maybe we need files for each table type (normal, math, v2009, etc.).
Cary
On Friday, July 11, 2014 9:33 AM, Larry Doolittle <ldo...@re...> wrote:
Friends -
Looking in vpi at all the foo_register() routines, which account for
almost all of the remaining missing-prototypes warnings flagged.
What to do? I see four approaches, each has problems.
1. Leave them the way they are, and expect people like me who chase
lint to filter out the warnings as spurious. Where and how would we
document that?
2. Move the block of 20 "extern void foo_register(void);" declarations
in sys_table.c into a .h file, which is then #included into each of the
C functions. Introduces a spurious cross-dependency between each of the
modules.
3. Create 20 new .h files, each declaring foo_register(void). #include
all 20 of these files in sys_table.c. Creates quite a bit of fluff for
not much benefit.
4. Just paper over the warning in each of the modules by
static void foo_register(void);
static void foo_register(void)
{
blah blah blah
}
Minimal change, gets rid of the warnings. Doesn't really check for
argument mismatches, but in this case there are no arguments to check.
- Larry
------------------------------------------------------------------------------
_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel |