summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-01-04 23:16:14 +0100
committerMattias Andrée <maandree@kth.se>2022-01-04 23:16:14 +0100
commit5ebd641042157fc2b6d80c5a31f34d7bae9bb0e7 (patch)
treeb07b1bebb7f77fbc8459aa5f6fc13da99942d59f
parentRemove unused files from .gitignore and make clean (diff)
downloadmakel-5ebd641042157fc2b6d80c5a31f34d7bae9bb0e7.tar.gz
makel-5ebd641042157fc2b6d80c5a31f34d7bae9bb0e7.tar.bz2
makel-5ebd641042157fc2b6d80c5a31f34d7bae9bb0e7.tar.xz
Add todos for comments
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--makel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/makel.c b/makel.c
index eeda146..e68f68a 100644
--- a/makel.c
+++ b/makel.c
@@ -214,7 +214,7 @@ main(int argc, char *argv[])
}
while (lines[i].continuation_joiner) {
- if (memchr(lines[i].data, '#', lines[i].len)) {
+ if (memchr(lines[i].data, '#', lines[i].len)) { /* TODO could also be a non-standard internal macro */
warnf_confusing(WC_COMMENT_CONTINUATION,
"%s:%zu: using continuation of line to continue "
"a comment on the next line can cause confusion",
@@ -222,6 +222,15 @@ main(int argc, char *argv[])
}
i += 1;
}
+ /* TODO # in comment lines are very problematic. In make(1)
+ * a comment can have a line continuation, but in sh(1)
+ * comments cannot have line continuation. Furthermore,
+ * any #, even if there is a be backslashed or in quotes,
+ * becomes a comment; because of this, some implementations
+ * of make do not recognise comments in command lines and
+ * instead rely on sh(1) ignoring comments (this however
+ * breaks POSIX compliance). */
+ /* TODO check if a # appears inside quotes or after a backslash */
}
free(lines);