buglwIP - A Lightweight TCP/IP stack - Bugs: bug #27324, DHCP_GLOBAL_XID_HEADER does not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27324: DHCP_GLOBAL_XID_HEADER does not work with ARM Realview Compiler

Submitted by:  Michael Frisbie <mfrisbie>
Submitted on:  Wed 26 Aug 2009 03:06:31 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: Other

(Jump to the original submission Jump to the original submission)

Sat 29 Aug 2009 07:33:59 AM UTC, comment #7:

Compiler bug -> invalid

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 26 Aug 2009 09:34:06 PM UTC, comment #6:

Not very risky at all since ANSI C 1989 (at least - I didn't go back further) includes support for macros being allowed for the filename in the #include preprocessor directive.

Bill Auerbach <billauerbach>
Wed 26 Aug 2009 09:08:04 PM UTC, comment #5:

I did regard this piece of code a bit risky when we introduced it (e.g. MSVC Intellisense gets a bit confused by it, too). However, it shouldn't prevent compiling the file, so I'd regard this as a bug in the compiler, too.

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 26 Aug 2009 04:22:28 PM UTC, comment #4:

If you tried

#undef DHCP_GLOBAL_XID_HEADER
#ifdef DHCP_GLOBAL_XID_HEADER
#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */
#endif

and you get the error, it's a (serious) bug. Lines other than #elif, #else and #endif following false #if's are to be completely ignored until the matching #endif is parsed. I'm curious what:

#if 0
#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */
#endif

does. As Simon suggested, you could also try something like:

#ifndef DHCP_GLOBAL_XID_HEADER
#define DHCP_GLOBAL_XID_HEADER <stdio.h>
#endif
#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */

In any case, I think you've got something worth reporting to the Realview people. Perhaps reduce this to a one-file example to prove it out before sending the report in.

Bill Auerbach <billauerbach>
Wed 26 Aug 2009 04:15:34 PM UTC, comment #3:

I used both #undef and #define, and it doesn't change the error in any way. I'm using the following compiler version:

ARM/Thumb C/C++ Compiler, RVCT3.1 [Build 761]

Perhaps the preprocessor scans all the header dependencies first before doing any other preprocessing?

Michael Frisbie <mfrisbie>
Wed 26 Aug 2009 04:00:44 PM UTC, comment #2:

This does sound like a compiler bug or problem. As if they took the token following the #include and made it lower case for some reason and didn't handle the case that the #include name can be a macro definition. But then, why didt the #ifdef path get parsed? If DHCP_GLOBAL_XID_HEADER isn't defined it's definitely a bug.

Bill Auerbach <billauerbach>
Wed 26 Aug 2009 03:36:16 PM UTC, comment #1:

Did you define DHCP_GLOBAL_XID_HEADER somewhere? If not, I think it's quite strange that the compiler tries to parse an include that is not active.

Could you try to define DHCP_GLOBAL_XID_HEADER to something like <string.h> to see whether that's a workaraound?

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 26 Aug 2009 03:06:31 PM UTC, original submission:

The following sequence in src/core/dhcp.c does not work with the ARM Realview compiler.

#ifdef DHCP_GLOBAL_XID_HEADER
#include DHCP_GLOBAL_XID_HEADER /* include optional starting XID generation prototypes */
#endif

Compiling this file results in the following error:

Error don't know how to build or scan dhcp_global_xid_header

Michael Frisbie <mfrisbie>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by billauerbach (Posted a comment)
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by mfrisbie (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 29 Aug 2009 07:33:59 AM UTCgoldsimonOpen/ClosedOpen=>Closed
    Sat 29 Aug 2009 07:33:58 AM UTCgoldsimonStatusNeed Info=>Invalid
    Wed 26 Aug 2009 03:36:16 PM UTCgoldsimonStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1