SlickEdit Product Discussion > SlickEdit®

C code NOT inactivated if compiler switches on multiple lines

(1/1)

at5dapa1:
This modified code works:

--- Code: ---#if defined(_SILICON_LABS_32B_SERIES_1) && defined(_EFR_DEVICE) && (_SILICON_LABS_GECKO_INTERNAL_SDID >= 84)
  MSC->CTRL |= 0x1UL << 8;  // displayed as inactive code
#endif

--- End code ---

This original code, doesn't:

--- Code: ---#if defined(_SILICON_LABS_32B_SERIES_1) \
  && defined(_EFR_DEVICE) && (_SILICON_LABS_GECKO_INTERNAL_SDID >= 84)
  MSC->CTRL |= 0x1UL << 8;  // NOT displayed as inactive code
#endif

--- End code ---

The defines are defined project_cpp.h:

--- Code: ---#define _SILICON_LABS_32B_SERIES_1
#define _SILICON_LABS_GECKO_INTERNAL_SDID 106
#undef _EFR_DEVICE

--- End code ---




--- Quote ---SlickEdit Pro 2022 (v27.0.0.6 64-bit Qt5)

Serial number: WB951378
Licensed number of users: Single user
License file: C:\ProgramData\slickedit\27\slickedit.lic

Build Date: October 18, 2022
Emulation: CUA

OS: Windows 10 x64
OS Version: 10.00.0 
Memory: 19% Load, 6359MB/32464MB Physical, 8620MB/32464MB Page File, 5289MB/134217727MB Virtual
Shell Information: C:\Windows\system32\cmd.exe /q
Screen Size: 1920 x 1200 (0 0 1920 1200), 1920 x 1200 (-1920 0 1920 1200)

Project Type: Cpp
Language: .h (C/C++)
Encoding: ACP (1252)

Installation Directory: D:\tools\totalcmd\Tools\dev\SlickEdit\core\27.0.0\ (non-removable drive,NTFS,264324MB free)
Configuration Directory: D:\tools\totalcmd\Tools\dev\SlickEdit\config\27.0.0\ (non-removable drive,NTFS,264324MB free)
Spill File: C:\Users\work\AppData\Local\Temp\$slk.8228 (non-removable drive,NTFS,375090MB free)

--- End quote ---

patrick:
Reproduced, we'll take a look at it.  Thanks for the report.

Clark:
This is a limitation that is not easy to work around. Has to do with the color coding engine processing a line at a time and not having a way to look ahead and fetch subsequent lines. This same limitation is the reason that using a regular expression in the color coding engine can't match data on two separate lines. Definitely can't fix this in a point release. Might be possible to hack in some sort of line look ahead. Wouldn't fix the multi-line regex limitation.

Navigation

[0] Message Index

Go to full version