Author Topic: Function parameters showing up as undefined symbols  (Read 219 times)

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Function parameters showing up as undefined symbols
« on: September 11, 2022, 10:02:25 pm »
When I add #if/#endif around some functions, the function parameters show up as undefined symbols.

I'll see if I can post some sanitized code.

Using v27 beta 1 (could not get v27 beta 2 to run).

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #1 on: September 16, 2022, 06:03:25 pm »
I can't get sanitized code to show the symptom...



joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #2 on: September 16, 2022, 06:05:40 pm »
The unknown symbol highlight occurs when functions and/or structs/arrays are guarded by #if, and appears to not occur when guarded by #ifdef.

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #3 on: September 16, 2022, 06:12:39 pm »
( and btw, the code guarded by #if is not highlighting as inactive code )

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 489
Re: Function parameters showing up as undefined symbols
« Reply #4 on: September 19, 2022, 08:57:30 pm »
C or C++, or another language?  Is the #if outside the entire function, or nested within the function argument list ?

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #5 on: September 20, 2022, 04:27:49 am »
C

#if is outside the entire function or the entire struct.

Each struct and each function has its own #if X where X is the same.



joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #6 on: September 20, 2022, 10:15:30 pm »
Is there a macro/tool that obfuscates source code to avoid violating proprietary-ness...?
« Last Edit: September 20, 2022, 10:29:10 pm by joecar »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 489
Re: Function parameters showing up as undefined symbols
« Reply #7 on: September 20, 2022, 10:19:16 pm »
Run the command "obfuscate-current-file".  It does a wicked good job.

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #8 on: September 20, 2022, 10:29:28 pm »
Thanks.

joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #9 on: September 20, 2022, 10:37:33 pm »
See attached obfuscated file...

look at lines 298 (struct) and 397 (function).

This obfuscated file actually shows more unknown symbol highlights that the original.



joecar

  • Senior Community Member
  • Posts: 363
  • Hero Points: 9
  • engineer/gearhead
Re: Function parameters showing up as undefined symbols
« Reply #10 on: September 20, 2022, 11:04:22 pm »
Obfuscated images attached, see unknown symbols (red on yellow).
« Last Edit: September 23, 2022, 05:30:57 pm by joecar »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3723
  • Hero Points: 489
Re: Function parameters showing up as undefined symbols
« Reply #11 on: September 26, 2022, 08:30:34 pm »
Reproduced.