Author Topic: function-argument-help issue  (Read 4042 times)

hs2

  • Senior Community Member
  • Posts: 2764
  • Hero Points: 292
function-argument-help issue
« on: July 21, 2007, 05:55:08 PM »
@SlickTeam:
I recognized a strange issue with the fct. arg. help when listing compatible variables.

Example 1:
Code: [Select]
void foo ( int32_t a );

void bar ( void )
{
   int32_t b = 0x0B;
   int c = 0x0C;

   foo ( <cursor here -> function-argument-help>
}
Both locals 'b 'and 'c' are listed as compatible parameters. That's what I expected.

Example 2:
Code: [Select]
void foo ( int a );

void bar ( void )
{
   int32_t b= 0x0B;
   int c = 0x0C;

   foo ( <cursor here -> function-argument-help>
}
Only 'c' ist listed as compatible parameter. What about 'b' especially with respect to the 1st example ?
('int32_t' is typedef'd in <stdint.h> and IS compatible with 'int' in my case)

Could you please clarify ?

Edit: I think it's a non-issue b/c all the trouble seems to be caused by the <stdint.h> macro nightmare :(
Finally I found some CPP settings/workarounds which provide more or less acceptable results.
There is a related question: What's the relationship of the C-Compiler parser support header file and usercpp.h ?
I thought the compiler tagfile is generated only considering the <compiler>cpp.h, right ?
But it seems that usercpp.h is also used ???

And how can I achieve that the pre-processing horror below is tagged properly ?
Tagging results in 3 int16_t typedefs which causes e.g. fct.arg. help to get confused somehow (my initial problem).
Code: [Select]
#define  SCHAR_MAX         0x7f
#define  SHRT_MAX          0x7fff
#define  INT_MAX           0x7fffffffL

#define __STDINT_EXP(x)    x

#if __STDINT_EXP(SHRT_MAX) == 0x7fff
typedef signed short int16_t;
typedef unsigned short uint16_t;
#define __int16_t_defined 1
#elif __STDINT_EXP(INT_MAX) == 0x7fff
typedef signed int int16_t;
typedef unsigned int uint16_t;
#define __int16_t_defined 1
#elif __STDINT_EXP(SCHAR_MAX) == 0x7fff
typedef signed char int16_t;
typedef unsigned char uint16_t;
#define __int16_t_defined 1
#endif

Edit2:
Sent to support.

Thanks a lot,
HS2
« Last Edit: July 21, 2007, 09:13:51 PM by hs2 »

hs2

  • Senior Community Member
  • Posts: 2764
  • Hero Points: 292
Re: function-argument-help issue
« Reply #1 on: July 25, 2007, 11:10:50 PM »
Ok- now it's time A BIG HERO POINT for Dennis - thank's a lot !

@Other maintenance contractors: There is hotfix (Windows only) available from support which solves some issues with C/C++ preprocessing.
Stumbled into it working on a GNU/cygwin based project which uses a heap load of preprocessing/macro stuff.

HS2