public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/45123]  New: -pedantic warning about string inside __asm
@ 2010-07-29  3:59 roland at redhat dot com
  2010-07-29  9:38 ` [Bug c/45123] " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: roland at redhat dot com @ 2010-07-29  3:59 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

With this file (that's a string of 512 spaces):

main()
{
  __asm("                                                                      
                                                                               
                                                                               
                                                                               
                                                                               
                                                                               
                                         ");
}

gcc -o asmloser asmloser.c -ansi -pedantic
asmloser.c: In function ‘main’:
asmloser.c:3: warning: string length ‘512’ is greater than the length ‘509’ ISO
C90 compilers are required to support

Since we are inside __asm here and that circumvents -pedantic, the pedantic
warning should not apply to the string inside, which isn't even a C string
constant, it's just GCC extension syntax.


-- 
           Summary: -pedantic warning about string inside __asm
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: roland at redhat dot com


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/45123] -pedantic warning about string inside __asm
  2010-07-29  3:59 [Bug c/45123] New: -pedantic warning about string inside __asm roland at redhat dot com
@ 2010-07-29  9:38 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-29  9:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-29 09:37 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-29 09:37:52
               date|                            |


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-29  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-29  3:59 [Bug c/45123] New: -pedantic warning about string inside __asm roland at redhat dot com
2010-07-29  9:38 ` [Bug c/45123] " rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).