Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4366-gc64693fb885f21.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_initialize): Initialize
set_locations_cb to nullptr.
---
gcc/diagnostic.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc
Eliminate various global variables in the json/sarif output code by
bundling together callbacks and state into a new diagnostic_output_format
class, with per-output-format subclasses.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as
struct diagnostic_context has > 60 fields.
Try to tame some of the complexity by grouping together the 8
source-printing fields into a struct, the "m_source_printing" field.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4367-
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4379-gc44ca7c01226e0.
gcc/ada/ChangeLog:
* gcc-interface/misc.cc: Use text_info ctor.
gcc/analyzer/ChangeLog:
* analyzer-logging.cc (logger::log_va_partial): Use t
* error.cc (print_instantiation_partial_context_line): Call
diagnostic_show_locus.
gcc/testsuite/ChangeLog:
* g++.dg/diagnostic/static_assert3.C: Add directives for
additional source printing.
* g++.dg/template/error60.C: New test.
Signed-off-by: David Malcolm
--
On Tue, 2023-10-03 at 10:32 -0400, Andrew MacLeod wrote:
> Pass counting in VRP is used to decide when to call early VRP, pass
> the
> flag to enable warnings, and when the final pass is.
>
> If you try to add additional passes, this becomes quite fragile. This
> patch simply chooses the pass bas
On Tue, 2023-10-03 at 13:11 -0400, Andrew MacLeod wrote:
>
> On 10/3/23 13:02, David Malcolm wrote:
> > On Tue, 2023-10-03 at 10:32 -0400, Andrew MacLeod wrote:
> > > Pass counting in VRP is used to decide when to call early VRP,
> > > pass
> > > the
>
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4475-g25af7c1a806c0c.
gcc/ChangeLog:
* input.cc (make_location): Move implementation to
line_maps::make_location.
libcpp/ChangeLog:
* include/line-map.h (l
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4474-g94caa6a6b4bd73.
gcc/ChangeLog:
PR driver/111700
* input.cc (file_cache::add_file): Update leading comment to
clarify that it can fail.
(file_cache::lookup_or_add_file): Likew
This patch eliminates the function "COMBINE_LOCATION_DATA" (which hasn't
been a macro since r6-739-g0501dbd932a7e9) and the function
"get_combined_adhoc_loc" in favor of a new
line_maps::get_or_create_combined_loc member function.
No functional change intended.
Successfully bootstrapped & regrtes
Nothing uses these; delete them.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4478-ga73c80d99736f0.
libcpp/ChangeLog:
* include/line-map.h (LINEMAPS_LAST_ALLOCATED_MAP): Delete.
(LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Delete.
(LINEM
It's simpler to use field access than to go through these inline
functions that look as if they are macros.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4479-g45bae1809c3919.
libcpp/ChangeLog:
* include/line-map.h (m
Update out-of-bounds diagrams to show existing string values,
and the initial write index within a string buffer.
For example, given the out-of-bounds write in strcat in:
void test (void)
{
char buf[10];
strcpy (buf, "hello");
strcat (buf, " world!");
}
the diagram improves from:
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4480-g0a0ceb7a72fe0b.
libcpp/ChangeLog:
* include/line-map.h (LINEMAPS_ORDINARY_MAPS): Delete.
(LINEMAPS_MACRO_MAPS): Delete.
* line-map.cc (linemap_tracks_macro_expansion_locs_p): Update
es::kind)':
> gcc/analyzer/access-diagram.cc:655:20: error: 'kind' is not a class,
> namespace, or enumeration
> (kind == kind::HARD) ? "HARD" : "soft");
> ^
> The problem is ...
>
> On 09.10.23 00:58, David Mal
On Mon, 2023-10-09 at 17:01 +0200, Tobias Burnus wrote:
> Hi David,
>
> On 09.10.23 16:08, David Malcolm wrote:
> > On Mon, 2023-10-09 at 12:09 +0200, Tobias Burnus wrote:
> > > The following works:
> > > (A) Using "kind == boundaries::kind::HARD"
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-4668-gf8644b678285cf.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_initialize): Ensure
context->extra_output_kind is initialized.
---
gcc/diagnostic.cc | 2 +-
1 file changed, 1 insertion(+), 1 del
In the LWN discussion of the "ASCII" art in GCC 14
https://lwn.net/Articles/946733/#Comments
there was some concern about the use of non-ASCII characters in the
output.
Currently -fdiagnostics-text-art-charset defaults to "emoji".
To better handle older terminals by default, this patch special-c
c:
New test.
* c-c++-common/analyzer/attr-null_terminated_string_arg-nonnull.c:
New test.
*
c-c++-common/analyzer/attr-null_terminated_string_arg-nullable-sized.c:
New test.
* c-c++-common/analyzer/attr-null_terminated_string_arg-nullable.c:
New t
In r262149 ("Introduce dump_location_t", aka
c309657f69df19eaa590b6650acf4d3bea9ac9e6), I removed dump_generic_expr_loc
from dumpfile.h/c as it was unused in the source tree.
It looks like this was overzealous of me, as Richard wants to use it in
"Re: [14/n] PR85694: Rework overwidening detectio
On Mon, 2018-07-02 at 14:23 +0200, Christophe Lyon wrote:
> On Fri, 29 Jun 2018 at 10:09, Richard Biener com> wrote:
> >
> > On Tue, Jun 26, 2018 at 5:43 PM David Malcolm
> > wrote:
> > >
> > > This patch adds a concept of nested "scopes" to
On Mon, 2018-07-02 at 12:58 +0200, Paolo Carlini wrote:
> Hi,
>
> I was double checking my pending patch and going through the errors
> we
> emit in decl.c and elsewhere about thread_local and __thread and
> noticed
> another place, in parser.c, where using rich_location::add_range
> seems
> na
This patch moves a workaround for locale differences from a
selftest in pretty-print.c to selftest.h/c to make it reusable; I need
this for a selftest in a followup patch.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Committed to trunk as r262317 (with my "diagnostic messages" m
;
typedef union section section;
struct gcc_options;
diff --git a/gcc/dump-context.h b/gcc/dump-context.h
new file mode 100644
index 000..753f714
--- /dev/null
+++ b/gcc/dump-context.h
@@ -0,0 +1,128 @@
+/* Support code for handling the various dump_* calls in dumpfile.h
+ Copyright (C) 2018 F
On Fri, 2018-06-29 at 09:09 +0200, Richard Biener wrote:
> On Thu, Jun 28, 2018 at 4:29 PM David Malcolm
> wrote:
> >
> > On Thu, 2018-06-28 at 13:29 +0200, Richard Biener wrote:
> > > On Tue, Jun 26, 2018 at 3:54 PM David Malcolm > > m>
> > > wrote:
test_flag("NoDWARFRecord", flags, " | CL_NO_DWARF_RECORD") \
test_flag("Warning", flags, " | CL_WARNING") \
+ test_flag("Remark", flags, " | CL_REMARK") \
test_flag("(Optimization|PerFunction)", f
On Tue, 2018-07-03 at 09:37 +0200, Richard Biener wrote:
> On Mon, Jul 2, 2018 at 7:00 PM David Malcolm
> wrote:
> >
> > On Mon, 2018-07-02 at 14:23 +0200, Christophe Lyon wrote:
> > > On Fri, 29 Jun 2018 at 10:09, Richard Biener > > ail.
> > > com>
On Tue, 2018-07-03 at 15:53 +0200, Richard Biener wrote:
> On Tue, Jul 3, 2018 at 3:52 PM David Malcolm
> wrote:
> >
> > On Tue, 2018-07-03 at 09:37 +0200, Richard Biener wrote:
> > > On Mon, Jul 2, 2018 at 7:00 PM David Malcolm > > >
> > > wrote
On Tue, 2018-07-03 at 11:00 +0100, Andre Vieira (lists) wrote:
> On 29/06/18 11:13, David Malcolm wrote:
> > On Fri, 2018-06-29 at 10:15 +0200, Richard Biener wrote:
> > > On Fri, 22 Jun 2018, Jan Hubicka wrote:
> > >
> > > > Hi,
> > > > this
On Mon, 2018-06-25 at 11:10 +0200, Richard Biener wrote:
> On Fri, 22 Jun 2018, David Malcolm wrote:
>
> > NightStrike and I were chatting on IRC last week about
> > issues with trying to vectorize the following code:
> >
> > #include
> > std::size_t f(s
gcc/ChangeLog:
* tree-vectorizer.c: Include "opt-problem.h".
(try_vectorize_loop_1): Convert "loop_vinfo" from loop_vec_info to
opt_loop_vec_info loop_vinfo, and use opt_report to report any
opt_problem thus captured. Use opt_report ro report on successful
l
In particular, note how this allows us to highlight specific loops in
testcases (via dg-remark), and to highlight the specific lines that cause
problems to the vectorizer (via dg-message).
gcc/testsuite/ChangeLog:
* gcc.dg/vect/vect-alias-check-4.c: Add -fremarks to options. Add
d
-problem.h
diff --git a/gcc/opt-problem.h b/gcc/opt-problem.h
new file mode 100644
index 000..100eed0
--- /dev/null
+++ b/gcc/opt-problem.h
@@ -0,0 +1,326 @@
+/* Rich information on why an optimization wasn't possible.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ Contributed by
-query.o \
diff --git a/gcc/opt-problem.cc b/gcc/opt-problem.cc
new file mode 100644
index 000..f518b16
--- /dev/null
+++ b/gcc/opt-problem.cc
@@ -0,0 +1,96 @@
+/* Rich information on why an optimization wasn't possible.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ Contributed by
This patch uses the opt_result framework throughout the vectorizer
(and a few other places) so that specific details on problems are
propagated back up to the top-level of the vectorizer.
The changes are mostly fairly mechanical.
There are various FIXMEs in the code: for example, in various place
On Mon, 2018-07-09 at 15:00 +0200, Richard Biener wrote:
> On Mon, Jul 2, 2018 at 10:51 PM David Malcolm
> wrote:
> >
> > This patch implements a way to consolidate dump_* calls into
> > optinfo objects, as enabling work towards being able to write out
> > optimizat
ll subsequent dump_* calls are consolidated into
diff --git a/gcc/json.cc b/gcc/json.cc
new file mode 100644
index 000..3c2aa77
--- /dev/null
+++ b/gcc/json.cc
@@ -0,0 +1,293 @@
+/* JSON trees
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This f
dump-context.h
new file mode 100644
index 000..a191e3a
--- /dev/null
+++ b/gcc/dump-context.h
@@ -0,0 +1,138 @@
+/* Support code for handling the various dump_* calls in dumpfile.h
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
On Wed, 2018-07-11 at 16:56 +0100, Richard Sandiford wrote:
> David Malcolm writes:
> > On Mon, 2018-06-25 at 11:10 +0200, Richard Biener wrote:
> > > On Fri, 22 Jun 2018, David Malcolm wrote:
> > >
> > > > NightStrike and I were chatting on IRC last w
PR c++/84993 identifies a problem with our suggestions for
misspelled member names in the C++ FE for the case where the
member is private.
For example, given:
class foo
{
public:
double get_ratio() const { return m_ratio; }
private:
double m_ratio;
};
void test(foo *ptr)
{
if (ptr->ratio
On Wed, 2018-07-04 at 10:53 +, Bernd Edlinger wrote:
Sorry for the delay in reviewing this.
> Hi,
>
> currently _Pragma("GCC diagnostic ...") does not properly
> work in macro expansions.
>
> Consider the following code:
>
> #define B _Pragma("GCC diagnostic push") \
> _Pragma("GCC
Ping, re these patches:
"[PATCH 1/2] v5: Add "optinfo" framework"
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00535.html
"[PATCH 2/2] Add "-fsave-optimization-record""
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00536.html
Thanks
Dave
On Wed,
On Thu, 2018-07-19 at 14:39 +0200, Richard Biener wrote:
> On Wed, Jul 11, 2018 at 12:53 PM David Malcolm
> wrote:
> >
> > This patch implements a -fsave-optimization-record option, which
> > leads to a JSON file being written out, recording the dump_* calls
&
e
--- /dev/null
+++ b/contrib/optrecord.py
@@ -0,0 +1,295 @@
+#!/usr/bin/env python3
+#
+# Python module for working with the result of -fsave-optimization-record
+# Contributed by David Malcolm .
+#
+# Copyright (C) 2018 Free Software Foundation, Inc.
+# This file is part of GCC.
+#
+# GCC is fre
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Committed to trunk as r262913.
gcc/c-family/ChangeLog:
* c-common.c (c_cpp_error): Remove redundant "line_table"
parameter from call to rich_location::set_range.
(maybe_suggest_missing_token_insertion): Likewis
On Mon, 2018-07-23 at 11:46 +0200, Richard Biener wrote:
> On Fri, Jul 20, 2018 at 6:27 PM David Malcolm
> wrote:
> >
> > This patch adds a Python 3 module to "contrib" for reading the
> > output of
> > -fsave-optimization-record.
> >
> &g
There are various ways that it's possible for a gimple statement to
have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped
in an ad-hoc location to capture inlining information.
For such a location, LOCATION_FILE (loc) is NULL.
Various places in -fsave-optimization-record were chec
On Mon, 2018-07-23 at 17:49 -0600, Martin Sebor wrote:
> (David, I'm hoping your your help here. Please see the end.)
>
> While looking into a recent -Warray-bounds instance in Glibc
> involving inlining of large functions it became apparent that
> GCC could do a better job of pinpointing the sou
On Mon, 2018-07-23 at 20:56 -0600, Martin Sebor wrote:
> On 07/23/2018 07:20 PM, David Malcolm wrote:
> > On Mon, 2018-07-23 at 17:49 -0600, Martin Sebor wrote:
> > > (David, I'm hoping your your help here. Please see the end.)
> > >
> > > While looking
On Tue, 2018-07-24 at 17:18 +, Segher Boessenkool wrote:
> This patch allows combine to combine two insns into two. This helps
> in many cases, by reducing instruction path length, and also allowing
> further combinations to happen. PR85160 is a typical example of code
> that it can improve.
There's a small leak in class optrecord_json_writer, which shows
up as a new leak in "make selftest-valgrind" as:
==50133== 40 bytes in 1 blocks are definitely lost in loss record 27 of 672
==50133==at 0x4A0645D: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==50133==b
On Tue, 2018-07-24 at 16:11 +0200, Richard Biener wrote:
> On Mon, Jul 23, 2018 at 9:20 PM David Malcolm
> wrote:
> >
> > On Mon, 2018-07-23 at 11:46 +0200, Richard Biener wrote:
> > > On Fri, Jul 20, 2018 at 6:27 PM David Malcolm > > m>
> > > wrote
---+\n"
+ "|scalar| |prologue |\n"
+ "| | +---+\n"
+ "| | |\n"
+ "| | +---+\n"
+
On Thu, 2018-07-26 at 13:22 +0100, Andre Vieira (lists) wrote:
[...snip...]
> > > diff --git a/gcc/testsuite/gcc.c-torture/compile/pr86636.c
> > > b/gcc/testsuite/gcc.c-torture/compile/pr86636.c
> > > new file mode 100644
> > > index 000..2fe2f70
> > > --- /dev/null
> > > +++ b/gcc/testsuite/
Ping:
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00594.html
On Wed, 2018-07-11 at 22:42 -0400, David Malcolm wrote:
> PR c++/84993 identifies a problem with our suggestions for
> misspelled member names in the C++ FE for the case where the
> member is private.
>
> For
On Fri, 2018-07-27 at 17:43 +0100, Andre Vieira (lists) wrote:
> On 27/07/18 16:39, David Malcolm wrote:
> > On Thu, 2018-07-26 at 13:22 +0100, Andre Vieira (lists) wrote:
> >
> > [...snip...]
> >
> > > > > diff --git a/gcc/testsuite/gcc.c-torture/c
This patch removes some duplicated code in dumpfile.c by
reimplementing the various dump_foo_loc calls in terms of dump_foo.
gcc/ChangeLog:
* dump-context.h (dump_context::dump_loc): New decl.
* dumpfile.c (dump_context::dump_loc): New member function.
(dump_context::dump_g
(stmt,
"not vectorized: different sized vector "
"types in statement, %T and %T\n",
vectype, nunits_vectype);
where opt_result::failure_at would encapsulate the "false", and
capture an opt_problem * (when du
This makes it easier to compare cp_printer with gcc_cxxdiag_char_table
in c-format.c.
No functional change intended.
gcc/cp/ChangeLog:
* error.c (cp_printer): In the leading comment, move "%H" and "I"
into alphabetical order, and add missing "%G" and "K". Within the
switc
The format_char_info tables in c-format.c for our own formats contain
a lot of repetition.
This patch adds a macro to express the conversion specifiers implemented
within pp_format, making it clearer which are custom ones added by the
various diagnostic_format_decoder callbacks.
Doing so uncovere
This patch converts dump_print and dump_printf_loc from using
printf (and thus ATTRIBUTE_PRINTF) to using a new pretty-printer
based on pp_format, which supports formatting middle-end types.
In particular, the following codes are implemented (in addition
to the standard pretty_printer ones):
%
With the addition of optinfo, the various dump_* calls had three parts:
- optionally print to dump_file
- optionally print to alt_dump_file
- optionally make an optinfo_item and add it to the pending optinfo,
creating it for dump_*_loc calls.
However, this split makes it difficult to implement t
On Tue, 2018-07-31 at 14:50 +0200, Richard Biener wrote:
> On Fri, Jul 27, 2018 at 11:47 PM David Malcolm
> wrote:
> >
> > This patch kit converts dump_print and dump_printf_loc from using
> > fprintf etc internally to using a new pretty-printer
> > based on pp_for
On Tue, 2018-07-31 at 15:03 +0200, Richard Biener wrote:
> On Fri, Jul 27, 2018 at 11:49 PM David Malcolm
> wrote:
> >
> > This patch converts dump_print and dump_printf_loc from using
> > printf (and thus ATTRIBUTE_PRINTF) to using a new pretty-printer
> > base
On Tue, 2018-07-31 at 14:53 +0200, Richard Biener wrote:
> On Fri, Jul 27, 2018 at 11:48 PM David Malcolm
> wrote:
> >
> > With the addition of optinfo, the various dump_* calls had three
> > parts:
> > - optionally print to dump_file
> > - optionally print to
On Thu, 2023-10-19 at 16:13 +0200, Andreas Schwab wrote:
> On Okt 19 2023, David Malcolm wrote:
[...]
> > + /* First, check for a null-terminated string *without*
> > + emitting emitting warnings (via a null context), to
>
> -emitting
>
Thanks; I
On Wed, 2023-09-20 at 00:12 -0400, Lewis Hyatt wrote:
> Hello-
>
> This patch implements the PR's request to add more information to the
> diagnostic issued for using a poisoned identifier. Bootstrapped +
> regtested
> all languages on x86-64 Linux. Does it look OK please? Thanks!
Thanks!
Patch
On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote:
>
> This simplifies the interface for other UTF-8 validity detections when a
> simple "yes" or "no" answer is sufficient.
>
> libcpp/
>
> * charset.cc: Add `_cpp_valid_utf8_str` which determines whether
> a C string is vali
On Mon, 2023-10-23 at 11:24 -0400, Jason Merrill wrote:
> On 10/23/23 11:16, David Malcolm wrote:
> > On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc
> > wrote:
> > >
> > > This simplifies the interface for other UTF-8 validity detections
> > > w
On Fri, 2022-11-25 at 02:13 +0530, Vibhav Pant via Jit wrote:
> If a char * global was initialized with a rvalue from
> `gcc_jit_context_new_string_literal` containing a format string,
> dumping the context causes libgccjit to SIGSEGV due to an improperly
> constructed call to vasprintf. The follow
On Thu, 2023-10-19 at 10:02 -0400, David Malcolm wrote:
> This patch adds a new function attribute to GCC for marking that an
> argument is expected to be a null-terminated string.
>
> For example, consider:
>
> void test_a (const char *p)
> __attribute__((null_ter
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5047-gb9e2088d297744.
gcc/ChangeLog:
* pretty-print.cc (pretty_printer::pretty_printer): Initialize
m_skipping_null_url.
(pp_begin_url): Handle URL being null.
(pp_end_url): Likewi
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5048-g8b4ac021cd1f63.
gcc/ChangeLog:
* opts.cc (get_option_url): Update comment; the requirement to
pass DOCUMENTATION_ROOT_URL's value via -D was removed in
r10-8065-ge33a1eae25b8a8.
---
This patch eliminates the function "MACRO_MAP_EXPANSION_POINT_LOCATION"
(which hasn't been a macro since r6-739-g0501dbd932a7e9) in favor of
a new line_map_macro::get_expansion_point_location accessor.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
P
@@ -0,0 +1,125 @@
+/* Implementation of class record_layout.
+ Copyright (C) 2022-2023 Free Software Foundation, Inc.
+ Contributed by David Malcolm .
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as publishe
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5080-gc71028c979d55f.
gcc/analyzer/ChangeLog:
PR analyzer/112317
* access-diagram.cc (class x_aligned_x_ruler_widget): Eliminate
unused field "m_col_widths"
d more work, but posting here for feedback.
Thoughts?
David Malcolm (4):
c/c++: rework pragma parsing
c: add #pragma GCC show_layout
diagnostics: add automatic URL-ification within messages
RFC: add contrib/regenerate-index-urls.py
contrib/regenerate-index-urls.py
in_diagnostic (diagnostic);
pp_output_formatted_text (context->printer);
if (context->show_cwe)
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h
index a2c8740cbd0..d79369289bc 100644
--- a/gcc/diagnostic.h
+++ b/gcc/diagnostic.h
@@ -354,6 +354,10 @@ struct diagnostic_context
par
This patch adds a new pragma to the C frontend that will
make it emit a human-readable diagram of a struct's layout.
For example, given this contrived usage:
struct example {
char foo : 7;
char bar;
char visible : 1;
char active : 1;
};
the compiler will emit output similar to the follo
This patch reworks pragma parsing in c-pragma.cc, with the
following improvements:
- it replaces the GCC_BAD* macros (that contained "return") in favor
of helper classes and functions for emitting diagnostics, making control
flow more explicit
- the -Wpragmas diagnostics are reworded from the for
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5112-gae8abcb81ed814.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_initialize): Update for consolidation
of group-based fields.
(diagnostic_report_diagnostic)
This patch:
- converts "struct diagnostic_context" to "class diagnostic_context".
- ensures all data members have an "m_" prefix, except for "printer",
which has so many uses that renaming would be painful.
- makes most of the data members private
- converts much of the diagnostic_* functions to
On Thu, 2023-11-02 at 09:19 -0400, David Malcolm wrote:
[...snip...]
I eliminated the dependency on the c-pragma.cc changes from this patch,
updated it for diagnostic_context becoming a class, and pushed it to
trunk as r14-5118-gc5db4d8ba5f3de (after re-testing it).
For reference, here's w
On Sat, 2023-11-04 at 16:23 +, Sergei Trofimovich wrote:
> From: Sergei Trofimovich
>
> Without the change `./configure --enable-checking=release` bootstrap
> fails as:
>
> gcc/gcc-urlifier.cc:100:1: error:
> 'get_url_suffix_for_quoted_text()'
> defined but not used [-Werror=unus
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5167-ga526cc6ff32e22.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_context::set_urlifier): New.
* diagnostic.h (diagnostic_context::set_urlifier): New decl.
(
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5166-g579bb65cdd35a4.
gcc/ChangeLog:
* diagnostic.cc (diagnostic_context::check_max_errors): Replace
uses of diagnostic_kind_count with simple field acesss.
This patch gathers the 6 fields in diagnostic_context relating to
keeping track of overriding the severity of warnings, and
pushing/popping those severities, moving them all into a new class
diagnostic_option_classifier.
No functional change intended.
Successfully bootstrapped & regrtested on x86
This patch removes almost all use of diagnostic_context from the
source-printing code.
No functional change intended.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-5169-g54da47f9459890.
gcc/ChangeLog:
* diagnostic-show-locus.cc (class colorizer): T
ot; list at the end listing various known unfinished
aspects, and "known unknowns".
Thoughts?
David Malcolm (2):
libdiagnostics: header and examples
libdiagnostics: work-in-progress implementation
gcc/Makefile.in | 134 +-
gcc/configure
Here's a work-in-progress patch for GCC that adds a libdiagnostics.h
header describing the public interface, along with various testcases
that show usage examples for the API. Various aspects of this need
work; posting now for early feedback on overall direction.
How does the interface look?
gcc
set_line_table_global ();
+ diag->get_rich_location ()->add_fixit_remove (loc);
+}
+
+/* Public entrypoint. */
+
+void
+diagnostic_finish (diagnostic *diag, const char *gmsgid, ...)
+{
+ gcc_assert (diag);
+
+ if (const char *tool_name
+ = diag->get_manager ().get_client_version
On Sun, 2019-11-10 at 14:53 +0100, Gerald Pfeifer wrote:
> Hi H-P,
>
> it appears this download is gone. Do you have an alternate location?
>
> For now I applied the patch below which disables that link in
> readings.html.
>
> Gerald
FWIW archive.org seems to have a copy here:
https://web.arc
PR analyzer/93212 reports an ICE when attempting to use -fanalyzer
on a C++ source file. That isn't supported yet, but the fix is
trivial (handling METHOD_TYPE as well as FUNCTION_TYPE).
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to the dmalcolm/analyzer branch on the G
On Wed, 2019-12-11 at 12:23 -0700, Jeff Law wrote:
> On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote:
> > This patch adds a "state_machine" base class for describing
> > API checkers in terms of state machine transitions. Followup
> > patches use th
On Wed, 2019-12-11 at 13:04 -0700, Jeff Law wrote:
> On Fri, 2019-11-15 at 20:23 -0500, David Malcolm wrote:
> > This patch adds exploded_graph and related classes, for managing
> > exploring paths through the user's code as a directed graph
> > of pai
On Wed, 2020-01-08 at 17:07 -0500, David Malcolm wrote:
[...]
> Here's an alterative patch to the above that replaces the
> "-fdiagnostics-nn-line-numbers" option in earlier versions of the
> analyzer patch kit, by doing it at the DejaGnu level instead.
[...]
> I'
On Thu, 2020-01-09 at 11:56 +, Jonathan Wakely wrote:
> On 08/01/20 18:47 -0500, David Malcolm wrote:
> > On Wed, 2019-12-04 at 10:59 -0700, Martin Sebor wrote:
> > > On 11/15/19 6:23 PM, David Malcolm wrote:
> > > > This patch adds an ordered_hash_map templat
On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> Here's an updated version of the analyzer patch kit.
I've rebased (to r280067) and applied various fixes to the kit; I've
pushed a v6 of the kit to the dmalcolm/analyzer branch of the git
mirror (along with various
On Fri, 2020-01-10 at 09:22 -0700, Jeff Law wrote:
> On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> > Needs review. This is used in many places in the analyzer.
> > msebor made some comments about the v1 version of this patch here:
> > https://gcc.gnu.org/m
On Fri, 2020-01-10 at 09:01 -0700, Jeff Law wrote:
> On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> > Needs review.
> >
> > Although the comments say "experimental", there are followups
> > (using
> > function_set) which make this much more
1 - 100 of 5422 matches
Mail list logo