#1694 -M (& -MM) not suppressing warnings

closed-fixed
5
2013-05-25
2010-10-16
No

The -M and -MM command line options are expected to suppress warnings, and did so in #6000

For example, with bug.c containing...

#define BOB 1
#define BOB 2
void main(void) { }

With #6028 we get...

$ ~/sdcc-6028/bin/sdcc -M bug.c
bug.c:2:1: warning: "BOB" redefined
bug.c:1:1: error: this is the location of the previous definition
bug.rel: bug.c

v3.0.0 rc1 is the same...

$ ~/sdcc-3.0.0-rc1/bin/sdcc -M bug.c
bug.c:2:1: warning: "BOB" redefined
bug.c:1:1: error: this is the location of the previous definition
bug.rel: bug.c

but with # 6000 ...

$ ~/sdcc-6000/bin/sdcc -M bug.c
bug.rel: bug.c

and for comparison, with gcc v4.2.1...

$ gcc -M bug.c
bug.o: bug.c

This give unexpected behaviour with dependency generation, which has broken my build system on quite a few projects.

Discussion

  • Borut Ražem

    Borut Ražem - 2010-10-17

    Fixed in svn revision #6032.

    Borut

     
  • Borut Ražem

    Borut Ražem - 2010-10-17
    • labels: --> C Preprocessor
    • milestone: --> fixed
    • assigned_to: nobody --> borutr
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks