On Sun, Feb 7, 2016 at 11:36 AM, Pavan Maddamsetti
<[email protected]> wrote:
> /*
> * Here 's the code. Try commenting out the line that says "WTF mate!"
> * On my machine, the loop never returns. Somehow printf makes it work.
> * Compiler bug or not? Please compile and confirm.
Compiler bug should always be the *last* thing you conclude, as it
means you've given up on looking for the bug in your own code.
> List *
> merge(List *ap, List *bp)
> {
> List *listp;
> List **last;
> last = &listp;
>
> for (;;) {
> if (ap == NULL) {
> (*last)->next = bp;
Where does listp point?
Philip Guenther