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/25170] New: Erroneous error message for simple macro


Here is the test code:

    typedef struct
    {
        int ele;
    } tstruct;

    #define TST(r,t) r##t = 1

    void test()
    {
        tstruct ts;

        TST(ts,.ele);
    }

It generates the error:

    "error: pasting "ts" and "." does not give a valid preprocessing token"

In previous versions of compiler (eg gcc-3.2.2) this generated a warning and
could therefore be ignored as another piece of unhelpful compiler output.  But
now it is a error (but it isn't!) which stops compilation.


-- 
           Summary: Erroneous error message for simple macro
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jw203198 at hotmail dot com


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


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