PR c/65345
[official-gcc.git] / gcc / c / ChangeLog
blobc613e9d5dd88b1be8b68d10f696e1644888e5437
1 2015-04-23  Marek Polacek  <polacek@redhat.com>
3         PR c/65345
4         * c-decl.c (set_labels_context_r): New function.
5         (store_parm_decls): Call it via walk_tree_without_duplicates.
6         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7         instead of create_tmp_var.  Build TARGET_EXPR instead of
8         COMPOUND_EXPR.
9         (build_atomic_assign): Use create_tmp_var_raw instead of
10         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
12 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
14         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
15         (c_parser_omp_target_update): Add missed %> to error_at ().
17 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
19         PR target/55143
20         * c-decl.c (c_default_pointer_mode): Remove definition.
21         * c-tree.h (c_default_pointer_mode): Remove declaration.
23 2015-03-27  Tobias Burnus  <burnus@net-b.de>
25         PR c/65586
26         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
27         error out.
28         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
29         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
30         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
32 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
34         * c-decl.c (c_decl_attributes): Also add "omp declare target"
35         attribute for DECL_EXTERNAL VAR_DECLs.
37 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
39         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
40         argument.
42 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
44         PR c/65120
45         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
46         before preparing arguments to warn_logical_not_parentheses.
48 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
50         PR c/65120
51         * c-typeck.c (parser_build_binary_op): Don't warn for
52         !!x == y or !b == y where b is _Bool.
54 2015-03-09  Marek Polacek  <polacek@redhat.com>
56         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
57         * c-decl.c (grokdeclarator): Likewise.
58         * c-typeck.c (build_binary_op): Likewise.
60 2015-02-27  Marek Polacek  <polacek@redhat.com>
62         PR c/65228
63         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
65 2015-02-14  Marek Polacek  <polacek@redhat.com>
67         PR c/64768
68         * c-decl.c (grokdeclarator): Set the range of a flexible array member
69         declared through a typedef name.
71 2015-02-13  Marek Polacek  <polacek@redhat.com>
73         PR c/65050
74         * c-decl.c (grokdeclarator): Print also the type when giving
75         the error message about array's incomplete element type.
77 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
79         PR c/64824
80         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
81         check in the POP macro.
83 2015-02-09  Marek Polacek  <polacek@redhat.com>
85         PR c/64856
86         * c-typeck.c (process_init_element): Don't always wrap
87         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
88         initializing a range of elements.
90 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
92         PR c/64824
93         PR c/64868
94         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
96 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
98         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
99         processing enum declaration.
101 2015-01-29  Marek Polacek  <polacek@redhat.com>
103         PR c/64709
104         * c-typeck.c (pop_init_level): If constructor_elements has
105         exactly one element with integer_zerop value, set constructor_zeroinit
106         to 1.  Remove braces around warning_init call.
108 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
110         PR c/64766
111         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
112         of FUNCTION_DECLs with error_mark_node.
114 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
116         PR c/64778
117         * c-typeck.c (convert_arguments): Return -1 if there are
118         error_args, even if we've diagnosed too many arguments.
120 2015-01-21  Richard Biener  <rguenther@suse.de>
122         PR middle-end/64313
123         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
124         for builtins the user declared correctly.
126 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
127             Bernd Schmidt  <bernds@codesourcery.com>
128             Cesar Philippidis  <cesar@codesourcery.com>
129             James Norris  <jnorris@codesourcery.com>
130             Jakub Jelinek  <jakub@redhat.com>
131             Ilmir Usmanov  <i.usmanov@samsung.com>
133         * c-parser.c: Include "gomp-constants.h".
134         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
135         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
136         Use OMP_CLAUSE_SET_MAP_KIND.
137         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
138         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
139         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
140         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
141         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
142         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
143         "copyout", "create", "delete", "deviceptr", "gang", "host",
144         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
145         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
146         "present_or_create", "pcreate", "seq", "self", "vector",
147         "vector_length", "wait", "worker".
148         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
149         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
150         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
151         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
152         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
153         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
154         (c_parser_oacc_data_clause_deviceptr)
155         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
156         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
157         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
158         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
159         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
160         (c_parser_oacc_parallel, c_parser_oacc_update)
161         (c_parser_oacc_wait): New functions.
162         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
163         (c_finish_oacc_data): New prototypes.
164         * c-typeck.c: Include "gomp-constants.h".
165         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
166         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
167         OMP_CLAUSE_SET_MAP_KIND.
168         (c_finish_oacc_parallel, c_finish_oacc_kernels)
169         (c_finish_oacc_data): New functions.
170         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
171         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
172         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
173         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
174         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
175         GOMP_MAP_FORCE_DEVICEPTR.
177 2015-01-09  Michael Collison  <michael.collison@linaro.org>
179         * c-array-notation.c: Include hash-set.h, machmode.h,
180         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
181         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
182         * c-aux-info.c: Ditto.
183         * c-convert.c: Ditto.
184         * c-decl.c: Ditto.
185         * c-errors.c: Ditto.
186         * c-lang.c: Dittoxs.
187         * c-objc-common.c: Ditto.
188         * c-parser.c: Ditto.
189         * c-typeck.c: Include hash-set.h, machmode.h,
190         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
191         fold-const.h, wide-int.h, inchash.h, real.h and
192         fixed-value.h due to flattening of tree.h.
194 2015-01-07  Marek Polacek  <polacek@redhat.com>
196         PR c/64417
197         * c-typeck.c (process_init_element): Disallow initialization of
198         a flexible array member with a string constant if the structure
199         is in an array.
201 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
203         PR sanitizer/64344
204         * c-typeck.c (convert_for_assignment, c_finish_return): For
205         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
206         types also set in_late_binary_op around convert call.
207         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
208         to integral type casts, if not in_late_binary_op, pass c_fully_fold
209         result on expr as last argument to ubsan_instrument_float_cast,
210         if in_late_binary_op, don't use c_save_expr but save_expr.
212         Update copyright years.
214 2015-01-05  Marek Polacek  <polacek@redhat.com>
216         PR c/64423
217         * c-typeck.c (build_array_ref): Pass loc down to
218         warn_array_subscript_with_type_char.
220 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
222         * c-typeck.c: New behavious for pointers to arrays with qualifiers
223         (common-pointer-type): For pointers to arrays take qualifiers from
224         element type.
225         (build_conditional_expr): Add warnings for lost qualifiers.
226         (comp-target-types): Allow pointers to arrays with different qualifiers.
227         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
228         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
229         to PEDWARN_FOR_QUALIFIERS.
231 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
233         PR sanitizer/64289
234         * c-convert.c: Include ubsan.h.
235         (convert): For real -> integral casts and
236         -fsanitize=float-cast-overflow don't call convert_to_integer, but
237         instead instrument the float cast directly.
239 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
241         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
242         c_finish_stmt_expr): Remove NULL last argument from
243         create_tmp_var_raw and create_tmp_var calls.
244         * c-array-notation.c (fix_builtin_array_notation_fn,
245         build_array_notation_expr, fix_conditional_array_notations_1,
246         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
248 2014-11-28  Marek Polacek  <polacek@redhat.com>
250         PR c/63862
251         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
252         convert the right operand to integer type.
254 2014-11-25  Marek Polacek  <polacek@redhat.com>
256         PR c/63877
257         * c-decl.c (start_function): Disable -Wmissing-declarations warning
258         for inline functions.
260 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
262         PR target/63764
263         * c-typeck.c (build_array_ref): Adjust
264         convert_vector_to_pointer_for_subscript caller.  If it returns true,
265         call non_lvalue_loc on the result.
267 2014-11-11  Richard Biener  <rguenther@suse.de>
269         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
270         to true.
272 2014-11-10  Andi Kleen  <ak@linux.intel.com>
274         PR c/60804
275         * c-parser.c (c_parser_statement_after_labels): Call
276         check_no_cilk.
277         (c_parser_if_statement): Dito.
278         (c_parser_switch_statement): Dito.
279         (c_parser_while_statement): Dito.
280         (c_parser_do_statement): Dito.
281         (c_parser_for_statement): Dito.
282         * c-typeck.c (c_finish_loop): Dito.
284 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
286         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
287         OPT_Wshift_count_overflow in the warnings.
289 2014-10-30  Marek Polacek  <polacek@redhat.com>
291         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
292         print the stripped version as well, if they're not the same.
294 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
296         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
297         machine_mode.
299 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
301         * c-decl.c: Adjust include files.
302         * c-parser.c: Ditto.
304 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
305             Tom Tromey  <tromey@redhat.com>
307         * c-tree.h (enum c_oracle_request): New.
308         (c_binding_oracle_function): New typedef.
309         (c_binding_oracle, c_pushtag, c_bind): Declare.
310         * c-decl.c (c_binding_oracle): New global.
311         (I_SYMBOL_CHECKED): New macro.
312         (i_symbol_binding): New function.
313         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
314         (I_TAG_CHECKED): New macro.
315         (i_tag_binding): New function.
316         (I_TAG_BINDING, I_TAG_DECL): Redefine.
317         (I_LABEL_CHECKED): New macro.
318         (i_label_binding): New function.
319         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
320         (c_print_identifier): Save and restore c_binding_oracle.
321         (c_pushtag, c_bind): New functions.
323 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
325         * c-typeck.c: Adjust include files.
327 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
329         PR c++/53061
330         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
331         initialization here...
332         (c_initialize_diagnostics): ... but here. Set defaults after
333         building pretty-printer.
335 2014-10-23  Marek Polacek  <polacek@redhat.com>
337         PR c/63626
338         * c-decl.c (pop_scope): Don't print warning in external_scope.
340 2014-10-19  Marek Polacek  <polacek@redhat.com>
342         PR c/63567
343         * c-typeck.c (output_init_element): Allow initializing objects with
344         static storage duration with compound literals even in C99 and add
345         pedwarn for it.
347 2014-10-17  Marek Polacek  <polacek@redhat.com>
349         PR c/63567
350         * c-typeck.c (digest_init): Allow initializing objects with static
351         storage duration with compound literals even in C99 and add pedwarn
352         for it.
354 2014-10-17  Marek Polacek  <polacek@redhat.com>
356         PR c/63543
357         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
358         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
359         error multiple times.  Print the type.
361 2014-10-17  Marek Polacek  <polacek@redhat.com>
363         PR c/63549
364         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
365         type.
367 2014-10-17  Marek Polacek  <polacek@redhat.com>
369         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
370         (start_function): Use OPT_Wimplicit_int instead of 0.
371         (store_parm_decls_oldstyle): Likewise.
373 2014-10-17  Alan Modra  <amodra@gmail.com>
375         PR middle-end/61848
376         * c-decl.c (merge_decls): Don't merge section name or tls model
377         to newdecl symtab node, instead merge to olddecl.  Override
378         existing olddecl section name.  Set tls_model for all thread-local
379         vars, not just OMP thread-private ones.  Remove incorrect comment.
381 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
383         * c-decl.c: Adjust include files.
385 2014-10-14  DJ Delorie  <dj@redhat.com>
387         * c-parser.c (c_parse_init): Add RID entries for each __intN.
388         (c_token_starts_typename): Check all __intN, not just __int128.
389         (c_token_starts_declspecs): Likewise.
390         (c_parser_declspecs): Likewise.
391         (c_parser_attribute_any_word): Likewise.
392         (c_parser_objc_selector): Likewise.
393         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
394         (struct c_declspecs): Add int_n_idx field to record *which* __intN
395         is specified.
396         * c-decl.c (declspecs_add_type): Check for all __intN, not just
397         __int128.
398         (finish_declspecs): Likewise.
400 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
402         * c-parser.c (c_parser_all_labels): New function to replace
403         the duplicate code.
404         (c_parser_statement): Call the new function.
406 2014-10-09  Marek Polacek  <polacek@redhat.com>
408         PR c/63480
409         * c-typeck.c (pop_init_level): Don't warn about initializing
410         with { }.
412 2014-10-07  Marek Polacek  <polacek@redhat.com>
414         PR c/59717
415         * c-decl.c (header_for_builtin_fn): New function.
416         (implicitly_declare): Suggest which header to include.
418 2014-10-07  Marek Polacek  <polacek@redhat.com>
420         * c-convert.c (convert): Use error_operand_p.
421         * c-typeck.c (require_complete_type): Likewise.
422         (really_atomic_lvalue): Likewise.
423         (digest_init): Likewise.
424         (handle_omp_array_sections_1): Likewise.
426 2014-10-03  Marek Polacek  <polacek@redhat.com>
428         PR c/63453
429         * c-decl.c (pop_scope): Don't warn about "inline function declared
430         but never defined" for functions marked with gnu_inline attribute.
432 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
434         PR c++/63249
435         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
436         on low_bound and length.
438 2014-09-24  Marek Polacek  <polacek@redhat.com>
440         PR c/61405
441         PR c/53874
442         * c-parser.c: Don't define CPP_KEYWORD.
443         (c_parser_switch_statement): Pass original type to c_finish_case.
444         * c-tree.h (c_finish_case): Update declaration.
445         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
446         conditionally to c_do_switch_warnings.
448 2014-09-03  Marek Polacek  <polacek@redhat.com>
450         PR c/62024
451         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
452         conversions.
454 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
455             Balaji V. Iyer  <balaji.v.iyer@intel.com>
456             Igor Zamyatin  <igor.zamyatin@intel.com>
458         * c-parser.c (c_parser_cilk_for): New function.
459         (c_parser_cilk_grainsize): Likewise.
460         (c_get_temp_regvar): Likewise.
461         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
462         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
463         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
464         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
465         case.
467 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
469         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
470         with using HOST_WIDE_INT without truncation to 'int'
472 2014-08-22  Marek Polacek  <polacek@redhat.com>
474         PR c++/62199
475         * c-typeck.c (parser_build_binary_op): Adjust call to
476         warn_logical_not_parentheses.
478 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
480         PR other/62008
481         * c-parser.c (c_parser_array_notation): Check for correct
482         type of an array added.
484 2014-08-19  Marek Polacek  <polacek@redhat.com>
486         PR c++/62153
487         * c-typeck.c (build_binary_op): If either operand of a comparison
488         is a boolean expression, call maybe_warn_bool_compare.
490 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
492         PR c/45584
493         * c-typeck.c (build_c_cast): Do a conversion even when the
494         TYPE_MAIN_VARIANTs are the same.
496 2014-08-19  Marek Polacek  <polacek@redhat.com>
498         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
499         pedwarn_c99 instead of pedwarn.
500         (grokfield): Likewise.
501         (warn_defaults_to): New function.
502         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
503         Unconditionally call pedwarn_c99 instead of pedwarn.
504         (start_function): Call warn_defaults_to instead of pedwarn_c99.
505         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
506         check flag_isoc11 before.
507         * c-errors.c (pedwarn_c99): Change the return type to bool.
508         Handle -Wc99-c11-compat.
509         * c-parser.c (disable_extension_diagnostics): Handle
510         warn_c99_c11_compat.
511         (restore_extension_diagnostics): Likewise.
512         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
513         instead of pedwarn, don't check flag_isoc11 before.
514         (c_parser_declspecs): Likewise.
515         (c_parser_alignas_specifier): Likewise.
516         (c_parser_alignof_expression): Likewise.
517         (c_parser_generic_selection): Likewise.
518         * c-tree.h (pedwarn_c99): Update declaration.
519         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
520         of pedwarn_c99.
522 2014-08-19  Marek Polacek  <polacek@redhat.com>
524         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
525         to pedwarn_c90.
526         * c-errors.c: Include "opts.h".
527         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
528         * c-parser.c (disable_extension_diagnostics): Handle negative value
529         of warn_c90_c99_compat, too.
530         (restore_extension_diagnostics): Likewise.
531         (c_parser_compound_statement_nostart): Pass
532         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
534 2014-08-12  Marek Polacek  <polacek@redhat.com>
536         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
537         Add pedwarn.
538         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
539         Likewise.
540         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
542 2014-08-10 Marek Polacek  <polacek@redhat.com>
544         PR c/51849
545         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
546         Call pedwarn_c90 instead of pedwarn.
547         (check_bitfield_type_and_width): Likewise.
548         (declspecs_add_qual): Likewise.
549         (declspecs_add_type): Likewise.
550         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
551         Adjust to only call pedwarn_c90.
552         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
553         pedwarn_c90 instead of pedwarn.
554         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
555         * c-parser.c (disable_extension_diagnostics): Handle
556         warn_c90_c99_compat.
557         (restore_extension_diagnostics): Likewise.
558         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
559         pedwarn_c90 instead of pedwarn.
560         (c_parser_initelt): Likewise.
561         (c_parser_postfix_expression): Likewise.
562         (c_parser_postfix_expression_after_paren_type): Likewise.
563         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
564         * c-tree.h: Fix formatting.
565         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
566         pedwarn_c90 instead of pedwarn.
568 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
570         * c-typeck.c: Remove include of pointer-set.h.
572 2014-08-07  Marek Polacek  <polacek@redhat.com>
574         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
576 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
578         * c-typeck.c: Use hash_map instead of pointer_map.
580 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
582         * c-decl.c: Use hash_set instead of pointer_set.
584 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
586         PR middle-end/61455
587         * c-array-notation.c (expand_array_notations): Handling
588         of DECL_EXPR added.
590 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
592         PR c++/60517
593         * c-typeck.c (c_finish_return): Return 0 instead of the address of
594         a local variable.
596 2014-07-30  Tom Tromey  <tromey@redhat.com>
598         * c-typeck.c (struct constructor_stack) <designator_depth>: New
599         field.
600         (really_start_incremental_init, push_init_level): Initialize
601         designator_depth.
602         (pop_init_level): Set global designator_depth.
603         (process_init_element): Check for designated_init attribute.
605 2014-07-20  Marek Polacek  <polacek@redhat.com>
607         PR c/61852
608         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
609         (implicitly_declare): Pass location to implicit_decl_warning.
611 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
613         PR middle-end/61294
614         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
615         If non-NULL, call c_parser_check_literal_zero.
616         (c_parser_check_literal_zero): New function.
617         (c_parser_postfix_expression_after_primary): Adjust
618         c_parser_expr_list caller, handle -Wmemset-transposed-args.
620 2014-07-06  Marek Polacek  <polacek@redhat.com>
622         PR c/6940
623         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
624         * c-tree.h (C_ARRAY_PARAMETER): Define.
625         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
626         function parameter.
628 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
629             Chen Gang <gang.chen.5i5j@gmail.com>
631         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
632         releasing symbol.
634 2014-07-01  Marek Polacek  <polacek@redhat.com>
636         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
637         instead of 0 to WARN_FOR_ASSIGNMENT.
639 2014-07-01  Marek Polacek  <polacek@redhat.com>
641         PR c/58286
642         * c-typeck.c (convert_for_assignment): Pass
643         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
645 2014-06-30  Marek Polacek  <polacek@redhat.com>
647         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
648         has no_sanitize_undefined attribute.
650 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
652         PR middle-end/57541
653         * c-array-notation.c (fix_builtin_array_notation_fn):
654         Check for 0 arguments in builtin call. Check that bultin argument is
655         correct.
656         * c-parser.c (c_parser_array_notation): Check for incorrect initial
657         index.
659 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
661         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
662         qualifiers in __auto_type for atomic types.
663         (c_parser_typeof_specifier): Discard all type qualifiers in
664         __typeof__ for atomic types.
666 2014-06-25  Marek Polacek  <polacek@redhat.com>
668         PR c/61162
669         * c-parser.c (c_parser_statement_after_labels): Pass the location of
670         the return expression to c_finish_return.
672 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
674         * c-typeck.c (c_finish_omp_clauses): Make sure
675         OMP_CLAUSE_LINEAR_STEP has correct type.
677 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
679         * c-decl.c: Adjust.
681 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
683         * c-parser.c (c_parser_omp_for_loop): For
684         #pragma omp parallel for simd move lastprivate clause from parallel
685         to for rather than simd.
687 2014-06-23  Marek Polacek  <polacek@redhat.com>
689         * c-typeck.c (parser_build_binary_op): Don't call
690         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
692 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
694         * c-parser.c (c_parser_omp_threadprivate): Likewise.
695         * c-decl.c (merge_decls): Likewise.
697 2014-06-09  Marek Polacek  <polacek@redhat.com>
699         PR c/36446
700         * c-typeck.c (error_init): Call inform instead of error_at.
701         (pedwarn_init): Call inform instead of pedwarn.
702         (warning_init): Call inform instead of warning_at.
704 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
706         * c-decl.c (merge_decls): Use set_decl_section_name.
707         (duplicate_decls): Remove node if it exists.
709 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
711         PR c/53119
712         * c-typeck.c (push_init_level, process_init_element,
713         pop_init_level): Correct check for zero initialization, move
714         missing brace warning to respect zero initialization.
716 2014-06-05  Marek Polacek  <polacek@redhat.com>
718         PR c/56724
719         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
721 2014-06-05  Marek Polacek  <polacek@redhat.com>
723         PR c/49706
724         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
725         on the left hand side operand of a comparison. 
727 2014-06-05  Marek Polacek  <polacek@redhat.com>
729         PR c/48062
730         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
731         Print note only if the warning was printed.
733 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
735         PR c/58942
736         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
737         with a pointer.
739 2014-06-03  Marek Polacek  <polacek@redhat.com>
741         PR c/60439
742         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
743         c_start_case.
744         * c-tree.h (c_start_case): Update.
745         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
746         switch condition has boolean value.
748 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
750         * c-decl.c: Include builtins.h.
751         * c-parser.c: Likewise.
753 2014-05-27  Marek Polacek  <polacek@redhat.com>
755         PR c/56724
756         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
757         error and warning calls to error_at and warning_at.  Pass location of
758         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
759         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
760         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
762 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
764         PR c/61191
765         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
766         function parameters.
768 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
770         * c-decl.c (merge_decls): Preserve symtab node pointers.
771         (duplicate_decls): Free new decl.
773 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
775         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
776         initialization.
778         * c-parser.c (c_parser_omp_target): Return bool values.
780 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
782         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
783         num_teams_loc variable to num_thread_limit_loc.
785 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
787         * c-array-notation.c (expand_array_notations): Use void_node
788         instead of void_zero_node.
790 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
792         * c-decl.c (finish_struct): Adjust.
793         (finish_enum): Likewise.
794         (bind): Adjust.
795         (record_inline_static): Likewise.
796         (push_scope): Likewise.
797         (make_label): Likewise.
798         (lookup_label_for_goto): Likewise.
799         (finish_struct): Likewise.
800         (finish_enum): Likewise.
801         (store_parm_decls): Likewise.
802         (c_push_function_context): Likewise.
803         * c-lang.h: Remove usage of variable_size gty attribute.
804         * c-parser.c (c_parse_init): Adjust.
805         (c_parse_file): Likewise.
807 2014-05-13  Marek Polacek  <polacek@redhat.com>
809         PR c/61162
810         * c-typeck.c (convert_for_assignment): Pass location to
811         WARN_FOR_ASSIGNMENT instead of input_location.
813 2014-05-10  Marek Polacek  <polacek@redhat.com>
815         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
816         maybe_warn_string_init.
817         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
818         maybe_warn_string_init.
819         * c-tree.h (maybe_warn_string_init): Update declaration.
820         * c-typeck.c (maybe_warn_string_init): Add location parameter.
821         Call pedwarn_init with loc instead of with input_location.
822         (digest_init): Pass init_loc to maybe_warn_string_init.
823         (pop_init_level): Call pedwarn_init with loc instead of with
824         input_location.
825         (set_init_index): Likewise.
826         (process_init_element): Likewise.
828 2014-05-09  Marek Polacek  <polacek@redhat.com>
830         PR c/61096
831         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
832         (c_parser_initelt): Pass location to set_init_label.  Pass array index
833         location to set_init_index.
834         * c-tree.h (push_init_level): Update declaration.
835         (pop_init_level): Likewise.
836         (set_init_index): Likewise.
837         (set_init_label): Likewise.
838         * c-typeck.c (error_init): Add location parameter.  Call error_at
839         instead of error.
840         (digest_init): Pass init_loc to error_init.
841         (really_start_incremental_init):
842         (push_init_level): Add location parameter.  Pass loc to pop_init_level
843         and error_init.
844         (pop_init_level): Likewise.
845         (set_designator): Add location parameter.  Pass loc to pop_init_level,
846         push_init_level, and error_init.
847         (set_init_index): Add location parameter.  Pass loc to error_init and
848         set_designator.
849         (set_init_label): Likewise.
850         (output_init_element): Pass loc to error_init.
851         (process_init_element): Pass loc to error_init, pop_init_level,
852         pedwarn_init, and push_init_level.
854 2014-05-09  Marek Polacek  <polacek@redhat.com>
856         PR c/50459
857         * c-parser.c (c_parser_attributes): Parse the arguments as an
858         expression-list if the attribute takes identifier.
860 2014-05-08  Marek Polacek  <polacek@redhat.com>
862         PR c/61053
863         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
864         TYPE_ALIGN_UNIT.
866 2014-05-08  Marek Polacek  <polacek@redhat.com>
868         PR c/61077
869         * c-decl.c (start_function): Warn for _Atomic-qualified return type
870         of main.
872 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
873             Mike Stump  <mikestump@comcast.net>
874             Richard Sandiford  <rdsandiford@googlemail.com>
876         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
877         (finish_enum): Use wide-int interfaces.
878         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
879         * c-typeck.c (build_c_cast): Likewise.
880         (set_nonincremental_init_from_string): Likewise.
881         (c_tree_equal): Likewise.
883 2014-05-02  Marek Polacek  <polacek@redhat.com>
885         PR c/25801
886         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
887         Return size_one_node when the type is not complete.
888         (pointer_diff): Remove comment.
889         (build_unary_op): Improve error messages.
891 2014-05-02  Marek Polacek  <polacek@redhat.com>
893         * c-typeck.c (c_finish_return): Separate warning_at calls.
895 2014-05-02  Marek Polacek  <polacek@redhat.com>
897         * c-tree.h (error_init): Remove declaration.
898         (pedwarn_init): Likewise.
899         * c-typeck.c (error_init): Make static and move above.
900         (pedwarn_init): Likewise.
901         (warning_init): Move above.
902         (maybe_warn_string_init): Likewise.
904 2014-05-01  Jeff Law  <law@redhat.com>
906         Revert:
908         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
909         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
910         avoid goto.
912 2014-05-02  Marek Polacek  <polacek@redhat.com>
914         PR c/60784
915         * c-typeck.c (push_init_level): Set constructor_designated to
916         p->designated for structures.
918 2014-05-01  Marek Polacek  <polacek@redhat.com>
920         PR c/60915
921         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
922         function-definition has an attribute after the declarator.
924 2014-05-01  Marek Polacek  <polacek@redhat.com>
926         PR c/60257
927         * c-typeck.c (warning_init): Add location_t parameter.  Call
928         warning_at instead of warning.
929         (push_init_level): Pass input_location to warning_init.
930         (add_pending_init): Add location_t parameter.  Pass loc to
931         warning_init.
932         (set_nonincremental_init): Pass input_location to add_pending_init.
933         (set_nonincremental_init_from_string): Likewise.
934         (output_init_element): Pass loc to warning_init and to
935         add_pending_init.
937 2014-05-01  Marek Polacek  <polacek@redhat.com>
939         PR c/43395
940         * c-typeck.c (c_finish_return): Distinguish between label and variable
941         when warning about returning local address.
943 2014-05-01  Marek Polacek  <polacek@redhat.com>
945         PR c/29467
946         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
947         in C89 mode.
949 2014-05-01  Marek Polacek  <polacek@redhat.com>
951         PR c/43245
952         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
953         instead of 0 to WARN_FOR_QUALIFIERS.
955 2014-05-01  Marek Polacek  <polacek@redhat.com>
957         PR c/56989
958         * c-typeck.c (default_conversion): Use better location for
959         error call.
961 2014-04-30  Marek Polacek  <polacek@redhat.com>
963         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
964         also when SANITIZE_FLOAT_DIVIDE is on.
966 2014-04-30  Marek Polacek  <polacek@redhat.com>
968         PR c/60139
969         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
970         and pedwarn_init.  Use loc insted of input_location.
972 2014-04-30  Marek Polacek  <polacek@redhat.com>
974         PR c/60351
975         * c-typeck.c (build_binary_op): Use location when warning about
976         shift count.
978 2014-04-25  Marek Polacek  <polacek@redhat.com>
980         PR c/18079
981         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
982         always_inline/noinline and hot/cold attributes.
984 2014-04-25  Marek Polacek  <polacek@redhat.com>
986         PR c/60114
987         * c-parser.c (c_parser_initelt): Pass input_location to
988         process_init_element.
989         (c_parser_initval): Pass loc to process_init_element.
990         * c-tree.h (process_init_element): Adjust declaration.
991         * c-typeck.c (push_init_level): Pass input_location to
992         process_init_element.
993         (pop_init_level): Likewise.
994         (set_designator): Likewise.
995         (output_init_element): Add location_t parameter.  Pass loc to
996         digest_init.
997         (output_pending_init_elements): Pass input_location to
998         output_init_element.
999         (process_init_element): Add location_t parameter.  Pass loc to
1000         output_init_element.
1002 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
1004         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1005         atomic-clause, allow comma in between atomic-clause and
1006         seq_cst.
1008 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
1010         PR c/59073
1011         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1012         fails, don't set OM_PARALLEL_COMBINED and return NULL.
1014 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
1016         PR middle-end/60469
1017         * c-array-notation.c (fix_builtin_array_notation_fn): Use
1018         create_tmp_var instead build_decl for creating temps.
1019         (build_array_notation_expr): Likewise.
1020         (fix_conditional_array_notations_1): Likewise.
1021         (fix_array_notation_expr): Likewise.
1022         (fix_array_notation_call_expr): Likewise.
1024 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
1026         PR c++/60689
1027         * c-tree.h (c_build_function_call_vec): New prototype.
1028         * c-typeck.c (build_function_call_vec): Don't call
1029         resolve_overloaded_builtin here.
1030         (c_build_function_call_vec): New wrapper function around
1031         build_function_call_vec.  Call resolve_overloaded_builtin here.
1032         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1033         Call c_build_function_call_vec instead of build_function_call_vec.
1034         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1035         * c-decl.c (finish_decl): Likewise.
1037 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1039         PR c/55383
1040         * c-typeck.c: Use correct format string in cast-qual warning
1042 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
1044         * c-decl.c (c_decl_attributes): Use
1045         lang_hooks.types.omp_mappable_type.
1046         * c-typeck.c (c_finish_omp_clauses): Likewise.
1048 2014-03-06  Marek Polacek  <polacek@redhat.com>
1050         PR c/60197
1051         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1052         of checking tree code.
1054 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1056         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1057         (c_parser_parameter_declaration): Likewise.
1059 2014-02-19  Marek Polacek  <polacek@redhat.com>
1061         PR c/60195
1062         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1063         Call mark_exp_read on exp.value.
1064         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
1065         TREE_ADDRESSABLE on old instead of val.
1066         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1068 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1070         * c-parser.c (c_parser_get_builtin_args): Replace calls to
1071         C_EXPR_APPEND by vec_safe_push.
1072         * c-tree.h (C_EXPR_APPEND): Remove.
1074 2014-01-31  Marek Polacek  <polacek@redhat.com>
1076         PR c/59963
1077         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1078         build_function_call_vec.
1079         (build_function_call): Likewise.
1080         (build_atomic_assign): Likewise.
1081         (build_function_call_vec): Add arg_loc parameter.  Use it.
1082         (convert_arguments): Likewise.
1083         (convert_for_assignment): Rename rhs_loc to expr_loc.
1084         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1085         (c_parser_objc_keywordexpr): Likewise.
1086         (c_parser_postfix_expression_after_primary): Call
1087         build_function_call_vec with expr_loc rather than op_loc.
1088         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
1089         build_function_call_vec.
1090         (c_parser_expr_list): Add locations parameter.  Fill it with locations
1091         of function arguments.
1092         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1094 2014-01-30  Marek Polacek  <polacek@redhat.com>
1096         PR c/59940
1097         * c-typeck.c (build_function_call_vec): Use loc parameter.
1098         (convert_arguments): Add location parameter.  Use it.
1099         (ep_convert_and_check): Likewise.
1100         (build_atomic_assign): Adjust convert_for_assignment call.
1101         (build_modify_expr): Likewise.
1102         (digest_init): Likewise.
1103         (c_finish_return): Likewise.
1104         (build_conditional_expr): Adjust ep_convert_and_check calls.
1105         (convert_for_assignment): Add rhs_loc parameter.  Use it.
1106         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1107         calls.
1109 2014-01-30  Richard Biener  <rguenther@suse.de>
1111         PR c/59905
1112         * c-typeck.c (build_function_call_vec): Do not replace calls
1113         to a function via an incompatible type with a runtime abort.
1115 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1117         * c-parser.c (c_parser_declaration_or_fndef): Replaced
1118         flag_enable_cilkplus with flag_cilkplus.
1119         (c_parser_direct_declarator_inner): Likewise.
1120         (c_parser_attribute_any_word): Likewise.
1121         (c_parser_attributes): Likewise.
1122         (c_parser_compound_statement): Likewise.
1123         (c_parser_statement_after_labels): Likewise.
1124         (c_parser_if_statement): Likewise.
1125         (c_parser_switch_statement): Likewise.
1126         (c_parser_do_statement): Likewise.
1127         (c_parser_for_statement): Likewise.
1128         (c_parser_unary_expression): Likewise.
1129         (c_parser_postfix_expression): Likewise.
1130         (c_parser_postfix_expression_after_primary): Likewise.
1131         (c_parser_postfix_expression_after_primary): Likewise.
1132         (c_parser_omp_clause_name): Likewise.
1133         (c_finish_omp_declare_simd): Likewise.
1134         (c_parser_cilk_verify_simd): Likewise.
1135         * c-typeck.c (build_array_ref): Likewise.
1136         (build_function_call_vec): Likewise.
1137         (convert_arguments): Likewise.
1138         (build_compound_expr): Likewise.
1139         (c_finish_return): Likewise.
1140         (c_finish_if_stmt): Likewise.
1141         (c_finish_loop): Likewise.
1142         (build_binary_op): Likewise.
1144 2014-01-23  Marek Polacek  <polacek@redhat.com>
1146         PR c/59846
1147         * c-typeck.c (parser_build_binary_op): Use location instead of
1148         input_location.
1149         (build_binary_op): Pass location to shorten_compare.
1151 2014-01-23  Marek Polacek  <polacek@redhat.com>
1153         PR c/58346
1154         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1155         an empty aggregate.
1157 2014-01-23  Marek Polacek  <polacek@redhat.com>
1159         PR c/59871
1160         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1161         of a comma expression.
1162         (emit_side_effect_warnings): Likewise.
1164 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1166         PR c/59825
1167         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1168         function to use walk_tree and moved a lot of its functionality to
1169         expand_array_notations.
1170         (expand_array_notations): New function.
1172 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1174         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1175         attribute an attribute without value.
1177 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
1179         PR middle-end/58809
1180         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1181         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1183 2014-01-22  Marek Polacek  <polacek@redhat.com>
1185         PR c/59891
1186         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1187         of remove_c_maybe_const_expr on op1 and op2.
1189 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
1191         PR c/58943
1192         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1193         effects, preevaluate rhs using SAVE_EXPR first.
1195 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1197         PR c++/59631
1198         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1199         statements with if-elseif statements.
1201 2014-01-06  Marek Polacek  <polacek@redhat.com>
1203         PR c/57773
1204         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1205         defined bit-field types only in ISO C.
1207 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1209         Update copyright years
1211 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1213         * c-array-notation.c: Use the standard form for the copyright notice.
1215 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1217         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1218         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1219         field in parser is not empty.  If not-empty, call the function
1220         c_parser_finish_omp_declare_simd.
1221         (c_parser_cilk_clause_vectorlength): Modified function to be shared
1222         between SIMD-enabled functions and #pragma simd.  Added new parameter.
1223         (c_parser_cilk_all_clauses): Modified the usage of the function
1224         c_parser_cilk_clause_vectorlength as mentioned above.
1225         (c_parser_cilk_simd_fn_vector_attrs): New function.
1226         (c_finish_cilk_simd_fn_tokens): Likewise.
1227         (is_cilkplus_vector_p): Likewise.
1228         (c_parser_omp_clause_name): Added checking for "vectorlength,"
1229         "nomask," and "mask" strings in clause name.
1230         (c_parser_omp_all_clauses): Added 3 new case statements:
1231         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1232         PRAGMA_CILK_CLAUSE_NOMASK.
1233         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
1234         check for vector attribute and if so call the function
1235         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
1236         called the function c_finish_cilk_simd_fn_tokens.
1237         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1238         parser field is non-empty.  If so, parse them as you would parse
1239         the omp declare simd pragma.
1240         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1241         Added a check when step is a parameter and flag it as error.
1242         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1243         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1244         pragma_omp_clause.
1246 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
1248         * c-parser.c (c_parser_omp_parallel): Fix description.
1250 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1252         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1253         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1254         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1255         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1257 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
1259         PR c/52023
1260         * c-parser.c (c_parser_alignas_specifier): Use
1261         c_sizeof_or_alignof_type instead of c_alignof.
1262         (c_parser_alignof_expression): Likewise, with min_alignof
1263         parameter depending on alignof spelling used.
1265 2013-12-04  Marek Polacek  <polacek@redhat.com>
1267         PR c/54113
1268         * c-decl.c (start_function): Don't warn for missing prototype for
1269         inline functions.
1271 2013-12-03  Marek Polacek  <polacek@redhat.com>
1273         PR c/59351
1274         * c-decl.c (build_compound_literal): Allow compound literals with
1275         empty initial value.
1277 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
1279         PR c/58235
1280         * c-typeck.c (build_modify_expr): Diagnose assignment to
1281         expression with array type.
1283 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1285         PR c/42262
1286         * c-typeck.c (process_init_element): Do not treat a string as
1287         initializing a whole array when used with a designator for an
1288         individual element.
1290 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1292         PR c/57574
1293         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1294         an inline function following a static declaration.
1296 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
1298         PR c/59310
1299         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1300         to p_name before calling c_parser_omp_teams instead of after.
1301         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1302         argument.  Remove unused p_name variable.
1304 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
1305             Jakub Jelinek  <jakub@redhat.com>
1307         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1308         external_scope is NULL.
1310 2013-11-27  Tom de Vries  <tom@codesourcery.com>
1311             Marc Glisse  <marc.glisse@inria.fr>
1313         PR c++/59032
1314         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1316 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
1318         * c-typeck.c: Add required include files from gimple.h.
1320 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
1322         * c-decl.c (define_label, shadow_tag_warned)
1323         (check_bitfield_type_and_width, grokdeclarator, grokparms,
1324         store_parm_decls_newstyle, store_parm_decls_oldstyle)
1325         (declspecs_add_type): Remove use of in_system_header macro.
1326         * c-parser.c (c_parser_unary_expression): Likewise.
1327         * c-typeck.c (store_init_value, process_init_element)
1328         (c_start_case): Likewise.
1330         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1331         macro.
1333         * c-parser.c (c_parser_set_source_position_from_token): Remove
1334         reference to in_system_header from comment.
1336 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1338         * c-decl.c (grokdeclarator): Update comment to refer to
1339         tree_to_[su]hwi rather than tree_low_cst.
1341 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1343         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1344         tree_to_uhwi throughout.
1346 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1348         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1349         throughout.
1351 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1353         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1354         throughout.
1356 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
1358         * c-parser.c (c_parser_cilk_simd): New.
1359         (c_parser_cilk_verify_simd): New.
1360         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1361         (c_parser_omp_for_loop): Add case for NE_EXPR.
1362         Set c_break_label for CILK_SIMD.
1363         (c_parser_cilk_clause_vectorlength): New.
1364         (c_parser_cilk_clause_linear): New.
1365         (c_parser_cilk_clause_name): New.
1366         (c_parser_cilk_all_clauses): New.
1367         * c-typeck.c (build_unary_op): Pass location argument to
1368         readonly_error.
1369         (build_modify_expr): Same.
1370         (build_asm_expr): Same.
1371         (c_finish_bc_stmt): Error on break/continue in loops.
1373 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
1375         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1377 2013-11-14  Diego Novillo  <dnovillo@google.com>
1379         * c-decl.c: Include print-tree.h.
1380         Include stor-layout.h.
1381         Include varasm.h.
1382         Include attribs.h.
1383         Include stringpool.h.
1384         * c-lang.c: Include fold-const.h.
1385         * c-parser.c: Include stringpool.h.
1386         Include attribs.h.
1387         Include stor-layout.h.
1388         Include varasm.h.
1389         Include trans-mem.h.
1390         * c-typeck.c: Include stor-layout.h.
1391         Include trans-mem.h.
1392         Include varasm.h.
1393         Include stmt.h.
1395 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
1397         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1398         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1399         __auto_type.
1400         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1401         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1402         RID_AUTO_TYPE.
1403         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1404         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1405         (c_parser_declarator, c_parser_direct_declarator_inner)
1406         (c_parser_parameter_declaration, c_parser_type_name): All callers
1407         changed.
1408         (c_parser_declaration_or_fndef): Handle declarations with type
1409         determined from the initializer.
1411 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
1413         * c-typeck.c: Include gimplify.h.
1415 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
1417         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1418         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1419         comment.
1420         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1421         or _Thread_local as appropriate in diagnostics.
1422         (build_null_declspecs): Initialize ret->thread_gnu_p.
1423         (declspecs_add_scspec): Handle either __thread or _Thread_local
1424         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
1425         pedantic.  Do not disallow _Thread_local extern and _Thread_local
1426         static.
1428 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
1429             Andrew MacLeod  <amacleod@redhat.com>
1431         * c-aux-info.c (gen_type): Handle atomic qualifier.
1432         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1433         qualifiers when compating types.
1434         (shadow_tag_warned): Handle atomic_p in declspecs.
1435         (quals_from_declspecs): Likewise.
1436         (start_decl): Use c_type_promotes_to when promoting argument
1437         types.
1438         (grokdeclarator): Handle _Atomic.
1439         (get_parm_info): Diagnose any qualifier on "void" as only
1440         parameter.
1441         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1442         comparing types.  Use c_type_promotes_to when promoting argument
1443         types.
1444         (finish_function): Use c_type_promotes_to when promoting argument
1445         types.
1446         (build_null_declspecs): Handle atomic_p in declspecs.
1447         (declspecs_add_qual): Handle RID_ATOMIC.
1448         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1449         (c_token_starts_declspecs): Handle RID_ATOMIC.
1450         (c_parser_declspecs): Handle atomic type specifiers and
1451         qualifiers.
1452         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1453         from types of expressions with atomic type.
1454         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1455         (c_parser_attribute_any_word): Handle RID_ATOMIC.
1456         (c_parser_initializer, c_parser_initelt, c_parser_initval)
1457         (c_parser_statement_after_labels, c_parser_switch_statement)
1458         (c_parser_for_statement, c_parser_expr_no_commas)
1459         (c_parser_conditional_expression, c_parser_binary_expression)
1460         (c_parser_cast_expression, c_parser_unary_expression)
1461         (c_parser_postfix_expression)
1462         (c_parser_postfix_expression_after_primary, c_parser_expression):
1463         Use convert_lvalue_to_rvalue.
1464         (c_parser_expression_conv, c_parser_expr_list): Document
1465         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
1466         (c_parser_objc_synchronized_statement): Use
1467         convert_lvalue_to_rvalue.
1468         (c_parser_objc_selector): Handle RID_ATOMIC.
1469         (c_parser_objc_receiver, c_parser_array_notation): Use
1470         convert_lvalue_to_rvalue.
1471         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1472         _Atomic (type-name).
1473         (struct c_declspecs): Add atomic_p field.
1474         (convert_lvalue_to_rvalue): Declare.
1475         * c-typeck.c (c_type_promotes_to): Promote atomic types to
1476         corresponding atomic types.
1477         (qualify_type): Don't add _Atomic qualifiers from second argument.
1478         (comp_target_types): Do not allow _Atomic mismatches.
1479         (type_lists_compatible_p): Do not remove atomic qualifiers when
1480         comparing types.
1481         (really_atomic_lvalue, convert_lvalue_to_rvalue)
1482         (build_atomic_assign): New functions.
1483         (build_unary_op): Use build_atomic_assign for atomic increment and
1484         decrement.
1485         (build_conditional_expr): Do not treat _Atomic void as a qualified
1486         version of void.
1487         (build_modify_expr): Use build_atomic_assign for atomic LHS.
1488         (find_anonymous_field_with_type, convert_to_anonymous_field)
1489         (convert_for_assignment): Do not remove atomic qualifiers when
1490         comparing types.
1491         (digest_init): Do not accept initialization of arrays of atomic
1492         elements by string constants.
1493         (build_asm_expr): Use convert_lvalue_to_rvalue.
1494         (build_binary_op): Do not treat _Atomic void as a qualified
1495         version of void.
1497 2013-11-06  DJ Delorie  <dj@redhat.com>
1499         * c-decl.c (locate_old_decl): If a previous conflicting decl is
1500         both explicit and builtin, print the location of the explicit one.
1502 2013-11-05  Tobias Burnus  <burnus@net-b.de>
1504         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1505         c_parser_omp_distribute, c_parser_omp_teams,
1506         c_parser_omp_target, c_parser_omp_declare): Handle
1507         -fopenmp-simd.
1509 2013-11-03  Marek Polacek  <polacek@redhat.com>
1511         * c-decl.c (grokdeclarator): Add VLA instrumentation.
1513 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
1515         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1516         check_dup_generic at the end, unless remove is true.
1517         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1518         remove = true;.
1519         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1521 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
1523         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1524         with decl that is not pointer nor array.
1526 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1528         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1529         a spawning function is found.
1530         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1531         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1532         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1533         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1534         case.
1535         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1536         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1537         expr.
1538         (c_finish_return): Added a check to reject _Cilk_spawn in return
1539         expression.
1540         (build_cilk_spawn): New function.
1541         (build_cilk_sync): Likewise.
1542         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1543         
1544 2013-10-27  Tobias Burnus  <burnus@net-b.de>
1546         PR other/33426
1547         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1548         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1549         (c_parser_statement_after_labels): Update calls.
1551 2013-10-24  Tobias Burnus  <burnus@net-b.de>
1553         PR other/33426
1554         * c-parser.c (c_parser_pragma, c_parser_for_statement):
1555         Handle PRAGMA_IVDEP.
1556         (c_parser_statement_after_labels): Update call.
1558 2013-10-24  Marek Polacek  <polacek@redhat.com>
1560         * c-parser.c (c_parser_struct_declaration): Add a comment.
1561         (c_parser_declarator): Don't allow _Alignas here.
1563 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
1565         * c-parser.c: Include omp-low.h.
1566         * c-typeck.c: Likewise.
1568 2013-10-17  Marek Polacek  <polacek@redhat.com>
1570         PR c/58267
1571         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1572         Document syntax of the array-declarator.
1573         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1574         are not permitted.
1575         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1576         (c_parser_struct_declaration): Likewise.
1577         (c_parser_declarator): Likewise.
1578         (c_parser_direct_declarator_inner): Likewise.
1579         (c_parser_parameter_declaration): Likewise.
1580         (c_parser_type_name): Likewise.
1582 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1584         * c-lang.h (current_omp_declare_target_attribute): New extern
1585         decl.
1586         * c-parser.c: Include c-lang.h.
1587         (struct c_parser): Change tokens to c_token *.
1588         Add tokens_buf field.  Change tokens_avail type to unsigned int.
1589         (c_parser_consume_token): If parser->tokens isn't
1590         &parser->tokens_buf[0], increment parser->tokens.
1591         (c_parser_consume_pragma): Likewise.
1592         (enum pragma_context): Add pragma_struct and pragma_param.
1593         (c_parser_external_declaration): Adjust
1594         c_parser_declaration_or_fndef caller.
1595         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1596         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1597         Adjust recursive call.
1598         (c_parser_struct_or_union_specifier): Use pragma_struct instead
1599         of pragma_external.
1600         (c_parser_parameter_declaration): Use pragma_param instead of
1601         pragma_external.
1602         (c_parser_compound_statement_nostart, c_parser_label,
1603         c_parser_for_statement): Adjust
1604         c_parser_declaration_or_fndef callers.
1605         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1606         it through to c_parser_conditional_expression.
1607         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1608         pass it through to c_parser_binary_expression.  Adjust recursive
1609         call.
1610         (c_parser_binary_expression): Remove prec argument, add
1611         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
1612         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1613         binop matches it, use build2 instead of parser_build_binary_op.
1614         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1615         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1616         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1617         Handle pragma_struct and pragma_param the same as pragma_external.
1618         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1619         (c_parser_omp_variable_list): Parse array sections for
1620         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1621         (c_parser_omp_clause_collapse): Fully fold collapse expression.
1622         (c_parser_omp_clause_reduction): Handle user defined reductions.
1623         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1624         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1625         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1626         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1627         c_parser_omp_clause_depend, c_parser_omp_clause_map,
1628         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1629         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1630         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1631         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
1632         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
1633         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1634         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
1635         (c_parser_omp_for_loop): Add CODE argument, pass it through
1636         to c_finish_omp_for.  Change last argument to cclauses,
1637         and adjust uses to grab parallel clauses from the array of all
1638         the split clauses.  Adjust c_parser_binary_expression,
1639         c_parser_declaration_or_fndef and c_finish_omp_for callers.
1640         (omp_split_clauses): New function.
1641         (c_parser_omp_simd): New function.
1642         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1643         Allow the function to be called also when parsing combined constructs,
1644         and call c_parser_omp_simd when parsing for simd.
1645         (c_parser_omp_sections_scope): If section-sequence doesn't start with
1646         #pragma omp section, require exactly one structured-block instead of
1647         sequence of statements.
1648         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1649         Allow the function to be called also when parsing combined constructs.
1650         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1651         Allow the function to be called also when parsing combined
1652         constructs.
1653         (c_parser_omp_taskgroup, c_parser_omp_cancel,
1654         c_parser_omp_cancellation_point, c_parser_omp_distribute,
1655         c_parser_omp_teams, c_parser_omp_target_data,
1656         c_parser_omp_target_update, c_parser_omp_target,
1657         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1658         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1659         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1660         (c_parser_omp_construct): Add p_name and mask vars.  Handle
1661         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1662         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
1663         and c_parser_omp_sections callers.
1664         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1665         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1666         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1667         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
1668         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
1669         OMP_CLAUSE_DEPEND.
1670         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1671         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1672         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1673         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1674         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1675         * c-typeck.c: Include tree-inline.h.
1676         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1677         handle_omp_array_sections_1, handle_omp_array_sections,
1678         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1679         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1680         user defined reductions.
1681         (c_tree_equal): New function.
1682         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1683         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1684         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1685         c_check_omp_declare_reduction_r): New prototypes.
1686         * c-decl.c (current_omp_declare_target_attribute): New variable.
1687         (c_decl_attributes): New function.
1688         (start_decl, start_function): Use it instead of decl_attributes.
1689         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1690         c_omp_reduction_decl, c_omp_reduction_lookup,
1691         c_check_omp_declare_reduction_r): New functions.
1693 2013-09-25  Tom Tromey  <tromey@redhat.com>
1695         * Make-lang.in (c/gccspec.o): Remove.
1696         (CFLAGS-c/gccspec.o): New variable.
1697         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1698         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1699         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1701 2013-09-25  Tom Tromey  <tromey@redhat.com>
1703         * Make-lang.in (c/gccspec.o): Don't use subshell.
1705 2013-09-18  Marek Polacek  <polacek@redhat.com>
1707         PR sanitize/58443
1708         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1709         Remove unnecessary check.
1711 2013-09-18  Marek Polacek  <polacek@redhat.com>
1713         PR sanitizer/58411
1714         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1715         no_sanitize_undefined attribute.
1717 2013-09-13  Kai Tietz  <ktietz@redhat.com>
1719         PR target/57848
1720         * c-decl.c (c_builtin_function_ext_scope): Remove
1721         wrong assumption that it is never called on prexisting
1722         symbol.
1724 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
1726         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1728 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1730         * c-objc-common.c (c_tree_printer): Tidy.
1732 2013-08-30  Marek Polacek  <polacek@redhat.com>
1734         * c-typeck.c (build_binary_op): Add division by zero and shift
1735         instrumentation.
1737 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
1738             Joseph Myers  <joseph@codesourcery.com>
1740         PR c/35649
1741         * c-typeck.c (c_common_type): Prefer double_type_node over
1742         other REAL_TYPE types with the same precision.
1743         (convert_arguments): Likewise.
1745 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1747         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1748         (c_initialize_diagnostics): Call a destructor for the early printer.
1750 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1752         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1753         printer initialization.
1755 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1757         PR c/57490
1758         * c-array-notation.c (fix_conditional_array_notations_1): Added a
1759         check for truth values.
1760         (expand_array_notation_exprs): Added truth values case.  Removed an
1761         unwanted else.  Added for-loop to walk through subtrees in default
1762         case.
1764 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1766         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1768 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
1770         * c-parser.c (struct c_generic_association): Fix typo.
1772 2013-07-23  Tom Tromey  <tromey@redhat.com>
1773             Joseph Myers  <joseph@codesourcery.com>
1775         * c-parser.c (struct c_generic_association): New.
1776         (c_generic_association_d): New typedef.
1777         (c_parser_generic_selection): New function.
1778         (c_parser_postfix_expression): Handle RID_GENERIC.
1780 2013-07-13  Jason Merrill  <jason@redhat.com>
1782         PR c++/57793
1783         * c-decl.c (finish_struct): Check for too-large class.
1785 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
1787         PR c/57821
1788         * c-typeck.c (set_init_index): When folding, check for index overflow.
1790 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1792         * c-parser.c (c_parser_array_notation): Removed rejection of array
1793         notations in an array of function pointers.
1795 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1797         * c-array-notation.c (make_triplet_val_inv): New function.
1798         (create_cmp_incr): Likewise.
1799         (create_array_refs): Likewise.
1800         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1801         Also modularized common parts between functions and called the function.
1802         (build_array_notation_expr): Likewise.
1803         (fix_conditional_array_notations_1): Likewise.
1804         (fix_array_notation_expr): Likewise.
1805         (fix_array_notation_call_expr): Likewise.
1807 2013-06-18  Marek Polacek  <polacek@redhat.com>
1809         PR c/57630
1810         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1812 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1814         * c-array-notation.c (build_array_notation_expr): Reject array notation
1815         mismatch between LHS and RHS even inside a call_expr.  Also, removed
1816         a couple while statements that were dead code.
1818 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1820         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1821         excessive precision expressions in function parameters.  Also removed
1822         couple unwanted while statements.
1824 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1826         * c-array-notation.c (expand_array_notation_exprs): Added
1827         ARRAY_NOTATION_REF case.
1828         
1829 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1831         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1832         function to c-family/array-notation-common.c.
1833         (is_cilkplus_reduce_builtin): Likewise.
1834         (find_rank): Likewise.
1835         (extract_array_notation_exprs): Likewise.
1836         (replace_array_notations): Likewise.
1837         (find_inv_trees): Likewise.
1838         (replace_inv_trees): Likewise.
1839         (contains_array_notation_expr): Likewise.
1840         (find_correct_array_notation_type): Likewise.
1841         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1842         (struct inv_list): Moved this to c-family/array-notation-common.c.
1843         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1844         
1845 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1847         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1848         reduction functions outside the for-loop.  Added a check if the fundecl
1849         is non-NULL.  Finally, removed an unwanted if-statement, and made the
1850         body unconditional.
1852 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1854         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1855         condition of the if-statement matches the rank of else-block and then-
1856         block when array notations are used.
1857         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1858         expression after the entire function body is parsed.
1859         (c_parser_expr_no_commas): Delayed creating array notation expressions
1860         to the end of function parsing.
1861         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1862         whole if-statement instead of just the condition.
1863         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
1865 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1867         PR c/57474
1868         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1869         array to NULL_TREE if they are unused.  Also added a check for the
1870         field to be NULL before its fields are used in future.
1871         
1872 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1874         PR bootstrap/57450
1875         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1876         (build_array_notation_expr): Likewise.
1878 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1880         * c-typeck.c (build_array_ref): Added a check to see if array's
1881         index is greater than one.  If true, then emit an error.
1882         (build_function_call_vec): Exclude error reporting and checking
1883         for builtin array-notation functions.
1884         (convert_arguments): Likewise.
1885         (c_finish_return): Added a check for array notations as a return
1886         expression.  If true, then emit an error.
1887         (c_finish_loop): Added a check for array notations in a loop
1888         condition.  If true then emit an error.
1889         (lvalue_p): Added a ARRAY_NOTATION_REF case.
1890         (build_binary_op): Added a check for array notation expr inside
1891         op1 and op0.  If present, we call another function to find correct
1892         type.
1893         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1894         * c-parser.c (c_parser_compound_statement): Check if array
1895         notation code is used in tree, if so, then transform them into
1896         appropriate C code.
1897         (c_parser_expr_no_commas): Check if array notation is used in LHS
1898         or RHS, if so, then build array notation expression instead of
1899         regular modify.
1900         (c_parser_postfix_expression_after_primary): Added a check for
1901         colon(s) after square braces, if so then handle it like an array
1902         notation.  Also, break up array notations in unary op if found.
1903         (c_parser_direct_declarator_inner): Added a check for array
1904         notation.
1905         (c_parser_compound_statement): Added a check for array notation in
1906         a stmt.  If one is present, then expand array notation expr.
1907         (c_parser_if_statement): Likewise.
1908         (c_parser_switch_statement): Added a check for array notations in
1909         a switch statement's condition.  If true, then output an error.
1910         (c_parser_while_statement): Similarly, but for a while.
1911         (c_parser_do_statement): Similarly, but for a do-while.
1912         (c_parser_for_statement): Similarly, but for a for-loop.
1913         (c_parser_unary_expression): Check if array notation is used in a
1914         pre-increment or pre-decrement expression.  If true, then expand
1915         them.
1916         (c_parser_array_notation): New function.
1917         * c-array-notation.c: New file.
1918         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1919         
1920 2013-05-23  Mike Stump  <mikestump@comcast.net>
1922         * c-typeck.c (convert_for_assignment): Handle references to memory
1923         spaces better.
1925 2013-05-16  Jason Merrill  <jason@redhat.com>
1927         * Make-lang.in (cc1$(exeext)): Use link mutex.
1929 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
1931         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1932         to simply use OPT_Wpointer_arith.
1933         (build_unary_op): Likewise.
1935 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
1937         PR c/19449
1938         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1939         argument.  If set, or it temporarily for parsing of the first
1940         argument into force_folding_builtin_constant_p.
1941         (c_parser_postfix_expression): Adjust callers.
1943 2013-03-21  Richard Biener  <rguenther@suse.de>
1945         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1946         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
1948 2013-02-12  Marek Polacek  <polacek@redhat.com>
1950         PR c/44938
1951         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1952         origtypes to NULL.
1954 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
1956         PR c/56078
1957         * c-typeck.c (set_nonincremental_init_from_string): If
1958         constructor_max_index is NULL, treat it as if tree_int_cst_lt
1959         returned false.
1960         (process_init_element): Likewise.
1962 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
1964         PR c++/55619
1965         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1966         argument, don't call default_function_array_conversion
1967         nor c_fully_fold here.
1968         (c_parser_asm_statement): Adjust callers.
1969         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1970         and outputs here, and call default_function_array_conversion
1971         on inputs that don't need to be addressable.
1973 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
1975         PR c/39464
1976         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1977         warning require that both c_common_unsigned_type as well as
1978         c_common_signed_type is the same for both mvl and mvr types.
1980 2012-11-16  Diego Novillo  <dnovillo@google.com>
1982         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1984         * c-common.c: Use new vec API in vec.h.
1985         * c-common.h: Likewise.
1986         * c-gimplify.c: Likewise.
1987         * c-pragma.c: Likewise.
1988         * c-pretty-print.c: Likewise.
1989         * c-pretty-print.h: Likewise.
1990         * c-semantics.c: Likewise.
1991         * c-decl.c: Likewise.
1992         * c-parser.c: Likewise.
1993         * c-tree.h: Likewise.
1994         * c-typeck.c: Likewise.
1996 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
1998         PR c++/54930
1999         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2001 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2003         PR c/53066
2004         * c-decl.c (warn_if_shadowing): Do not warn if a variable
2005         shadows a function, unless the variable is a function or a
2006         pointer-to-function.
2008 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
2010         PR c/54381
2011         * c-parser.c (struct c_tree_loc_pair): Removed.
2012         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2013         add location_t * and tree * arguments, fill in array of 3
2014         sizeof_arg trees and corresponding locs.
2015         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2016         c_parser_expr_list callers.
2017         (c_parser_postfix_expression_after_primary): Likewise.  Pass
2018         array of 3 sizeof_arg trees and locs (corresponding to first
2019         3 arguments) to sizeof_pointer_memaccess_warning.
2021 2012-10-09  Lawrence Crowl  <crowl@google.com>
2023         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2024         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2025         hash table.
2027 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
2029         PR c++/54194
2030         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2031         call.
2033 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
2035         PR c++/54427
2036         * c-typeck.c: Include c-common.h.
2037         (enum stv_conv): Moved to c-common.h.
2038         (scalar_to_vector): Moved to c-common.c.
2039         (build_binary_op): Adapt to scalar_to_vector's new prototype.
2040         * Make-lang.in: c-typeck.c depends on c-common.h.
2042 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
2044         * c-decl.c (c_write_global_declarations): Fix handling of
2045         -fdump-ada-spec*.
2047 2012-09-30  Sharad Singhai  <singhai@google.com>
2049         * c-decl.c (c_write_global_declarations): Use a different method
2050         to determine if the dump has ben initialized.
2052 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
2054         PR c/54552
2055         * c-typeck.c (c_cast_expr): When casting to a type requiring
2056         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2057         c_fully_fold first.
2059 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
2061         PR c/54103
2062         * c-typeck.c (build_unary_op): Pass original argument of
2063         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2064         any C_MAYBE_CONST_EXPR, if it has integer operands.
2065         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2066         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2067         to c_objc_common_truthvalue_conversion, then remove any
2068         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
2069         c_objc_common_truthvalue_conversion not
2070         c_common_truthvalue_conversion.
2071         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2072         call note_integer_operands for arguments with integer operands
2073         that are not integer constants.
2075 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
2077         PR c/54559
2078         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2079         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2081 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
2083         PR c/54428
2084         * c-convert.c (convert): Don't call fold_convert_loc if
2085         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2086         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
2087         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2089 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
2091         PR c/54355
2092         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2093         for nested and empty_ok arguments in the call to
2094         c_parser_declaration_or_fndef.
2096 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
2098         * c-tree.h (c_last_sizeof_arg): Declare.
2099         * c-parser.c (struct c_tree_loc_pair): New type.
2100         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
2101         non-NULL.
2102         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2103         (c_parser_postfix_expression_after_primary): Likewise.  Call
2104         sizeof_pointer_memaccess_warning if needed.
2105         (sizeof_ptr_memacc_comptypes): New function.
2106         * c-typeck.c (c_last_sizeof_arg): New global variable.
2107         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2109 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
2111         * c-lang.h (lang_decl): Add variable_size GTY option.
2113 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
2115         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2116         * Make-lang.in: Fix dependencies.
2118 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
2120         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2121         and add language Makefile hooks.
2122         * config-lang.in: New file.
2123         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2124         add the required "normal" config-lang.in rules.
2125         * c-lang.h: Moved from gcc/ to here.
2126         * c-tree.h: Likewise.
2127         * c-objc-common.c: Likewise.
2128         * c-objc-common.h: Likewise.
2129         * c-typeck.c: Likewise.
2130         * c-convert.c: Likewise.
2131         * c-lang.c: Likewise.
2132         * c-aux-info.c: Likewise.
2133         * c-errors.c: Likewise.
2134         * gccspec.c: Likewise.
2135         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
2136         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
2138 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2140 Copying and distribution of this file, with or without modification,
2141 are permitted in any medium without royalty provided the copyright
2142 notice and this notice are preserved.