c++: Implement C++26 P2573R2 - = delete("should have a reason"); [PR114458]
[official-gcc.git] / gcc / diagnostic-url.h
blob9106541b9991f664c21efdd3707a57a989743313
1 /* Copyright (C) 2019-2024 Free Software Foundation, Inc.
2 Contributed by David Malcolm <dmalcolm@redhat.com>.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef GCC_DIAGNOSTIC_URL_H
21 #define GCC_DIAGNOSTIC_URL_H
23 /* Whether to add URLs to diagnostics:
24 - DIAGNOSTICS_URL_NO: never
25 - DIAGNOSTICS_URL_YES: always
26 - DIAGNOSTICS_URL_AUTO: depending on the output stream. */
27 typedef enum
29 DIAGNOSTICS_URL_NO = 0,
30 DIAGNOSTICS_URL_YES = 1,
31 DIAGNOSTICS_URL_AUTO = 2
32 } diagnostic_url_rule_t;
34 /* Tells whether URLs should be emitted, and, if so, how to
35 terminate strings within the escape sequence. */
36 enum diagnostic_url_format
38 /* No URLs shall be emitted. */
39 URL_FORMAT_NONE,
41 /* Use ST string termination. */
42 URL_FORMAT_ST,
44 /* Use BEL string termination. */
45 URL_FORMAT_BEL
48 const diagnostic_url_format URL_FORMAT_DEFAULT = URL_FORMAT_BEL;
50 extern diagnostic_url_format determine_url_format (diagnostic_url_rule_t);
52 #endif /* ! GCC_DIAGNOSTIC_URL_H */