| Summary: | Comparing function types with empty parameter lists | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Tom Longridge <tom.longridge> |
| Component: | cdt-parser | Assignee: | Project Inbox <cdt-parser-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | Mike Kucera <mikekucera> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Tom Longridge
Different to how this works in C++, in C the declaration 'void func()' means that the parameter list is unspecified, which is different from 'void func(void)' meaning that the function has an empty parameter list.
For example:
void f1() {
f1(1); // This is ok.
}
void f2(void) {
f2(1); // This is a compile error
}
|