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 82802 - Code completion list contains few mathematical functions
Summary: Code completion list contains few mathematical functions
Status: RESOLVED DUPLICATE of bug 159229
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-16 11:50 UTC by soldatov
Modified: 2010-04-16 11:07 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 2006-08-16 11:50:33 UTC
- Create C project:
math.c
--------------------------------

#include <math.h>

int main() {
  
  return(0);
}

--------------------------------
- Go to main function
- Type "cos" and press Ctrl-space
==>
Code completion list contains:
double cos(double __x)
double cosh(double __x)

Should be:
double cos(double __x)
float cosf(float __x)
double cosh(double __x)
float coshf(float __x)
long double coshl(long double __x)
long double cosl(long double __x)
Comment 1 Alexander Simon 2006-10-13 16:47:12 UTC
not repeatable
Comment 2 soldatov 2006-11-01 11:16:41 UTC
I can reproduce on Fedora Core 3 and SunOS(sparc) 5.9
It is platform or compiler specific bug.
Comment 3 Alexander Simon 2006-11-02 08:31:05 UTC
Platform independent test case:
---------------------fedora.h-------------------------------
#define __THROW
#define __CONCAT(x,y)    x ## y

#define __MATHCALL(function,suffix, args)    \
  __MATHDECL (_Mdouble_,function,suffix, args)

#define __MATHDECL(type, function,suffix, args) \
  __MATHDECL_1(type, function,suffix, args); \
  __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
#define __MATHCALLX(function,suffix, args, attrib)    \
  __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
#define __MATHDECLX(type, function,suffix, args, attrib) \
  __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
  __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
#define __MATHDECL_1(type, function,suffix, args) \
  extern type __MATH_PRECNAME(function,suffix) args __THROW
#define __MATH_PRECNAME(name,r)    __CONCAT(name,r)
---------------------fedora_math.h-------------------------------
__MATHCALL (tan,, (_Mdouble_ __x));
---------------------fedora.cc-------------------------------
#include "fedora.h"
#define _Mdouble_         double
#include "fedora_math.h"
#undef _Mdouble_
#define _Mfloat_         float
#define _Mdouble_         _Mfloat_
#include "fedora_math.h"
void fedora(){
 tan//<--CTRL+SPACE  completion list should contain two  methods "tan()".
}
---------------------------------------------------------------
Comment 4 Alexander Pepin 2008-07-31 16:38:55 UTC
Code completion shows only functions available on the current platform. This is correct.
Comment 5 soldatov 2008-08-01 15:33:03 UTC
No. Problem is not fixed.
Comment 6 Vladimir Voskresensky 2009-09-25 14:05:56 UTC
consider for the next release due to lack of resources
Comment 7 nnnnnk 2010-04-16 11:07:28 UTC
In general it's include with different macros.

*** This bug has been marked as a duplicate of bug 159229 ***