URL: <http://savannah.gnu.org/bugs/?33958>
Summary: Segfault in a 'define' with sort, foreach and newlines... Project: make Submitted by: None Submitted on: Fri 05 Aug 2011 04:58:50 PM UTC Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.82 Operating System: Any Fixed Release: None Triage Status: None _______________________________________________________ Details: Hi, This Makefile segfault for me (make sure to put the space before $i) : --- 8< ----- SEGFAULT -------------- define x $(sort $(foreach i,1 2, $i)) endef all:; echo $(strip $(call x)) --- 8< ----------------------------- If you remove the space before $i, or add a \ before the newline above, it's ok. This is 100% reproducible. For instance this one is ok: --- 8< ----- OK -------------------- define x $(sort $(foreach i,1 2, $i)) endef all:; echo $(strip $(call x)) --- 8< ----------------------------- So there's probably a bug somewhere? Subsidiary question: is the faulty Makefile syntactically correct? (the absence of \ is ok according to my understanding of 'define', but maybe I'm wrong). Regards, Anthony Mallet _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?33958> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make