This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 254472 - printf() and const
Summary: printf() and const
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: danilasergeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 09:00 UTC by soldatov
Modified: 2015-08-19 10:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2015-08-18 09:00:35 UTC
#include <stdio.h>

int foo(const int a) {
    printf("- %d\n", a); // red line (error)
    return 40;
}

int main() {
    int x = 1;
    foo(1.0 + 2.0);
    foo(x);
    return 0;
}
Comment 1 danilasergeyev 2015-08-19 10:35:49 UTC
fixed among others in change set:
https://hg.netbeans.org/cnd-main/rev/5899b8e0e9e8