mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix Pr 70252
* src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java
This commit is contained in:
parent
9690cb0ad9
commit
bd43f8a328
2 changed files with 33 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-07-17 Brad Jarvinen.
|
||||||
|
|
||||||
|
Fix Pr 70252
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/internal/errorparsers/GCCErrorParser.java
|
||||||
|
|
||||||
2004-07-16 Vladimir Hirsl
|
2004-07-16 Vladimir Hirsl
|
||||||
1. Implementation of HP-UX SOM binary parser.
|
1. Implementation of HP-UX SOM binary parser.
|
||||||
|
|
||||||
|
|
|
@ -24,13 +24,17 @@ public class GCCErrorParser implements IErrorParser {
|
||||||
// (b)
|
// (b)
|
||||||
// filename:lineno:column: description
|
// filename:lineno:column: description
|
||||||
//
|
//
|
||||||
// (b)
|
// (c)
|
||||||
// In file included from b.h:2,
|
// In file included from b.h:2,
|
||||||
// from a.h:3,
|
// from a.h:3,
|
||||||
// from hello.c:3:
|
// from hello.c:3:
|
||||||
// c.h:2:15: missing ')' in macro parameter list
|
// c.h:2:15: missing ')' in macro parameter list
|
||||||
//
|
//
|
||||||
// (c)
|
// (d)
|
||||||
|
// In file included from hello.c:3:
|
||||||
|
// c.h:2:15: missing ')' in macro parameter list
|
||||||
|
//
|
||||||
|
// (e)
|
||||||
// h.c: In function `main':
|
// h.c: In function `main':
|
||||||
// h.c:41: `foo' undeclared (first use in this function)
|
// h.c:41: `foo' undeclared (first use in this function)
|
||||||
// h.c:41: (Each undeclared identifier is reported only once
|
// h.c:41: (Each undeclared identifier is reported only once
|
||||||
|
@ -98,10 +102,12 @@ public class GCCErrorParser implements IErrorParser {
|
||||||
if (desc.startsWith ("(Each undeclared")) { //$NON-NLS-1$
|
if (desc.startsWith ("(Each undeclared")) { //$NON-NLS-1$
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
return false;
|
return false;
|
||||||
} else {
|
}
|
||||||
|
if (desc.endsWith(")")) { //$NON-NLS-1$
|
||||||
String previous = eoParser.getPreviousLine();
|
String previous = eoParser.getPreviousLine();
|
||||||
if (desc.endsWith(")") //$NON-NLS-1$
|
// It if is a "(Each undeclared ..." ignore this.
|
||||||
&& previous.indexOf("(Each undeclared") >= 0 ) { //$NON-NLS-1$
|
// we already have the error.
|
||||||
|
if (previous.indexOf("(Each undeclared") >= 0 ) { //$NON-NLS-1$
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -149,6 +155,21 @@ public class GCCErrorParser implements IErrorParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In file included from hello.c:3:
|
||||||
|
* c.h:2:15: missing ')' in macro parameter list
|
||||||
|
*
|
||||||
|
* We reconstruct the multiline gcc errors to multiple errors:
|
||||||
|
* c.h:2:15: missing ')' in macro parameter list
|
||||||
|
* hello.c:3: in inclusion c.h:2:15
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (line.startsWith("In file included from ")) { //$NON-NLS-1$
|
||||||
|
// We want the last error in the chain, so continue.
|
||||||
|
eoParser.appendToScratchBuffer(line);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In file included from b.h:2,
|
* In file included from b.h:2,
|
||||||
* from a.h:3,
|
* from a.h:3,
|
||||||
|
@ -156,7 +177,7 @@ public class GCCErrorParser implements IErrorParser {
|
||||||
* c.h:2:15: missing ')' in macro parameter list
|
* c.h:2:15: missing ')' in macro parameter list
|
||||||
*
|
*
|
||||||
* We reconstruct the multiline gcc errors to multiple errors:
|
* We reconstruct the multiline gcc errors to multiple errors:
|
||||||
* c.h:3:15: missing ')' in macro parameter list
|
* c.h:2:15: missing ')' in macro parameter list
|
||||||
* b.h:2: in inclusion c.h:3:15
|
* b.h:2: in inclusion c.h:3:15
|
||||||
* a.h:3: in inclusion b.h:2
|
* a.h:3: in inclusion b.h:2
|
||||||
* hello.c:3: in inclusion a.h:3
|
* hello.c:3: in inclusion a.h:3
|
||||||
|
|
Loading…
Add table
Reference in a new issue