*
*Home|Chinese|Japanese*About ARM|Forums|Events|News|Employment|Contact Us|Investors*
dotted rule
*ARM - the architecture for the digital worldARM - the architecture for the digital world
search
*
*
***
*MARKETS:PRODUCTS & SOLUTIONS:CONNECTED COMMUNITY:TECHNICAL SUPPORT:DOCUMENTATION*
*
technical support
*
*
****
*.Technical Support
*
*
*>>Home Page*
*
*.Obtaining Support*
*
*.FAQs*
*
**Development Tool FAQs*
**IP FAQs*
**Embedded Software FAQs*
**Artisan Physical IP FAQs (Login Required)*
*
*.Downloads*
*
*.Documentation*
*
*.Training*
*
*.Where To Buy*
*
*.Keil MCU Tools*
*
*.What's New*
*
*.ARM Newsgroups*
*
*.Active Assist On-site Services*
*
*
*
technical support FAQsask ARM*
*

Technical Support Search
*     (Advanced Search)
  FAQs   Documentation   Downloads   Forums

*

 
downarrowarmcc/tcc: 'junk at end of #endif line - ignored'
Applies to: Compilers, Software Development Toolkit (SDT)

Description
The ARM C compiler warns of 'junk at end of #endif line - ignored'

Solution
Some other C compilers may silently ignore characters following arguments to preprocessor directives. The ARM C compiler is much stricter in its interpretation of the C language. The problem is probably caused by code like:

#ifdef SOMETHING
:
#endif SOMETHING

The #endif does not expect or require any argument. Enclosing the trailing part of the line in a comment should cure the problem:

#endif /* SOMETHING */ 

Another workaround is to configure the compiler options to disable this type of warning. The compiler option for this is '-Ep'.
For the ARM Project Manager (APM), select Project->Tool Configuration->cc->set, then select the 'Errors' tab and uncheck the 'Junk at end of #endif/#else/#undef' box.






back to top

*
**
*4 dots*Other ARM Websites
*
shadow *LEGAL STATEMENTshadow