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/60114] New: Incorrect column number for -pedantic and -Wconversion


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

            Bug ID: 60114
           Summary: Incorrect column number for -pedantic and -Wconversion
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com

The column number in the warnings by -pedantic and -Wconversion is not precise. 


$: cat short.c 
int l[9] = {0xD051BC10L,0x976F2A4DL,0x976F2A4DL};
$: gcc-trunk -c -pedantic short.c
short.c:1:1: warning: overflow in implicit constant conversion [-Woverflow]
 int l[9] = {0xD051BC10L,0x976F2A4DL,0x976F2A4DL};
 ^
short.c:1:1: warning: overflow in implicit constant conversion [-Woverflow]
short.c:1:1: warning: overflow in implicit constant conversion [-Woverflow]
$: gcc-trunk -c -Wconversion short.c
short.c:1:1: warning: conversion to âintâ alters âlong intâ constant value
[-Wconversion]
 int l[9] = {0xD051BC10L,0x976F2A4DL,0x976F2A4DL};
 ^
short.c:1:1: warning: conversion to âintâ alters âlong intâ constant value
[-Wconversion]
short.c:1:1: warning: conversion to âintâ alters âlong intâ constant value
[-Wconversion]

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