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/63324] New: hexidecimal integer constant and addition


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63324

            Bug ID: 63324
           Summary: hexidecimal integer constant and addition
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargl at gcc dot gnu.org

#include <stdio.h>

int
main(void)
{
        int i;
        i = 0x3ffe+63; printf("%x\n", i);
        return 0;
}

% gcc47 -c ~/tmp/a.c
/home/kargl/tmp/a.c: In function 'main':
/home/kargl/tmp/a.c:7:6: error: invalid suffix "+63" on integer constant

+ is a binary operator. 0x3ffe is a hexidecimal constant and 63
is a decimal constant.


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