2024-12-23 09:19 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000304mercuryBugpublic2014-01-28 18:51
Reporterwangp 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000304: gcc caret diagnostics
Descriptiongcc 4.8 added caret diagnostics. mfiltercc filters out "used but never defined" warnings, but the two lines that follow (the source line and the caret) leak are passed through.

A few options:

1. update mfiltercc to detect the presence of caret diagnostic lines
2. pass -fno-caret-diagnostics to appropriate versions of gcc
3. fix the problem that causes the warnings

It appears we could just change this static into extern:

    #define MR_declare_static(label) \
        static void label(void) __asm__("_entry_" MR_STRINGIFY(label))

I only had a quick look but the object file was unchanged.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000583

juliensf (administrator)

I have a feeling that Ian(?) tried (3) at some point and that it didn't work due to problems with
shared libraries.

~0000595

juliensf (administrator)

I think for now (i.e the upcoming 14.01 release) option (2) would be the simplest thing to do
here. The configure script already detects the version of GCC being used so arranging this
should be trivial.

~0000601

juliensf (administrator)

Option (2) alone does not appear to be sufficient -- GCC 4.8 has changed more about the error
messages than just adding caret diagnostics.

~0000602

wangp (developer)

The option is actually -fno-diagnostics-show-caret

What do the problematic error messages look like?

~0000603

juliensf (administrator)

I'll post a build log from that machine shortly. I think the issue here is that GCC 4.8 enables

    -ftrack-macro-expansion=2

by default and we are now getting error messages in terms of the original macros rather
than their expanded form.

~0000606

juliensf (administrator)

I have committed a workaround for this that forces the use of the options

   --ftrack-macro-expansion=0 --fno-diagnostics-show-caret

when non-local gotos are being used and the C compiler is GCC 4.8.X.

~0000624

zs (developer)

Fix committed jan 21: commit id e94af1a937aa2b052a326eefcfd57949208409ce.
+Notes

-Issue History
Date Modified Username Field Change
2013-11-25 11:15 wangp New Issue
2013-11-25 12:59 juliensf Note Added: 0000583
2014-01-07 15:15 juliensf Note Added: 0000595
2014-01-10 16:00 juliensf Note Added: 0000601
2014-01-10 16:41 wangp Note Added: 0000602
2014-01-10 16:56 juliensf Note Added: 0000603
2014-01-14 15:50 juliensf Note Added: 0000606
2014-01-28 18:51 zs Note Added: 0000624
2014-01-28 18:51 zs Status new => closed
2014-01-28 18:51 zs Assigned To => zs
2014-01-28 18:51 zs Resolution open => fixed
+Issue History