Launchpad has imported 18 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44774.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2010-07-01T21:40:43+00:00 Manu-gcc wrote:

cc1 empty.c  -pedantic -Werror

empty.c:1:0: error: ISO C forbids an empty translation unit
[-Werror=edantic]

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/0

------------------------------------------------------------------------
On 2010-07-01T21:42:35+00:00 Manu-gcc wrote:

I will propose to introduce -Wpedantic as the canonical name of
pedantic. This will also make -Werror=pedantic work. I don't see any
reason why -pedantic has to be special except historical. We can keep
the old forms as aliases indefinitely.

Joseph, Gabriel, what is your opinion? Should I prepare a patch to add
-Wpedantic?



Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/1

------------------------------------------------------------------------
On 2010-07-01T21:53:57+00:00 Manu-gcc wrote:

manuel@gcc11:~$ ~/test2/161617M/build/gcc/cc1 empty2.c  -pedantic-errors
empty2.c:1:1: error: struct has no members [-pedantic]
empty2.c:2:1: error: unnamed struct/union that defines no instances

manuel@gcc11:~$ ~/test2/161617M/build/gcc/cc1 empty2.c  -pedantic -Werror
empty2.c:1:1: error: struct has no members [-Werror=edantic]
empty2.c:2:1: error: unnamed struct/union that defines no instances [-Werror]

We also should add a -Wpedantic-default (or -Wpedantic-required) for
pedwarns enabled by default (not by -pedantic).

OK?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/2

------------------------------------------------------------------------
On 2010-07-02T01:22:55+00:00 Jsm-csl wrote:

Subject: Re:  -Werror=edantic

On Thu, 1 Jul 2010, manu at gcc dot gnu dot org wrote:

> We also should add a -Wpedantic-default (or -Wpedantic-required) for pedwarns
> enabled by default (not by -pedantic). 

Those would be extremely bad option names, since diagnostics enabled by 
default have nothing to do with pedantry; "pedwarn" is simply a 
GCC-internal function name for diagnosing constraint violations and should 
not be allowed to influence command-line option names.  -pedantic-errors 
means something like -Werror=standard-required-diagnostics and a pedwarn 
enabled by default is a standard-required diagnostic enabled by default 
(as opposed to a warning enabled by default which is a 
non-standard-required diagnostic enabled by default).  There is no 
particular reason to allow people to disable standard-required default 
diagnostics as a group separately from non-standard-required ones; think 
about more useful classifications of the existing enabled-by-default 
diagnostics to work out suitable option names for disabling them.


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/3

------------------------------------------------------------------------
On 2010-07-02T06:58:58+00:00 Manu-gcc wrote:

I knew this couldn't be easy ;-)

Let's restrict to -pedantic first. It is the only warning flag that
doesn't start with "-W". This breaks some code that expects that every
warning flag starts with -W. I want to introduce -Wpedantic as an alias.
You do not like the name. What is your suggestion?

Manuel.


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/4

------------------------------------------------------------------------
On 2010-07-02T08:07:58+00:00 Manu-gcc wrote:

Related PR 37187

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/5

------------------------------------------------------------------------
On 2010-07-02T09:22:31+00:00 Jakub-gcc wrote:

Then the right fix would be not to assume that all such options start
with -W, no?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/6

------------------------------------------------------------------------
On 2010-07-02T10:56:21+00:00 Manu-gcc wrote:

Why? All of them do, except -pedantic. I don't see any reason for
-pedantic being exceptional. Or can I start proposing warnings options
that do not start with -W?

Should we introduce a special case for pedantic (code and documentation)
for -Werror= and for -Wno-error= and for -Wno-? I can start opening PRs
for the missing special cases.

We would also need to introduce (and handle specially) -no-pedantic and
-no-pedantic-errors.

All the above is free if we just make -Wpedantic an alias for -pedantic.



Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/7

------------------------------------------------------------------------
On 2010-07-02T12:18:33+00:00 Paolo-carlini wrote:

By the way, the subject should read -Werror=pedantic, right?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/8

------------------------------------------------------------------------
On 2010-07-02T14:24:22+00:00 Manu-gcc wrote:

(In reply to comment #8)
> By the way, the subject should read -Werror=pedantic, right?
> 

Well, it depends. We actually print -Werror=edantic. ;-)


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/9

------------------------------------------------------------------------
On 2010-07-02T15:22:04+00:00 Paolo-carlini wrote:

I see, I had only a quick look to the audit trail and thought it was a
less trivial issue ;)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/10

------------------------------------------------------------------------
On 2010-07-04T01:46:18+00:00 Jsm-csl wrote:

Subject: Re:  -Werror=edantic

On Fri, 2 Jul 2010, manu at gcc dot gnu dot org wrote:

> Let's restrict to -pedantic first. It is the only warning flag that doesn't
> start with "-W". This breaks some code that expects that every warning flag
> starts with -W. I want to introduce -Wpedantic as an alias. You do not like 
> the
> name. What is your suggestion?

I do not object to -Wpedantic.  I object to -Wpedantic-default or other 
variants involving "pedantic" for diagnostics currently enabled by 
default.


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/11

------------------------------------------------------------------------
On 2010-07-04T08:27:00+00:00 Manu-gcc wrote:

(In reply to comment #11)
> 
> I do not object to -Wpedantic.  

Ah, ok! Then, I will start with this and worry about the other warnings
when their time comes. Thanks!


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/12

------------------------------------------------------------------------
On 2011-03-23T09:04:48+00:00 Redi wrote:

*** Bug 48247 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/13

------------------------------------------------------------------------
On 2011-04-19T15:17:39+00:00 Redi wrote:

*** Bug 48687 has been marked as a duplicate of this bug. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/14

------------------------------------------------------------------------
On 2012-02-17T00:22:21+00:00 Manu-gcc wrote:

Created attachment 26688
patch

Bootstrapped and regression tested, but without documentation updated or
testcase. Anyway, it is probably too late for 4.7 and I don't know when
I will have time to pick this up again, so anyone feel free to take
it/improve it.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/15

------------------------------------------------------------------------
On 2012-04-22T19:17:51+00:00 Manu-gcc wrote:

Author: manu
Date: Sun Apr 22 19:17:47 2012
New Revision: 186681

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186681
Log:
2012-04-22  Manuel López-Ibáñez  <[email protected]>

        PR c/44774
gcc/
        * doc/invoke.texi (pedantic): Rename to Wpedantic.
        * common.opt (Wpedantic): New.
        (pedantic): Alias Wpedantic.
        * diagnostic.c (warning_at): Likewise.
        * c-decl.c (diagnose_mismatched_decls): Likewise.
        (build_array_declarator): Likewise.
        (mark_forward_parm_decls):
        (check_bitfield_type_and_width): Likewise.
        (grokdeclarator): Likewise.
        (grokfield): Likewise.
        (finish_struct): Likewise.
        (build_enumerator): Likewise.
        (store_parm_decls_oldstyle): Likewise.
        (declspecs_add_qual): Likewise.
        (declspecs_add_type): Likewise.
        (finish_declspecs): Likewise.
        * c-typeck.c (composite_type): Likewise.
        (comp_target_types): Likewise.
        (build_array_ref): Likewise.
        (pointer_diff): Likewise.
        (build_unary_op): Likewise.
        (build_conditional_expr): Likewise.
        (build_c_cast): Likewise.
        (convert_for_assignment): Likewise.
        (maybe_warn_string_init): Likewise.
        (digest_init): Likewise.
        (pop_init_level): Likewise.
        (set_init_index): Likewise.
        (c_finish_goto_label): Likewise.
        (c_finish_return): Likewise.
        (do_case): Likewise.
        (build_binary_op): Likewise.
        * c-parser.c (static): Likewise.
        (c_parser_external_declaration): Likewise.
        (c_parser_declaration_or_fndef): Likewise.
        (c_parser_static_assert_declaration_no_se): Likewise.
        (c_parser_enum_specifier): Likewise.
        (c_parser_struct_or_union_specifier): Likewise.
        (c_parser_struct_declaration): Likewise.
        (c_parser_alignas_specifier): Likewise.
        (c_parser_braced_init): Likewise.
        (c_parser_initelt): Likewise.
        (c_parser_compound_statement_nostart): Likewise.
        (c_parser_conditional_expression): Likewise.
        (c_parser_alignof_expression): Likewise.
        (c_parser_postfix_expression): Likewise.
        (c_parser_postfix_expression_after_paren_): Likewise.
        (c_parser_objc_class_instance_variables): Likewise.
        (c_parser_objc_method_definition): Likewise.
        (c_parser_objc_methodprotolist): Likewise.

c-family/
        * c.opt (Wpedantic): New.
        (pedantic): Alias Wpedantic.
        * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
        (c_common_post_options): Likewise.
        (sanitize_cpp_opts): Likewise.
        * c-lex.c (interpret_float): Likewise.
        * c-format.c (check_format_types): Likewise.
        * c-common.c (pointer_int_sum): Likewise.
        (c_sizeof_or_alignof_type): Likewise.
        (c_add_case_label): Likewise.
        (c_do_switch_warnings): Likewise.
        * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
cp/
        * typeck.c (composite_pointer_type): Likewise.
        (cxx_sizeof_or_alignof_type): Likewise.
        (cp_build_array_ref): Likewise.
        (cp_build_function_call_vec): Likewise.
        (cp_build_addr_expr_1): Likewise.
        (convert_member_func_to_ptr): Likewise.
        * decl.c (check_tag_decl): Likewise.
        (check_static_variable_definition): Likewise.
        (compute_array_index_type): Likewise.
        (create_array_type_for_decl): Likewise.
        (grokdeclarator): Likewise.
        (grok_op_properties): Likewise.
        * error.c (maybe_warn_cpp0x): Likewise.
        * pt.c (maybe_process_partial_specialization): Likewise.
        (convert_template_argument): Likewise.
        (do_decl_instantiation): Likewise.
        (do_type_instantiation): Likewise.
        * parser.c (cp_parser_primary_expression): Likewise.
        (cp_parser_postfix_expression): Likewise.
        (cp_parser_unary_expression): Likewise.
        (cp_parser_question_colon_clause): Likewise.
        (cp_parser_lambda_introducer): Likewise.
        (cp_parser_lambda_declarator_opt): Likewise.
        (cp_parser_compound_statement): Likewise.
        (cp_parser_jump_statement): Likewise.
        (cp_parser_declaration_seq_opt): Likewise.
        (cp_parser_enum_specifier): Likewise.
        (cp_parser_enumerator_list): Likewise.
        (cp_parser_initializer_list): Likewise.
        (cp_parser_member_declaration): Likewise.
        * call.c (build_conditional_expr_1): Likewise.
        * friend.c (make_friend_class): Likewise.
        * name-lookup.c (pushdecl_maybe_friend_1): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-format.c
    trunk/gcc/c-family/c-lex.c
    trunk/gcc/c-family/c-opts.c
    trunk/gcc/c-family/c-pragma.c
    trunk/gcc/c-family/c.opt
    trunk/gcc/c-parser.c
    trunk/gcc/c-typeck.c
    trunk/gcc/common.opt
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/error.c
    trunk/gcc/cp/friend.c
    trunk/gcc/cp/name-lookup.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/diagnostic.c
    trunk/gcc/doc/invoke.texi

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/16

------------------------------------------------------------------------
On 2012-04-22T19:57:47+00:00 Manu-gcc wrote:

So the testcase here works, and -Werror=pedantic is accepted and printed
correctly. However, -pedantic-errors still prints just -Wpedantic when
it should print -Werror=pedantic. This is tracked in PR53075.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.7/+bug/1166105/comments/17

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1166105

Title:
  incorrect error message ('-Werror=edantic') with -pedantic

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1166105/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to