This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28697] New: Behavior of __extension__ within __asm__ changed with regards to 3.4.4


Hi,

I compile my code with -pedantic.  My code includes inline assembler, which I
write using __asm__ to avoid warnings.  The string literal containing the
inline code is longer than maximum length allowed by standard C and in GCC
3.4.4, it was possible to prefix the string with __extension__ to avoid the
warning:

warning: string length '1151' is greater than the length '509' ISO C89
compilers are required to support.

So my code looks like this:

__asm__ volatile ( __extension__ "..." ...

and compiles without warnings.

In GCC 4.1, with this syntax, I get an error and a warning:

context_switch.h:12: error: expected string literal before '__extension__'
context_switch.h:12: warning: string length '1151' is greater than the length
'509' ISO C89 compilers are required to support

Removing __extension__ leads to the single warning:

context_switch.h:12: warning: string length '1151' is greater than the length
'509' ISO C89 compilers are required to support

Please reinsert the former behavior of GCC, i.e., allow __extension__ for the
__asm__ string literal, to allow compilation without warnings!

Regards,

Konrad Schwarz


-- 
           Summary: Behavior of __extension__ within __asm__ changed with
                    regards to 3.4.4
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: konrad dot schwarz at siemens dot com
  GCC host triplet: Probably mingw
GCC target triplet: arm-none-eabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28697


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]