[cfe-users] warning: disabled expansion of recursive macro

Andrew Pennebaker andrew.pennebaker at gmail.com
Tue Aug 5 14:10:21 PDT 2014


When I try to compile parhello-libev.c with clang -Weverything, it prints a
spurious warning about recursive macros.

Source:
https://github.com/mcandre/parhello/tree/master/c/parhello-libev

Trace:

$ make
clang -O2 -Wall -Wextra -Wmost -Weverything -o parhello parhello.c -lev
parhello.c:17:16: warning: disabled expansion of recursive macro
[-Wdisabled-macro-expansion]
    putc(data, stdout);
               ^
/usr/include/stdio.h:173:16: note: expanded from macro 'stdout'
#define stdout stdout
               ^
/usr/include/stdio.h:585:39: note: expanded from macro 'putc'
#define putc(_ch, _fp) _IO_putc (_ch, _fp)

System:

$ specs clang os
Specs:

specs 0.8
https://github.com/mcandre/specs#readme

clang --version
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM
3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:    trusty

This oddity was noted some time ago (
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130128/073127.html).
Any update on this behavior?

-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20140805/b10c1cfd/attachment.html>


More information about the cfe-users mailing list