- Launching the command
./sgrep -o "\n%r\n" 'FIRST_IN(("if" .. ("(" .. ")")), "if" not in (C_COMMENTS
or C_PREPROCS) .. ("(" .. ")"))' file.c
- On the following file (file.c):
#ifdef
#else
#define
#endif
#ifdef
#else
#define F (param)
#endif
C();
C();
if (C) {
}
- Leads to the following error message:
sgrep: common.c:845: check_add_region: Assertion `l->length==0 ||
l->sorted!=START_SORTED || ((l)->last->list[(l)->length-1]).start<s ||
(((l)->last->list[(l)->length-1]).start=\=s &&
((l)->last->list[(l)->length-1]).end<e)' failed.
Aborted (core dumped)
Please confirm it can be reproduced.
Suggested fix: Warn user who read man (in BUGS section) if appropriate.