Skip to content

Function prototypes not generated for variable argument functions [imported] #992

Closed
@cmaglie

Description

@cmaglie

This is Issue 992 moved from a Google Code project.
Added by 2012-07-27T17:08:51.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, Component-IDE

Original description

What steps will reproduce the problem?

  1. Make new Arduino project having a main file and additional ".ino" file.
  2. Into additional ".ino" file insert a function definition having C style variable arguments.
    void nice_func(const char *fmt, ...)
    {
    // do nothing
    }
  3. Now insert call to that function into main file. For example inside
    loop function:
    void loop()
    {
    nice_func("test", 1);
    }

During compilation of the whole project Arduino gives error that
'nice_func' was not declared in this scope.

When we peek into temporary build directory then we can see that Arduino is not inserting that function prototype definition into final .cpp file.

For example if you change inside additional ".ino" file this function definition to:
void nice_func(const char *fmt, int i)
{
// do nothing
}
and now it'll compile without errors.

It seems that file building functionality (part that is inserting prototype definitions)
inside Arduino is skipping functions having "..." inside arguments area.

I'm using Arduino 1.0.1 on WinXP x64.

Metadata

Metadata

Assignees

Labels

Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions