summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g8
-rw-r--r--src/java/com/jogamp/gluegen/JavaEmitter.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
index 8826c13..d159ff3 100644
--- a/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
+++ b/src/antlr/com/jogamp/gluegen/cgram/HeaderParser.g
@@ -761,8 +761,8 @@ enumSpecifier [int cvAttrs] returns [Type t] {
final EnumType dupE = enumMap.get(eName);
if( null != dupE && !dupE.equalSemantics(e) ) {
throwGlueGenException(enumSpecifier_AST_in,
- String.format("Duplicate enum w/ incompatible type:%n this '%s',%n have '%s',%n previously declared here: %s",
- getTypeString(e), getTypeString(dupE), dupE.getASTLocusTag()));
+ String.format("Duplicate enum w/ incompatible type:%n this '%s',%n have '%s',%n %s: previous definition is here",
+ getTypeString(e), getTypeString(dupE), dupE.getASTLocusTag().toString(new StringBuilder(), "note", true)));
}
enumMap.put(eName, (EnumType)e.clone(locusTag));
}
@@ -879,8 +879,8 @@ initDecl[TypeBox tb] {
final Type dupT = typedefDictionary.get(declName);
if( null != dupT && !dupT.equalSemantics(t) ) {
throwGlueGenException(locusTag,
- String.format("Duplicate typedef w/ incompatible type:%n this '%s',%n have '%s',%n previously declared here: %s",
- getTypeString(t), getTypeString(dupT), dupT.getASTLocusTag()));
+ String.format("Duplicate typedef w/ incompatible type:%n this '%s',%n have '%s',%n %s: previous definition is here",
+ getTypeString(t), getTypeString(dupT), dupT.getASTLocusTag().toString(new StringBuilder(), "note", true)));
}
t = canonicalize(t);
debugPrintln(" - canon -> "+getDebugTypeString(t));
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java
index 52e8834..a829419 100644
--- a/src/java/com/jogamp/gluegen/JavaEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaEmitter.java
@@ -161,8 +161,8 @@ public class JavaEmitter implements GlueEmitter {
loc = null;
}
if( dupSym instanceof ASTLocusTagProvider ) {
- preLoc = String.format(", previously declared here: %s",
- ((ASTLocusTagProvider)dupSym).getASTLocusTag());
+ preLoc = String.format(",%n %s: previous definition is here",
+ ((ASTLocusTagProvider)dupSym).getASTLocusTag().toString(new StringBuilder(), "note", true));
} else {
preLoc = "";
}