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

            Bug ID: 64228
           Summary: compile error not accurate expected ; before string
                    constant
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jg at jguk dot org

Using cygwin gcc (GCC) 4.8.3

Wondering if the missing << operator in the following line could be identified


$ g++ -O -Wall -Werror -o main main.cpp
main.cpp: In function ‘int main()’:
main.cpp:10:31: error: expected ‘;’ before string constant
     std::cout << "oops " << i " number" << endl;
                               ^

#include <iostream>
int main()
{
    int i = 0;

    std::cout << "oops " << i " number" << endl;
    return 0;
}

Perhaps could say:

error: expected ‘;’ or ‘<<’ before string constant


Although, I realise there may be many things that could be fit in this space.

Reply via email to