c6eab4ed0fc84030506aced1d05c352e7b0fc8c9
[platform/upstream/gcc.git] / gcc / c / ChangeLog
1 2015-10-02  Marek Polacek  <polacek@redhat.com>
2
3         PR c/67730
4         * c-typeck.c (convert_for_assignment): Use the expansion point
5         location throughout.
6
7 2015-10-02  Marek Polacek  <polacek@redhat.com>
8
9         PR c/64249
10         * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
11         and pass it down to c_parser_if_statement.
12         (c_parser_else_body): Add CHAIN parameter and pass it down to
13         c_parser_statement_after_labels.
14         (c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
15         duplicated if-else-if conditions.
16
17 2015-10-01  Marek Polacek  <polacek@redhat.com>
18
19         * c-typeck.c (convert_for_assignment): Improve commentary.
20
21 2015-09-30  Marek Polacek  <polacek@redhat.com>
22
23         PR c/67730
24         * c-typeck.c (c_finish_return): Use the expansion point location for
25         certain "return with value" warnings.
26
27 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
28
29         * c-parser.c (pragma_lex): Add loc argument.
30
31 2015-09-15  Marek Polacek  <polacek@redhat.com>
32
33         PR c/67580
34         * c-decl.c (tag_exists_p): New function.
35         * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
36         struct/union/enum keywords are missing.
37         * c-tree.h (tag_exists_p): Declare.
38
39 2015-09-15  Marek Polacek  <polacek@redhat.com>
40
41         * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
42         (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
43         Return NULL_TREE instead of 0.
44         (lookup_name): Return NULL_TREE instead of 0.
45         (lookup_name_in_scope): Likewise.
46         (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
47         (parser_xref_tag): Use false instead of 0.
48         (start_struct): Use true instead of 1.
49         (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
50
51 2015-09-14  Marek Polacek  <polacek@redhat.com>
52
53         * c-typeck.c (set_nonincremental_init_from_string): Use
54         HOST_WIDE_INT_M1U when shifting a negative value.
55
56 2015-09-09  Mark Wielaard  <mjw@redhat.com>
57
58         * c-typeck.c (build_binary_op): Check and warn when nonnull arg
59         parm against NULL.
60
61 2015-09-10  Jakub Jelinek  <jakub@redhat.com>
62
63         PR c/67502
64         * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
65         into OMP_FOR_PRE_BODY rather than before the loop.
66
67 2015-09-09  Jakub Jelinek  <jakub@redhat.com>
68
69         PR c/67501
70         * c-parser.c (c_parser_oacc_all_clauses,
71         c_parser_omp_all_clauses): Remove invalid clause from
72         list of clauses even if parser->error is set.
73
74         PR c/67500
75         * c-parser.c (c_parser_omp_clause_aligned,
76         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
77         test for errors.
78         * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
79         error_mark_node.
80
81         PR c/67495
82         * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
83         instead of c_parser_unary_expression.  If the result is !lvalue_p,
84         wrap the result of c_fully_fold into NON_LVALUE_EXPR.
85
86 2015-09-04  Marek Polacek  <polacek@redhat.com>
87
88         PR sanitizer/67279
89         * c-typeck.c (build_binary_op): Don't instrument static initializers.
90
91 2015-09-03  Martin Sebor  <msebor@redhat.com>
92
93         PR c/66516
94         * c-typeck.c (convert_arguments, parser_build_unary_op,
95         build_conditional_expr, c_cast_expr, convert_for_assignment,
96         build_binary_op, _objc_common_truthvalue_conversion): Call
97         reject_gcc_builtin.
98         (c_decl_implicit): Define.
99
100 2015-09-02  Marek Polacek  <polacek@redhat.com>
101
102         PR c/67432
103         * c-parser.c (c_parser_enum_specifier): Give a better error for
104         an empty enum.
105
106 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
107
108         * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
109
110 2015-08-12  Marek Polacek  <polacek@redhat.com>
111
112         * c-decl.c (grokdeclarator): Call error_at instead of error and pass
113         LOC to it.
114
115 2015-08-03  Marek Polacek  <polacek@redhat.com>
116
117         PR c/67088
118         * c-decl.c (check_bitfield_type_and_width): Add location parameter.
119         Use it.
120         (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
121
122 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
123
124         * c-parser.c (c_parser_if_body): Take token_indent_info
125         argument. Call warn_for_misleading_indentation even when the
126         body is a semicolon.  Extract token_indent_infos corresponding
127         to the guard, body and next tokens.  Adjust call to
128         warn_for_misleading_indentation accordingly.
129         (c_parser_else_body): Likewise.
130         (c_parser_if_statement): Likewise.
131         (c_parser_while_statement): Likewise.
132         (c_parser_for_statement): Likewise.
133
134 2015-07-28  Luis Felipe Strano Moraes  <luis.strano@gmail.com>
135             Manuel López-Ibáñez  <manu@gcc.gnu.org>
136
137         * c-decl.c (get_parm_info): Remove static var. Update warning
138         message.
139
140 2015-07-27  Marek Polacek  <polacek@redhat.com>
141
142         PR c++/66555
143         PR c/54979
144         * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
145
146 2015-07-20  Marek Polacek  <polacek@redhat.com>
147
148         PR c++/55095
149         * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
150         (build_binary_op): Warn about left shift overflows.
151
152 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
153
154         * c-array-notation.c: Adjust includes for flags.h changes.
155         * c-objc-common.c: Likewise.
156
157 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
158
159         * c-array-notation.c: Adjust includes.
160         * c-aux-info.c: Likewise.
161         * c-convert.c: Likewise.
162         * c-decl.c: Likewise.
163         * c-errors.c: Likewise.
164         * c-lang.c: Likewise.
165         * c-objc-common.c: Likewise.
166         * c-parser.c: Likewise.
167         * c-typeck.c: Likewise.
168
169 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
170
171         PR fortran/66605
172         * c-decl.c (finish_function): Call do_warn_unused_parameter.
173
174 2015-06-29  Marek Polacek  <polacek@redhat.com>
175
176         PR c/66322
177         * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
178         (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P.  Don't warn
179         about -Wswitch-bool here.
180         (do_case): Update c_add_case_label call.
181         (c_finish_case): Update c_do_switch_warnings call.
182
183 2015-06-27  Marek Polacek  <polacek@redhat.com>
184
185         * c-typeck.c: Use VECTOR_TYPE_P throughout.
186
187 2015-06-26  Marek Polacek  <polacek@redhat.com>
188
189         * c-array-notation.c (fix_builtin_array_notation_fn): Use
190         INDIRECT_REF_P.
191         * c-typeck.c (array_to_pointer_conversion): Likewise.
192         (build_unary_op): Likewise.
193         (c_finish_return): Likewise.
194
195 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
196
197         * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
198         * c-parser.c: Likewise.
199
200 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
201
202         * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
203         instead of pointer_hash.
204         (detect_field_duplicates): Likewise.
205
206 2015-06-25  Marek Polacek  <polacek@redhat.com>
207
208         * c-array-notation.c: Use VAR_P throughout.
209         * c-decl.c: Likewise.
210         * c-objc-common.c: Likewise.
211         * c-parser.c: Likewise.
212         * c-typeck.c: Likewise.
213
214 2015-06-25  Marek Polacek  <polacek@redhat.com>
215
216         * c-decl.c: Use is_global_var throughout.
217         * c-parser.c: Likewise.
218         * c-typeck.c: Likewise.
219
220 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
221
222         * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
223         * c-aux-info.c: Likewise.
224         * c-convert.c: Likewise.
225         * c-decl.c: Likewise.
226         * c-errors.c: Likewise.
227         * c-lang.c: Likewise.
228         * c-objc-common.c: Likewise.
229         * c-parser.c: Likewise.
230         * c-typeck.c: Likewise.
231
232 2015-06-11  Jan Hubicka  <hubicka@ucw.cz>
233
234         PR middle-end/66325
235         * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
236         variants.
237
238 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
239
240         * c-decl.c (pop_scope): Register the main translation unit
241         through the new debug hook.
242
243 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
244
245         * c-array-notation.c : Adjust include files.
246         * c-aux-info.c : Likewise.
247         * c-convert.c : Likewise.
248         * c-decl.c : Likewise.
249         * c-errors.c : Likewise.
250         * c-lang.c : Likewise.
251         * c-lang.h : Likewise.
252         * c-objc-common.c : Likewise.
253         * c-parser.c : Likewise.
254         * c-typeck.c : Likewise.
255
256 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
257
258         * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
259         immediately clobber it.
260         (c_write_global_declarations_1): Remove call to
261         check_global_declaration_1.
262         (c_write_global_declarations_2): Remove.
263         (c_write_final_cleanups): Rename from c_write_global_declarations.
264         Remove call to finalize_compilation_unit.
265         Remove calls to debugging hooks.
266         * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
267         * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
268         * c-tree.h: Remove c_write_global_declarations.
269
270 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
271
272         * c-array-notation.c: Adjust includes for restructured coretypes.h.
273         * c-aux-info.c: Likewise.
274         * c-convert.c: Likewise.
275         * c-decl.c: Likewise.
276         * c-errors.c: Likewise.
277         * c-lang.c: Likewise.
278         * c-objc-common.c: Likewise.
279         * c-parser.c: Likewise.
280         * c-typeck.c: Likewise.
281
282 2015-06-04  Marek Polacek  <polacek@redhat.com>
283
284         PR c/66341
285         * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
286         it is a lvalue.
287
288 2015-06-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
289
290         * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
291         Warn for empty struct.
292         (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
293
294 2015-06-02  Andres Tiraboschi  <andres.tiraboschi@tallertechnologies.com>
295
296         * c-decl.c (start_function): Call plugin before parsing.
297         (finish_function): Call plugin after parsing.
298
299 2015-06-02  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
300
301         PR c/49551
302         * c-decl.c (merge_decls): Merge DECL_COMMON.
303
304 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
305
306         * Make-lang.in (check_gcc_pallelize): Define.
307
308 2015-05-22  Marek Polacek  <polacek@redhat.com>
309
310         PR c/47043
311         * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
312         attributes.
313
314 2015-05-21  Marek Polacek  <polacek@redhat.com>
315
316         * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
317         DECL_BUILT_IN.
318
319 2015-05-20  Marek Polacek  <polacek@redhat.com>
320
321         * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
322         * c-typeck.c: Likewise.
323
324 2015-05-19  Marek Polacek  <polacek@redhat.com>
325
326         * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
327
328 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
329
330         PR middle-end/66199
331         * c-parser.c (c_parser_omp_for_loop): Don't add
332         OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
333         OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
334         (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
335         constructs.
336
337 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
338
339         * c-typeck.c (build_array_ref): Use std::swap instead of explicit
340         swaps.
341
342 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
343
344         PR fortran/44054
345         * c-objc-common.c (c_tree_printer): Replace locus pointer with
346         accessor function.
347
348 2015-05-14  Marek Polacek  <polacek@redhat.com>
349
350         PR c/66066
351         PR c/66127
352         * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
353         rather than with 0.
354
355 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
356
357         * c-parser.c (c_parser_if_body): Add param "if_loc", use it
358         to add a call to warn_for_misleading_indentation.
359         (c_parser_else_body): Likewise, adding param "else_loc".
360         (c_parser_if_statement): Check for misleading indentation.
361         (c_parser_while_statement): Likewise.
362         (c_parser_for_statement): Likewise.
363
364 2015-05-08  Marek Polacek  <polacek@redhat.com>
365
366         PR c/64918
367         * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
368         (output_init_element): Likewise.
369
370 2015-05-07  Marek Polacek  <polacek@redhat.com>
371
372         PR c/65179
373         * c-typeck.c (build_binary_op): Warn when left shifting a negative
374         value.
375
376 2015-04-30  Marek Polacek  <polacek@redhat.com>
377
378         * c-typeck.c (set_init_label): Call error_at instead of error and
379         pass LOC to it.
380
381         * c-typeck.c (c_incomplete_type_error): Refactor to use %qT.  Print
382         the type of a decl.
383
384         * c-typeck.c (c_build_va_arg): Clarify the error message.
385
386 2015-04-29  Thomas Schwinge  <thomas@codesourcery.com>
387
388         * c-parser.c (c_parser_oacc_enter_exit_data): Use
389         OMP_STANDALONE_CLAUSES.
390
391 2015-04-28  Marek Polacek  <polacek@redhat.com>
392
393         * c-parser.c (c_parser_binary_expression): Remove duplicate line.
394
395 2015-04-28  Marek Polacek  <polacek@redhat.com>
396
397         PR c/65901
398         * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
399
400 2015-04-25  Marek Polacek  <polacek@redhat.com>
401
402         PR c/52085
403         * c-decl.c (finish_enum): Copy over TYPE_ALIGN.  Also check for "mode"
404         attribute.
405
406 2015-04-23  Marek Polacek  <polacek@redhat.com>
407
408         PR c/65345
409         * c-decl.c (set_labels_context_r): New function.
410         (store_parm_decls): Call it via walk_tree_without_duplicates.
411         * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
412         instead of create_tmp_var.  Build TARGET_EXPR instead of
413         COMPOUND_EXPR.
414         (build_atomic_assign): Use create_tmp_var_raw instead of
415         create_tmp_var.  Build TARGET_EXPRs instead of MODIFY_EXPR.
416
417 2015-04-20  Ilya Verbin  <ilya.verbin@intel.com>
418
419         * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
420         (c_parser_omp_target_update): Add missed %> to error_at ().
421
422 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
423
424         PR target/55143
425         * c-decl.c (c_default_pointer_mode): Remove definition.
426         * c-tree.h (c_default_pointer_mode): Remove declaration.
427
428 2015-03-27  Tobias Burnus  <burnus@net-b.de>
429
430         PR c/65586
431         * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
432         error out.
433         (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
434         c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
435         Update calls to not error for skipped omp pragmas with -fopenmp-simd.
436
437 2015-03-19  Jakub Jelinek  <jakub@redhat.com>
438
439         * c-decl.c (c_decl_attributes): Also add "omp declare target"
440         attribute for DECL_EXTERNAL VAR_DECLs.
441
442 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
443
444         * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
445         argument.
446
447 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
448
449         PR c/65120
450         * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
451         before preparing arguments to warn_logical_not_parentheses.
452
453 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
454
455         PR c/65120
456         * c-typeck.c (parser_build_binary_op): Don't warn for
457         !!x == y or !b == y where b is _Bool.
458
459 2015-03-09  Marek Polacek  <polacek@redhat.com>
460
461         * c-convert.c (convert): Make use of do_ubsan_in_current_function.
462         * c-decl.c (grokdeclarator): Likewise.
463         * c-typeck.c (build_binary_op): Likewise.
464
465 2015-02-27  Marek Polacek  <polacek@redhat.com>
466
467         PR c/65228
468         * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
469
470 2015-02-14  Marek Polacek  <polacek@redhat.com>
471
472         PR c/64768
473         * c-decl.c (grokdeclarator): Set the range of a flexible array member
474         declared through a typedef name.
475
476 2015-02-13  Marek Polacek  <polacek@redhat.com>
477
478         PR c/65050
479         * c-decl.c (grokdeclarator): Print also the type when giving
480         the error message about array's incomplete element type.
481
482 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
483
484         PR c/64824
485         * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
486         check in the POP macro.
487
488 2015-02-09  Marek Polacek  <polacek@redhat.com>
489
490         PR c/64856
491         * c-typeck.c (process_init_element): Don't always wrap
492         COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
493         initializing a range of elements.
494
495 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
496
497         PR c/64824
498         PR c/64868
499         * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
500
501 2015-02-02  Bruno Loff  <bruno.loff@gmail.com>
502
503         * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
504         processing enum declaration.
505
506 2015-01-29  Marek Polacek  <polacek@redhat.com>
507
508         PR c/64709
509         * c-typeck.c (pop_init_level): If constructor_elements has
510         exactly one element with integer_zerop value, set constructor_zeroinit
511         to 1.  Remove braces around warning_init call.
512
513 2015-01-27  Jakub Jelinek  <jakub@redhat.com>
514
515         PR c/64766
516         * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
517         of FUNCTION_DECLs with error_mark_node.
518
519 2015-01-26  Jakub Jelinek  <jakub@redhat.com>
520
521         PR c/64778
522         * c-typeck.c (convert_arguments): Return -1 if there are
523         error_args, even if we've diagnosed too many arguments.
524
525 2015-01-21  Richard Biener  <rguenther@suse.de>
526
527         PR middle-end/64313
528         * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
529         for builtins the user declared correctly.
530
531 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
532             Bernd Schmidt  <bernds@codesourcery.com>
533             Cesar Philippidis  <cesar@codesourcery.com>
534             James Norris  <jnorris@codesourcery.com>
535             Jakub Jelinek  <jakub@redhat.com>
536             Ilmir Usmanov  <i.usmanov@samsung.com>
537
538         * c-parser.c: Include "gomp-constants.h".
539         (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
540         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
541         Use OMP_CLAUSE_SET_MAP_KIND.
542         (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
543         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
544         (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
545         PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
546         PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
547         (c_parser_omp_clause_name): Handle "auto", "async", "copy",
548         "copyout", "create", "delete", "deviceptr", "gang", "host",
549         "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
550         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
551         "present_or_create", "pcreate", "seq", "self", "vector",
552         "vector_length", "wait", "worker".
553         (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
554         (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
555         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
556         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
557         (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
558         (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
559         (c_parser_oacc_data_clause_deviceptr)
560         (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
561         (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
562         (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
563         (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
564         (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
565         (c_parser_oacc_parallel, c_parser_oacc_update)
566         (c_parser_oacc_wait): New functions.
567         * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
568         (c_finish_oacc_data): New prototypes.
569         * c-typeck.c: Include "gomp-constants.h".
570         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
571         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
572         OMP_CLAUSE_SET_MAP_KIND.
573         (c_finish_oacc_parallel, c_finish_oacc_kernels)
574         (c_finish_oacc_data): New functions.
575         (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
576         OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
577         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
578         OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
579         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
580         GOMP_MAP_FORCE_DEVICEPTR.
581
582 2015-01-09  Michael Collison  <michael.collison@linaro.org>
583
584         * c-array-notation.c: Include hash-set.h, machmode.h,
585         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
586         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
587         * c-aux-info.c: Ditto.
588         * c-convert.c: Ditto.
589         * c-decl.c: Ditto.
590         * c-errors.c: Ditto.
591         * c-lang.c: Dittoxs.
592         * c-objc-common.c: Ditto.
593         * c-parser.c: Ditto.
594         * c-typeck.c: Include hash-set.h, machmode.h,
595         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
596         fold-const.h, wide-int.h, inchash.h, real.h and
597         fixed-value.h due to flattening of tree.h.
598
599 2015-01-07  Marek Polacek  <polacek@redhat.com>
600
601         PR c/64417
602         * c-typeck.c (process_init_element): Disallow initialization of
603         a flexible array member with a string constant if the structure
604         is in an array.
605
606 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
607
608         PR sanitizer/64344
609         * c-typeck.c (convert_for_assignment, c_finish_return): For
610         -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
611         types also set in_late_binary_op around convert call.
612         * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
613         to integral type casts, if not in_late_binary_op, pass c_fully_fold
614         result on expr as last argument to ubsan_instrument_float_cast,
615         if in_late_binary_op, don't use c_save_expr but save_expr.
616
617         Update copyright years.
618
619 2015-01-05  Marek Polacek  <polacek@redhat.com>
620
621         PR c/64423
622         * c-typeck.c (build_array_ref): Pass loc down to
623         warn_array_subscript_with_type_char.
624
625 2014-12-20  Martin Uecker <uecker@eecs.berkeley.edu>
626
627         * c-typeck.c: New behavious for pointers to arrays with qualifiers
628         (common-pointer-type): For pointers to arrays take qualifiers from
629         element type.
630         (build_conditional_expr): Add warnings for lost qualifiers.
631         (comp-target-types): Allow pointers to arrays with different qualifiers.
632         (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
633         WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
634         to PEDWARN_FOR_QUALIFIERS.
635
636 2014-12-17  Jakub Jelinek  <jakub@redhat.com>
637
638         PR sanitizer/64289
639         * c-convert.c: Include ubsan.h.
640         (convert): For real -> integral casts and
641         -fsanitize=float-cast-overflow don't call convert_to_integer, but
642         instead instrument the float cast directly.
643
644 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
645
646         * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
647         c_finish_stmt_expr): Remove NULL last argument from
648         create_tmp_var_raw and create_tmp_var calls.
649         * c-array-notation.c (fix_builtin_array_notation_fn,
650         build_array_notation_expr, fix_conditional_array_notations_1,
651         fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
652
653 2014-11-28  Marek Polacek  <polacek@redhat.com>
654
655         PR c/63862
656         * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
657         convert the right operand to integer type.
658
659 2014-11-25  Marek Polacek  <polacek@redhat.com>
660
661         PR c/63877
662         * c-decl.c (start_function): Disable -Wmissing-declarations warning
663         for inline functions.
664
665 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
666
667         PR target/63764
668         * c-typeck.c (build_array_ref): Adjust
669         convert_vector_to_pointer_for_subscript caller.  If it returns true,
670         call non_lvalue_loc on the result.
671
672 2014-11-11  Richard Biener  <rguenther@suse.de>
673
674         * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
675         to true.
676
677 2014-11-10  Andi Kleen  <ak@linux.intel.com>
678
679         PR c/60804
680         * c-parser.c (c_parser_statement_after_labels): Call
681         check_no_cilk.
682         (c_parser_if_statement): Dito.
683         (c_parser_switch_statement): Dito.
684         (c_parser_while_statement): Dito.
685         (c_parser_do_statement): Dito.
686         (c_parser_for_statement): Dito.
687         * c-typeck.c (c_finish_loop): Dito.
688
689 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
690
691         * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
692         OPT_Wshift_count_overflow in the warnings.
693
694 2014-10-30  Marek Polacek  <polacek@redhat.com>
695
696         * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
697         print the stripped version as well, if they're not the same.
698
699 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
700
701         * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
702         machine_mode.
703
704 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
705
706         * c-decl.c: Adjust include files.
707         * c-parser.c: Ditto.
708
709 2014-10-27  Phil Muldoon  <pmuldoon@redhat.com>
710             Tom Tromey  <tromey@redhat.com>
711
712         * c-tree.h (enum c_oracle_request): New.
713         (c_binding_oracle_function): New typedef.
714         (c_binding_oracle, c_pushtag, c_bind): Declare.
715         * c-decl.c (c_binding_oracle): New global.
716         (I_SYMBOL_CHECKED): New macro.
717         (i_symbol_binding): New function.
718         (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
719         (I_TAG_CHECKED): New macro.
720         (i_tag_binding): New function.
721         (I_TAG_BINDING, I_TAG_DECL): Redefine.
722         (I_LABEL_CHECKED): New macro.
723         (i_label_binding): New function.
724         (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
725         (c_print_identifier): Save and restore c_binding_oracle.
726         (c_pushtag, c_bind): New functions.
727
728 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
729
730         * c-typeck.c: Adjust include files.
731
732 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
733
734         PR c++/53061
735         * c-objc-common.c (c_objc_common_init): Do not do diagnostics
736         initialization here...
737         (c_initialize_diagnostics): ... but here. Set defaults after
738         building pretty-printer.
739
740 2014-10-23  Marek Polacek  <polacek@redhat.com>
741
742         PR c/63626
743         * c-decl.c (pop_scope): Don't print warning in external_scope.
744
745 2014-10-19  Marek Polacek  <polacek@redhat.com>
746
747         PR c/63567
748         * c-typeck.c (output_init_element): Allow initializing objects with
749         static storage duration with compound literals even in C99 and add
750         pedwarn for it.
751
752 2014-10-17  Marek Polacek  <polacek@redhat.com>
753
754         PR c/63567
755         * c-typeck.c (digest_init): Allow initializing objects with static
756         storage duration with compound literals even in C99 and add pedwarn
757         for it.
758
759 2014-10-17  Marek Polacek  <polacek@redhat.com>
760
761         PR c/63543
762         * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
763         * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
764         error multiple times.  Print the type.
765
766 2014-10-17  Marek Polacek  <polacek@redhat.com>
767
768         PR c/63549
769         * c-typeck.c (build_array_ref): Bail if the index in an incomplete
770         type.
771
772 2014-10-17  Marek Polacek  <polacek@redhat.com>
773
774         * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
775         (start_function): Use OPT_Wimplicit_int instead of 0.
776         (store_parm_decls_oldstyle): Likewise.
777
778 2014-10-17  Alan Modra  <amodra@gmail.com>
779
780         PR middle-end/61848
781         * c-decl.c (merge_decls): Don't merge section name or tls model
782         to newdecl symtab node, instead merge to olddecl.  Override
783         existing olddecl section name.  Set tls_model for all thread-local
784         vars, not just OMP thread-private ones.  Remove incorrect comment.
785
786 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
787
788         * c-decl.c: Adjust include files.
789
790 2014-10-14  DJ Delorie  <dj@redhat.com>
791
792         * c-parser.c (c_parse_init): Add RID entries for each __intN.
793         (c_token_starts_typename): Check all __intN, not just __int128.
794         (c_token_starts_declspecs): Likewise.
795         (c_parser_declspecs): Likewise.
796         (c_parser_attribute_any_word): Likewise.
797         (c_parser_objc_selector): Likewise.
798         * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
799         (struct c_declspecs): Add int_n_idx field to record *which* __intN
800         is specified.
801         * c-decl.c (declspecs_add_type): Check for all __intN, not just
802         __int128.
803         (finish_declspecs): Likewise.
804
805 2014-10-13  Anthony Brandon  <anthony.brandon@gmail.com>
806
807         * c-parser.c (c_parser_all_labels): New function to replace
808         the duplicate code.
809         (c_parser_statement): Call the new function.
810
811 2014-10-09  Marek Polacek  <polacek@redhat.com>
812
813         PR c/63480
814         * c-typeck.c (pop_init_level): Don't warn about initializing
815         with { }.
816
817 2014-10-07  Marek Polacek  <polacek@redhat.com>
818
819         PR c/59717
820         * c-decl.c (header_for_builtin_fn): New function.
821         (implicitly_declare): Suggest which header to include.
822
823 2014-10-07  Marek Polacek  <polacek@redhat.com>
824
825         * c-convert.c (convert): Use error_operand_p.
826         * c-typeck.c (require_complete_type): Likewise.
827         (really_atomic_lvalue): Likewise.
828         (digest_init): Likewise.
829         (handle_omp_array_sections_1): Likewise.
830
831 2014-10-03  Marek Polacek  <polacek@redhat.com>
832
833         PR c/63453
834         * c-decl.c (pop_scope): Don't warn about "inline function declared
835         but never defined" for functions marked with gnu_inline attribute.
836
837 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
838
839         PR c++/63249
840         * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
841         on low_bound and length.
842
843 2014-09-24  Marek Polacek  <polacek@redhat.com>
844
845         PR c/61405
846         PR c/53874
847         * c-parser.c: Don't define CPP_KEYWORD.
848         (c_parser_switch_statement): Pass original type to c_finish_case.
849         * c-tree.h (c_finish_case): Update declaration.
850         * c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
851         conditionally to c_do_switch_warnings.
852
853 2014-09-03  Marek Polacek  <polacek@redhat.com>
854
855         PR c/62024
856         * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
857         conversions.
858
859 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
860             Balaji V. Iyer  <balaji.v.iyer@intel.com>
861             Igor Zamyatin  <igor.zamyatin@intel.com>
862
863         * c-parser.c (c_parser_cilk_for): New function.
864         (c_parser_cilk_grainsize): Likewise.
865         (c_get_temp_regvar): Likewise.
866         (c_parser_statement_after_labels): Added RID_CILK_FOR case.
867         (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
868         (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
869         * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
870         case.
871
872 2014-08-27  Chen Gang  <gang.chen.5i5j@gmail.com>
873
874         * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
875         with using HOST_WIDE_INT without truncation to 'int'
876
877 2014-08-22  Marek Polacek  <polacek@redhat.com>
878
879         PR c++/62199
880         * c-typeck.c (parser_build_binary_op): Adjust call to
881         warn_logical_not_parentheses.
882
883 2014-08-22  Igor Zamyatin  <igor.zamyatin@intel.com>
884
885         PR other/62008
886         * c-parser.c (c_parser_array_notation): Check for correct
887         type of an array added.
888
889 2014-08-19  Marek Polacek  <polacek@redhat.com>
890
891         PR c++/62153
892         * c-typeck.c (build_binary_op): If either operand of a comparison
893         is a boolean expression, call maybe_warn_bool_compare.
894
895 2014-08-19  Patrick Palka  <ppalka@gcc.gnu.org>
896
897         PR c/45584
898         * c-typeck.c (build_c_cast): Do a conversion even when the
899         TYPE_MAIN_VARIANTs are the same.
900
901 2014-08-19  Marek Polacek  <polacek@redhat.com>
902
903         * c-decl.c (diagnose_mismatched_decls): Unconditionally call
904         pedwarn_c99 instead of pedwarn.
905         (grokfield): Likewise.
906         (warn_defaults_to): New function.
907         (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
908         Unconditionally call pedwarn_c99 instead of pedwarn.
909         (start_function): Call warn_defaults_to instead of pedwarn_c99.
910         (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
911         check flag_isoc11 before.
912         * c-errors.c (pedwarn_c99): Change the return type to bool.
913         Handle -Wc99-c11-compat.
914         * c-parser.c (disable_extension_diagnostics): Handle
915         warn_c99_c11_compat.
916         (restore_extension_diagnostics): Likewise.
917         (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
918         instead of pedwarn, don't check flag_isoc11 before.
919         (c_parser_declspecs): Likewise.
920         (c_parser_alignas_specifier): Likewise.
921         (c_parser_alignof_expression): Likewise.
922         (c_parser_generic_selection): Likewise.
923         * c-tree.h (pedwarn_c99): Update declaration.
924         * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
925         of pedwarn_c99.
926
927 2014-08-19  Marek Polacek  <polacek@redhat.com>
928
929         * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
930         to pedwarn_c90.
931         * c-errors.c: Include "opts.h".
932         (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
933         * c-parser.c (disable_extension_diagnostics): Handle negative value
934         of warn_c90_c99_compat, too.
935         (restore_extension_diagnostics): Likewise.
936         (c_parser_compound_statement_nostart): Pass
937         OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
938
939 2014-08-12  Marek Polacek  <polacek@redhat.com>
940
941         * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
942         Add pedwarn.
943         (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
944         Likewise.
945         (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
946
947 2014-08-10 Marek Polacek  <polacek@redhat.com>
948
949         PR c/51849
950         * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
951         Call pedwarn_c90 instead of pedwarn.
952         (check_bitfield_type_and_width): Likewise.
953         (declspecs_add_qual): Likewise.
954         (declspecs_add_type): Likewise.
955         (warn_variable_length_array): Unify function for -pedantic and -Wvla.
956         Adjust to only call pedwarn_c90.
957         (grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
958         pedwarn_c90 instead of pedwarn.
959         * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
960         * c-parser.c (disable_extension_diagnostics): Handle
961         warn_c90_c99_compat.
962         (restore_extension_diagnostics): Likewise.
963         (c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
964         pedwarn_c90 instead of pedwarn.
965         (c_parser_initelt): Likewise.
966         (c_parser_postfix_expression): Likewise.
967         (c_parser_postfix_expression_after_paren_type): Likewise.
968         (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
969         * c-tree.h: Fix formatting.
970         * c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
971         pedwarn_c90 instead of pedwarn.
972
973 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
974
975         * c-typeck.c: Remove include of pointer-set.h.
976
977 2014-08-07  Marek Polacek  <polacek@redhat.com>
978
979         * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
980
981 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
982
983         * c-typeck.c: Use hash_map instead of pointer_map.
984
985 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
986
987         * c-decl.c: Use hash_set instead of pointer_set.
988
989 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
990
991         PR middle-end/61455
992         * c-array-notation.c (expand_array_notations): Handling
993         of DECL_EXPR added.
994
995 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
996
997         PR c++/60517
998         * c-typeck.c (c_finish_return): Return 0 instead of the address of
999         a local variable.
1000
1001 2014-07-30  Tom Tromey  <tromey@redhat.com>
1002
1003         * c-typeck.c (struct constructor_stack) <designator_depth>: New
1004         field.
1005         (really_start_incremental_init, push_init_level): Initialize
1006         designator_depth.
1007         (pop_init_level): Set global designator_depth.
1008         (process_init_element): Check for designated_init attribute.
1009
1010 2014-07-20  Marek Polacek  <polacek@redhat.com>
1011
1012         PR c/61852
1013         * c-decl.c (implicit_decl_warning): Add location_t parameter.  Use it.
1014         (implicitly_declare): Pass location to implicit_decl_warning.
1015
1016 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
1017
1018         PR middle-end/61294
1019         * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1020         If non-NULL, call c_parser_check_literal_zero.
1021         (c_parser_check_literal_zero): New function.
1022         (c_parser_postfix_expression_after_primary): Adjust
1023         c_parser_expr_list caller, handle -Wmemset-transposed-args.
1024
1025 2014-07-06  Marek Polacek  <polacek@redhat.com>
1026
1027         PR c/6940
1028         * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1029         * c-tree.h (C_ARRAY_PARAMETER): Define.
1030         * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1031         function parameter.
1032
1033 2014-07-02  Jan Hubicka  <hubicka@ucw.cz>
1034             Chen Gang <gang.chen.5i5j@gmail.com>
1035
1036         * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1037         releasing symbol.
1038
1039 2014-07-01  Marek Polacek  <polacek@redhat.com>
1040
1041         * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1042         instead of 0 to WARN_FOR_ASSIGNMENT.
1043
1044 2014-07-01  Marek Polacek  <polacek@redhat.com>
1045
1046         PR c/58286
1047         * c-typeck.c (convert_for_assignment): Pass
1048         OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1049
1050 2014-06-30  Marek Polacek  <polacek@redhat.com>
1051
1052         * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1053         has no_sanitize_undefined attribute.
1054
1055 2014-06-30  Igor Zamyatin  <igor.zamyatin@intel.com>
1056
1057         PR middle-end/57541
1058         * c-array-notation.c (fix_builtin_array_notation_fn):
1059         Check for 0 arguments in builtin call. Check that bultin argument is
1060         correct.
1061         * c-parser.c (c_parser_array_notation): Check for incorrect initial
1062         index.
1063
1064 2014-06-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1065
1066         * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1067         qualifiers in __auto_type for atomic types.
1068         (c_parser_typeof_specifier): Discard all type qualifiers in
1069         __typeof__ for atomic types.
1070
1071 2014-06-25  Marek Polacek  <polacek@redhat.com>
1072
1073         PR c/61162
1074         * c-parser.c (c_parser_statement_after_labels): Pass the location of
1075         the return expression to c_finish_return.
1076
1077 2014-06-25  Jakub Jelinek  <jakub@redhat.com>
1078
1079         * c-typeck.c (c_finish_omp_clauses): Make sure
1080         OMP_CLAUSE_LINEAR_STEP has correct type.
1081
1082 2014-06-24  Trevor Saunders  <tsaunders@mozilla.com>
1083
1084         * c-decl.c: Adjust.
1085
1086 2014-06-24  Jakub Jelinek  <jakub@redhat.com>
1087
1088         * c-parser.c (c_parser_omp_for_loop): For
1089         #pragma omp parallel for simd move lastprivate clause from parallel
1090         to for rather than simd.
1091
1092 2014-06-23  Marek Polacek  <polacek@redhat.com>
1093
1094         * c-typeck.c (parser_build_binary_op): Don't call
1095         warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1096
1097 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1098
1099         * c-parser.c (c_parser_omp_threadprivate): Likewise.
1100         * c-decl.c (merge_decls): Likewise.
1101
1102 2014-06-09  Marek Polacek  <polacek@redhat.com>
1103
1104         PR c/36446
1105         * c-typeck.c (error_init): Call inform instead of error_at.
1106         (pedwarn_init): Call inform instead of pedwarn.
1107         (warning_init): Call inform instead of warning_at.
1108
1109 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
1110
1111         * c-decl.c (merge_decls): Use set_decl_section_name.
1112         (duplicate_decls): Remove node if it exists.
1113
1114 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
1115
1116         PR c/53119
1117         * c-typeck.c (push_init_level, process_init_element,
1118         pop_init_level): Correct check for zero initialization, move
1119         missing brace warning to respect zero initialization.
1120
1121 2014-06-05  Marek Polacek  <polacek@redhat.com>
1122
1123         PR c/56724
1124         * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1125
1126 2014-06-05  Marek Polacek  <polacek@redhat.com>
1127
1128         PR c/49706
1129         * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1130         on the left hand side operand of a comparison. 
1131
1132 2014-06-05  Marek Polacek  <polacek@redhat.com>
1133
1134         PR c/48062
1135         * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1136         Print note only if the warning was printed.
1137
1138 2014-06-04  Igor Zamyatin  <igor.zamyatin@intel.com>
1139
1140         PR c/58942
1141         * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1142         with a pointer.
1143
1144 2014-06-03  Marek Polacek  <polacek@redhat.com>
1145
1146         PR c/60439
1147         * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1148         c_start_case.
1149         * c-tree.h (c_start_case): Update.
1150         * c-typeck.c (c_start_case): Add new boolean parameter.  Warn if
1151         switch condition has boolean value.
1152
1153 2014-06-02  Andrew MacLeod  <amacleod@redhat.com>
1154
1155         * c-decl.c: Include builtins.h.
1156         * c-parser.c: Likewise.
1157
1158 2014-05-27  Marek Polacek  <polacek@redhat.com>
1159
1160         PR c/56724
1161         * c-typeck.c (convert_arguments): Get location of a parameter.  Change
1162         error and warning calls to error_at and warning_at.  Pass location of
1163         a parameter to it.  Call warning_at with OPT_Wtraditional_conversion.
1164         (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1165         WARN_FOR_QUALIFIERS.  Pass expr_loc to those.
1166
1167 2014-05-26  Igor Zamyatin  <igor.zamyatin@intel.com>
1168
1169         PR c/61191
1170         * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1171         function parameters.
1172
1173 2014-05-23  Jan Hubicka  <hubicka@ucw.cz>
1174
1175         * c-decl.c (merge_decls): Preserve symtab node pointers.
1176         (duplicate_decls): Free new decl.
1177
1178 2014-05-23  Thomas Schwinge  <thomas@codesourcery.com>
1179
1180         * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1181         initialization.
1182
1183         * c-parser.c (c_parser_omp_target): Return bool values.
1184
1185 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
1186
1187         * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1188         num_teams_loc variable to num_thread_limit_loc.
1189
1190 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
1191
1192         * c-array-notation.c (expand_array_notations): Use void_node
1193         instead of void_zero_node.
1194
1195 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
1196
1197         * c-decl.c (finish_struct): Adjust.
1198         (finish_enum): Likewise.
1199         (bind): Adjust.
1200         (record_inline_static): Likewise.
1201         (push_scope): Likewise.
1202         (make_label): Likewise.
1203         (lookup_label_for_goto): Likewise.
1204         (finish_struct): Likewise.
1205         (finish_enum): Likewise.
1206         (store_parm_decls): Likewise.
1207         (c_push_function_context): Likewise.
1208         * c-lang.h: Remove usage of variable_size gty attribute.
1209         * c-parser.c (c_parse_init): Adjust.
1210         (c_parse_file): Likewise.
1211
1212 2014-05-13  Marek Polacek  <polacek@redhat.com>
1213
1214         PR c/61162
1215         * c-typeck.c (convert_for_assignment): Pass location to
1216         WARN_FOR_ASSIGNMENT instead of input_location.
1217
1218 2014-05-10  Marek Polacek  <polacek@redhat.com>
1219
1220         * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1221         maybe_warn_string_init.
1222         (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1223         maybe_warn_string_init.
1224         * c-tree.h (maybe_warn_string_init): Update declaration.
1225         * c-typeck.c (maybe_warn_string_init): Add location parameter.
1226         Call pedwarn_init with loc instead of with input_location.
1227         (digest_init): Pass init_loc to maybe_warn_string_init.
1228         (pop_init_level): Call pedwarn_init with loc instead of with
1229         input_location.
1230         (set_init_index): Likewise.
1231         (process_init_element): Likewise.
1232
1233 2014-05-09  Marek Polacek  <polacek@redhat.com>
1234
1235         PR c/61096
1236         * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1237         (c_parser_initelt): Pass location to set_init_label.  Pass array index
1238         location to set_init_index.
1239         * c-tree.h (push_init_level): Update declaration.
1240         (pop_init_level): Likewise.
1241         (set_init_index): Likewise.
1242         (set_init_label): Likewise.
1243         * c-typeck.c (error_init): Add location parameter.  Call error_at
1244         instead of error.
1245         (digest_init): Pass init_loc to error_init.
1246         (really_start_incremental_init):
1247         (push_init_level): Add location parameter.  Pass loc to pop_init_level
1248         and error_init.
1249         (pop_init_level): Likewise.
1250         (set_designator): Add location parameter.  Pass loc to pop_init_level,
1251         push_init_level, and error_init.
1252         (set_init_index): Add location parameter.  Pass loc to error_init and
1253         set_designator.
1254         (set_init_label): Likewise.
1255         (output_init_element): Pass loc to error_init.
1256         (process_init_element): Pass loc to error_init, pop_init_level,
1257         pedwarn_init, and push_init_level.
1258
1259 2014-05-09  Marek Polacek  <polacek@redhat.com>
1260
1261         PR c/50459
1262         * c-parser.c (c_parser_attributes): Parse the arguments as an
1263         expression-list if the attribute takes identifier.
1264
1265 2014-05-08  Marek Polacek  <polacek@redhat.com>
1266
1267         PR c/61053
1268         * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1269         TYPE_ALIGN_UNIT.
1270
1271 2014-05-08  Marek Polacek  <polacek@redhat.com>
1272
1273         PR c/61077
1274         * c-decl.c (start_function): Warn for _Atomic-qualified return type
1275         of main.
1276
1277 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
1278             Mike Stump  <mikestump@comcast.net>
1279             Richard Sandiford  <rdsandiford@googlemail.com>
1280
1281         * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1282         (finish_enum): Use wide-int interfaces.
1283         * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1284         * c-typeck.c (build_c_cast): Likewise.
1285         (set_nonincremental_init_from_string): Likewise.
1286         (c_tree_equal): Likewise.
1287
1288 2014-05-02  Marek Polacek  <polacek@redhat.com>
1289
1290         PR c/25801
1291         * c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
1292         Return size_one_node when the type is not complete.
1293         (pointer_diff): Remove comment.
1294         (build_unary_op): Improve error messages.
1295
1296 2014-05-02  Marek Polacek  <polacek@redhat.com>
1297
1298         * c-typeck.c (c_finish_return): Separate warning_at calls.
1299
1300 2014-05-02  Marek Polacek  <polacek@redhat.com>
1301
1302         * c-tree.h (error_init): Remove declaration.
1303         (pedwarn_init): Likewise.
1304         * c-typeck.c (error_init): Make static and move above.
1305         (pedwarn_init): Likewise.
1306         (warning_init): Move above.
1307         (maybe_warn_string_init): Likewise.
1308
1309 2014-05-01  Jeff Law  <law@redhat.com>
1310
1311         Revert:
1312
1313         2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1314         * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1315         avoid goto.
1316
1317 2014-05-02  Marek Polacek  <polacek@redhat.com>
1318
1319         PR c/60784
1320         * c-typeck.c (push_init_level): Set constructor_designated to
1321         p->designated for structures.
1322
1323 2014-05-01  Marek Polacek  <polacek@redhat.com>
1324
1325         PR c/60915
1326         * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1327         function-definition has an attribute after the declarator.
1328
1329 2014-05-01  Marek Polacek  <polacek@redhat.com>
1330
1331         PR c/60257
1332         * c-typeck.c (warning_init): Add location_t parameter.  Call
1333         warning_at instead of warning.
1334         (push_init_level): Pass input_location to warning_init.
1335         (add_pending_init): Add location_t parameter.  Pass loc to
1336         warning_init.
1337         (set_nonincremental_init): Pass input_location to add_pending_init.
1338         (set_nonincremental_init_from_string): Likewise.
1339         (output_init_element): Pass loc to warning_init and to
1340         add_pending_init.
1341
1342 2014-05-01  Marek Polacek  <polacek@redhat.com>
1343
1344         PR c/43395
1345         * c-typeck.c (c_finish_return): Distinguish between label and variable
1346         when warning about returning local address.
1347
1348 2014-05-01  Marek Polacek  <polacek@redhat.com>
1349
1350         PR c/29467
1351         * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1352         in C89 mode.
1353
1354 2014-05-01  Marek Polacek  <polacek@redhat.com>
1355
1356         PR c/43245
1357         * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1358         instead of 0 to WARN_FOR_QUALIFIERS.
1359
1360 2014-05-01  Marek Polacek  <polacek@redhat.com>
1361
1362         PR c/56989
1363         * c-typeck.c (default_conversion): Use better location for
1364         error call.
1365
1366 2014-04-30  Marek Polacek  <polacek@redhat.com>
1367
1368         * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1369         also when SANITIZE_FLOAT_DIVIDE is on.
1370
1371 2014-04-30  Marek Polacek  <polacek@redhat.com>
1372
1373         PR c/60139
1374         * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1375         and pedwarn_init.  Use loc insted of input_location.
1376
1377 2014-04-30  Marek Polacek  <polacek@redhat.com>
1378
1379         PR c/60351
1380         * c-typeck.c (build_binary_op): Use location when warning about
1381         shift count.
1382
1383 2014-04-25  Marek Polacek  <polacek@redhat.com>
1384
1385         PR c/18079
1386         * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1387         always_inline/noinline and hot/cold attributes.
1388
1389 2014-04-25  Marek Polacek  <polacek@redhat.com>
1390
1391         PR c/60114
1392         * c-parser.c (c_parser_initelt): Pass input_location to
1393         process_init_element.
1394         (c_parser_initval): Pass loc to process_init_element.
1395         * c-tree.h (process_init_element): Adjust declaration.
1396         * c-typeck.c (push_init_level): Pass input_location to
1397         process_init_element.
1398         (pop_init_level): Likewise.
1399         (set_designator): Likewise.
1400         (output_init_element): Add location_t parameter.  Pass loc to
1401         digest_init.
1402         (output_pending_init_elements): Pass input_location to
1403         output_init_element.
1404         (process_init_element): Add location_t parameter.  Pass loc to
1405         output_init_element.
1406
1407 2014-04-24  Jakub Jelinek  <jakub@redhat.com>
1408
1409         * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1410         atomic-clause, allow comma in between atomic-clause and
1411         seq_cst.
1412
1413 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
1414
1415         PR c/59073
1416         * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1417         fails, don't set OM_PARALLEL_COMBINED and return NULL.
1418
1419 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
1420
1421         PR middle-end/60469
1422         * c-array-notation.c (fix_builtin_array_notation_fn): Use
1423         create_tmp_var instead build_decl for creating temps.
1424         (build_array_notation_expr): Likewise.
1425         (fix_conditional_array_notations_1): Likewise.
1426         (fix_array_notation_expr): Likewise.
1427         (fix_array_notation_call_expr): Likewise.
1428
1429 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
1430
1431         PR c++/60689
1432         * c-tree.h (c_build_function_call_vec): New prototype.
1433         * c-typeck.c (build_function_call_vec): Don't call
1434         resolve_overloaded_builtin here.
1435         (c_build_function_call_vec): New wrapper function around
1436         build_function_call_vec.  Call resolve_overloaded_builtin here.
1437         (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1438         Call c_build_function_call_vec instead of build_function_call_vec.
1439         * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1440         * c-decl.c (finish_decl): Likewise.
1441
1442 2014-03-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1443
1444         PR c/55383
1445         * c-typeck.c: Use correct format string in cast-qual warning
1446
1447 2014-03-07  Thomas Schwinge  <thomas@codesourcery.com>
1448
1449         * c-decl.c (c_decl_attributes): Use
1450         lang_hooks.types.omp_mappable_type.
1451         * c-typeck.c (c_finish_omp_clauses): Likewise.
1452
1453 2014-03-06  Marek Polacek  <polacek@redhat.com>
1454
1455         PR c/60197
1456         * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1457         of checking tree code.
1458
1459 2014-02-19  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1460
1461         * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1462         (c_parser_parameter_declaration): Likewise.
1463
1464 2014-02-19  Marek Polacek  <polacek@redhat.com>
1465
1466         PR c/60195
1467         * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1468         Call mark_exp_read on exp.value.
1469         (build_atomic_assign): Set TREE_NO_WARNING on val and old.  Set
1470         TREE_ADDRESSABLE on old instead of val.
1471         (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1472
1473 2014-02-07  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
1474
1475         * c-parser.c (c_parser_get_builtin_args): Replace calls to
1476         C_EXPR_APPEND by vec_safe_push.
1477         * c-tree.h (C_EXPR_APPEND): Remove.
1478
1479 2014-01-31  Marek Polacek  <polacek@redhat.com>
1480
1481         PR c/59963
1482         * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1483         build_function_call_vec.
1484         (build_function_call): Likewise.
1485         (build_atomic_assign): Likewise.
1486         (build_function_call_vec): Add arg_loc parameter.  Use it.
1487         (convert_arguments): Likewise.
1488         (convert_for_assignment): Rename rhs_loc to expr_loc.
1489         * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1490         (c_parser_objc_keywordexpr): Likewise.
1491         (c_parser_postfix_expression_after_primary): Call
1492         build_function_call_vec with expr_loc rather than op_loc.
1493         Call c_parser_expr_list to fill arg_loc.  Pass arg_loc to
1494         build_function_call_vec.
1495         (c_parser_expr_list): Add locations parameter.  Fill it with locations
1496         of function arguments.
1497         * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1498
1499 2014-01-30  Marek Polacek  <polacek@redhat.com>
1500
1501         PR c/59940
1502         * c-typeck.c (build_function_call_vec): Use loc parameter.
1503         (convert_arguments): Add location parameter.  Use it.
1504         (ep_convert_and_check): Likewise.
1505         (build_atomic_assign): Adjust convert_for_assignment call.
1506         (build_modify_expr): Likewise.
1507         (digest_init): Likewise.
1508         (c_finish_return): Likewise.
1509         (build_conditional_expr): Adjust ep_convert_and_check calls.
1510         (convert_for_assignment): Add rhs_loc parameter.  Use it.
1511         (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1512         calls.
1513
1514 2014-01-30  Richard Biener  <rguenther@suse.de>
1515
1516         PR c/59905
1517         * c-typeck.c (build_function_call_vec): Do not replace calls
1518         to a function via an incompatible type with a runtime abort.
1519
1520 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1521
1522         * c-parser.c (c_parser_declaration_or_fndef): Replaced
1523         flag_enable_cilkplus with flag_cilkplus.
1524         (c_parser_direct_declarator_inner): Likewise.
1525         (c_parser_attribute_any_word): Likewise.
1526         (c_parser_attributes): Likewise.
1527         (c_parser_compound_statement): Likewise.
1528         (c_parser_statement_after_labels): Likewise.
1529         (c_parser_if_statement): Likewise.
1530         (c_parser_switch_statement): Likewise.
1531         (c_parser_do_statement): Likewise.
1532         (c_parser_for_statement): Likewise.
1533         (c_parser_unary_expression): Likewise.
1534         (c_parser_postfix_expression): Likewise.
1535         (c_parser_postfix_expression_after_primary): Likewise.
1536         (c_parser_postfix_expression_after_primary): Likewise.
1537         (c_parser_omp_clause_name): Likewise.
1538         (c_finish_omp_declare_simd): Likewise.
1539         (c_parser_cilk_verify_simd): Likewise.
1540         * c-typeck.c (build_array_ref): Likewise.
1541         (build_function_call_vec): Likewise.
1542         (convert_arguments): Likewise.
1543         (build_compound_expr): Likewise.
1544         (c_finish_return): Likewise.
1545         (c_finish_if_stmt): Likewise.
1546         (c_finish_loop): Likewise.
1547         (build_binary_op): Likewise.
1548
1549 2014-01-23  Marek Polacek  <polacek@redhat.com>
1550
1551         PR c/59846
1552         * c-typeck.c (parser_build_binary_op): Use location instead of
1553         input_location.
1554         (build_binary_op): Pass location to shorten_compare.
1555
1556 2014-01-23  Marek Polacek  <polacek@redhat.com>
1557
1558         PR c/58346
1559         * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1560         an empty aggregate.
1561
1562 2014-01-23  Marek Polacek  <polacek@redhat.com>
1563
1564         PR c/59871
1565         * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1566         of a comma expression.
1567         (emit_side_effect_warnings): Likewise.
1568
1569 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1570
1571         PR c/59825
1572         * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1573         function to use walk_tree and moved a lot of its functionality to
1574         expand_array_notations.
1575         (expand_array_notations): New function.
1576
1577 2014-01-23  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1578
1579         * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1580         attribute an attribute without value.
1581
1582 2014-01-23  Jakub Jelinek  <jakub@redhat.com>
1583
1584         PR middle-end/58809
1585         * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1586         BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1587
1588 2014-01-22  Marek Polacek  <polacek@redhat.com>
1589
1590         PR c/59891
1591         * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1592         of remove_c_maybe_const_expr on op1 and op2.
1593
1594 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
1595
1596         PR c/58943
1597         * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1598         effects, preevaluate rhs using SAVE_EXPR first.
1599
1600 2014-01-09  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1601
1602         PR c++/59631
1603         * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1604         statements with if-elseif statements.
1605
1606 2014-01-06  Marek Polacek  <polacek@redhat.com>
1607
1608         PR c/57773
1609         * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1610         defined bit-field types only in ISO C.
1611
1612 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1613
1614         Update copyright years
1615
1616 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
1617
1618         * c-array-notation.c: Use the standard form for the copyright notice.
1619
1620 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1621
1622         * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1623         (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1624         field in parser is not empty.  If not-empty, call the function
1625         c_parser_finish_omp_declare_simd.
1626         (c_parser_cilk_clause_vectorlength): Modified function to be shared
1627         between SIMD-enabled functions and #pragma simd.  Added new parameter.
1628         (c_parser_cilk_all_clauses): Modified the usage of the function
1629         c_parser_cilk_clause_vectorlength as mentioned above.
1630         (c_parser_cilk_simd_fn_vector_attrs): New function.
1631         (c_finish_cilk_simd_fn_tokens): Likewise.
1632         (is_cilkplus_vector_p): Likewise.
1633         (c_parser_omp_clause_name): Added checking for "vectorlength,"
1634         "nomask," and "mask" strings in clause name.
1635         (c_parser_omp_all_clauses): Added 3 new case statements:
1636         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1637         PRAGMA_CILK_CLAUSE_NOMASK.
1638         (c_parser_attributes): Added a cilk_simd_fn_tokens parameter.  Added a
1639         check for vector attribute and if so call the function
1640         c_parser_cilk_simd_fn_vector_attrs.  Also, when Cilk plus is enabled,
1641         called the function c_finish_cilk_simd_fn_tokens.
1642         (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1643         parser field is non-empty.  If so, parse them as you would parse
1644         the omp declare simd pragma.
1645         (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1646         Added a check when step is a parameter and flag it as error.
1647         (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1648         (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1649         pragma_omp_clause.
1650
1651 2013-12-17  Thomas Schwinge  <thomas@codesourcery.com>
1652
1653         * c-parser.c (c_parser_omp_parallel): Fix description.
1654
1655 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1656
1657         * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1658         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1659         (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1660         * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1661
1662 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
1663
1664         PR c/52023
1665         * c-parser.c (c_parser_alignas_specifier): Use
1666         c_sizeof_or_alignof_type instead of c_alignof.
1667         (c_parser_alignof_expression): Likewise, with min_alignof
1668         parameter depending on alignof spelling used.
1669
1670 2013-12-04  Marek Polacek  <polacek@redhat.com>
1671
1672         PR c/54113
1673         * c-decl.c (start_function): Don't warn for missing prototype for
1674         inline functions.
1675
1676 2013-12-03  Marek Polacek  <polacek@redhat.com>
1677
1678         PR c/59351
1679         * c-decl.c (build_compound_literal): Allow compound literals with
1680         empty initial value.
1681
1682 2013-12-02  Joseph Myers  <joseph@codesourcery.com>
1683
1684         PR c/58235
1685         * c-typeck.c (build_modify_expr): Diagnose assignment to
1686         expression with array type.
1687
1688 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1689
1690         PR c/42262
1691         * c-typeck.c (process_init_element): Do not treat a string as
1692         initializing a whole array when used with a designator for an
1693         individual element.
1694
1695 2013-11-29  Joseph Myers  <joseph@codesourcery.com>
1696
1697         PR c/57574
1698         * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1699         an inline function following a static declaration.
1700
1701 2013-11-28  Jakub Jelinek  <jakub@redhat.com>
1702
1703         PR c/59310
1704         * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1705         to p_name before calling c_parser_omp_teams instead of after.
1706         (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1707         argument.  Remove unused p_name variable.
1708
1709 2013-11-27  Aldy Hernandez  <aldyh@redhat.com>
1710             Jakub Jelinek  <jakub@redhat.com>
1711
1712         * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1713         external_scope is NULL.
1714
1715 2013-11-27  Tom de Vries  <tom@codesourcery.com>
1716             Marc Glisse  <marc.glisse@inria.fr>
1717
1718         PR c++/59032
1719         * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1720
1721 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
1722
1723         * c-typeck.c: Add required include files from gimple.h.
1724
1725 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
1726
1727         * c-decl.c (define_label, shadow_tag_warned)
1728         (check_bitfield_type_and_width, grokdeclarator, grokparms,
1729         store_parm_decls_newstyle, store_parm_decls_oldstyle)
1730         (declspecs_add_type): Remove use of in_system_header macro.
1731         * c-parser.c (c_parser_unary_expression): Likewise.
1732         * c-typeck.c (store_init_value, process_init_element)
1733         (c_start_case): Likewise.
1734
1735         * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1736         macro.
1737
1738         * c-parser.c (c_parser_set_source_position_from_token): Remove
1739         reference to in_system_header from comment.
1740
1741 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1742
1743         * c-decl.c (grokdeclarator): Update comment to refer to
1744         tree_to_[su]hwi rather than tree_low_cst.
1745
1746 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1747
1748         * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1749         tree_to_uhwi throughout.
1750
1751 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1752
1753         * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1754         throughout.
1755
1756 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
1757
1758         * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1759         throughout.
1760
1761 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
1762
1763         * c-parser.c (c_parser_cilk_simd): New.
1764         (c_parser_cilk_verify_simd): New.
1765         (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1766         (c_parser_omp_for_loop): Add case for NE_EXPR.
1767         Set c_break_label for CILK_SIMD.
1768         (c_parser_cilk_clause_vectorlength): New.
1769         (c_parser_cilk_clause_linear): New.
1770         (c_parser_cilk_clause_name): New.
1771         (c_parser_cilk_all_clauses): New.
1772         * c-typeck.c (build_unary_op): Pass location argument to
1773         readonly_error.
1774         (build_modify_expr): Same.
1775         (build_asm_expr): Same.
1776         (c_finish_bc_stmt): Error on break/continue in loops.
1777
1778 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
1779
1780         * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1781
1782 2013-11-14  Diego Novillo  <dnovillo@google.com>
1783
1784         * c-decl.c: Include print-tree.h.
1785         Include stor-layout.h.
1786         Include varasm.h.
1787         Include attribs.h.
1788         Include stringpool.h.
1789         * c-lang.c: Include fold-const.h.
1790         * c-parser.c: Include stringpool.h.
1791         Include attribs.h.
1792         Include stor-layout.h.
1793         Include varasm.h.
1794         Include trans-mem.h.
1795         * c-typeck.c: Include stor-layout.h.
1796         Include trans-mem.h.
1797         Include varasm.h.
1798         Include stmt.h.
1799
1800 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
1801
1802         * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1803         * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1804         __auto_type.
1805         * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1806         (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1807         RID_AUTO_TYPE.
1808         (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1809         (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1810         (c_parser_declarator, c_parser_direct_declarator_inner)
1811         (c_parser_parameter_declaration, c_parser_type_name): All callers
1812         changed.
1813         (c_parser_declaration_or_fndef): Handle declarations with type
1814         determined from the initializer.
1815
1816 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
1817
1818         * c-typeck.c: Include gimplify.h.
1819
1820 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
1821
1822         * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1823         * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1824         comment.
1825         * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1826         or _Thread_local as appropriate in diagnostics.
1827         (build_null_declspecs): Initialize ret->thread_gnu_p.
1828         (declspecs_add_scspec): Handle either __thread or _Thread_local
1829         for RID_THREAD.  Diagnose _Thread_local for pre-C11 standards if
1830         pedantic.  Do not disallow _Thread_local extern and _Thread_local
1831         static.
1832
1833 2013-11-07  Joseph Myers  <joseph@codesourcery.com>
1834             Andrew MacLeod  <amacleod@redhat.com>
1835
1836         * c-aux-info.c (gen_type): Handle atomic qualifier.
1837         * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1838         qualifiers when compating types.
1839         (shadow_tag_warned): Handle atomic_p in declspecs.
1840         (quals_from_declspecs): Likewise.
1841         (start_decl): Use c_type_promotes_to when promoting argument
1842         types.
1843         (grokdeclarator): Handle _Atomic.
1844         (get_parm_info): Diagnose any qualifier on "void" as only
1845         parameter.
1846         (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1847         comparing types.  Use c_type_promotes_to when promoting argument
1848         types.
1849         (finish_function): Use c_type_promotes_to when promoting argument
1850         types.
1851         (build_null_declspecs): Handle atomic_p in declspecs.
1852         (declspecs_add_qual): Handle RID_ATOMIC.
1853         * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1854         (c_token_starts_declspecs): Handle RID_ATOMIC.
1855         (c_parser_declspecs): Handle atomic type specifiers and
1856         qualifiers.
1857         (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1858         from types of expressions with atomic type.
1859         (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1860         (c_parser_attribute_any_word): Handle RID_ATOMIC.
1861         (c_parser_initializer, c_parser_initelt, c_parser_initval)
1862         (c_parser_statement_after_labels, c_parser_switch_statement)
1863         (c_parser_for_statement, c_parser_expr_no_commas)
1864         (c_parser_conditional_expression, c_parser_binary_expression)
1865         (c_parser_cast_expression, c_parser_unary_expression)
1866         (c_parser_postfix_expression)
1867         (c_parser_postfix_expression_after_primary, c_parser_expression):
1868         Use convert_lvalue_to_rvalue.
1869         (c_parser_expression_conv, c_parser_expr_list): Document
1870         conversion of lvalues to rvalues.  Use convert_lvalue_to_rvalue.
1871         (c_parser_objc_synchronized_statement): Use
1872         convert_lvalue_to_rvalue.
1873         (c_parser_objc_selector): Handle RID_ATOMIC.
1874         (c_parser_objc_receiver, c_parser_array_notation): Use
1875         convert_lvalue_to_rvalue.
1876         * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1877         _Atomic (type-name).
1878         (struct c_declspecs): Add atomic_p field.
1879         (convert_lvalue_to_rvalue): Declare.
1880         * c-typeck.c (c_type_promotes_to): Promote atomic types to
1881         corresponding atomic types.
1882         (qualify_type): Don't add _Atomic qualifiers from second argument.
1883         (comp_target_types): Do not allow _Atomic mismatches.
1884         (type_lists_compatible_p): Do not remove atomic qualifiers when
1885         comparing types.
1886         (really_atomic_lvalue, convert_lvalue_to_rvalue)
1887         (build_atomic_assign): New functions.
1888         (build_unary_op): Use build_atomic_assign for atomic increment and
1889         decrement.
1890         (build_conditional_expr): Do not treat _Atomic void as a qualified
1891         version of void.
1892         (build_modify_expr): Use build_atomic_assign for atomic LHS.
1893         (find_anonymous_field_with_type, convert_to_anonymous_field)
1894         (convert_for_assignment): Do not remove atomic qualifiers when
1895         comparing types.
1896         (digest_init): Do not accept initialization of arrays of atomic
1897         elements by string constants.
1898         (build_asm_expr): Use convert_lvalue_to_rvalue.
1899         (build_binary_op): Do not treat _Atomic void as a qualified
1900         version of void.
1901
1902 2013-11-06  DJ Delorie  <dj@redhat.com>
1903
1904         * c-decl.c (locate_old_decl): If a previous conflicting decl is
1905         both explicit and builtin, print the location of the explicit one.
1906
1907 2013-11-05  Tobias Burnus  <burnus@net-b.de>
1908
1909         * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1910         c_parser_omp_distribute, c_parser_omp_teams,
1911         c_parser_omp_target, c_parser_omp_declare): Handle
1912         -fopenmp-simd.
1913
1914 2013-11-03  Marek Polacek  <polacek@redhat.com>
1915
1916         * c-decl.c (grokdeclarator): Add VLA instrumentation.
1917
1918 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
1919
1920         * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1921         check_dup_generic at the end, unless remove is true.
1922         (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1923         remove = true;.
1924         (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1925
1926 2013-10-31  Jakub Jelinek  <jakub@redhat.com>
1927
1928         * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1929         with decl that is not pointer nor array.
1930
1931 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
1932
1933         * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1934         a spawning function is found.
1935         * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1936         (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1937         (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1938         * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1939         case.
1940         (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1941         * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1942         expr.
1943         (c_finish_return): Added a check to reject _Cilk_spawn in return
1944         expression.
1945         (build_cilk_spawn): New function.
1946         (build_cilk_sync): Likewise.
1947         * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1948         
1949 2013-10-27  Tobias Burnus  <burnus@net-b.de>
1950
1951         PR other/33426
1952         * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1953         c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1954         (c_parser_statement_after_labels): Update calls.
1955
1956 2013-10-24  Tobias Burnus  <burnus@net-b.de>
1957
1958         PR other/33426
1959         * c-parser.c (c_parser_pragma, c_parser_for_statement):
1960         Handle PRAGMA_IVDEP.
1961         (c_parser_statement_after_labels): Update call.
1962
1963 2013-10-24  Marek Polacek  <polacek@redhat.com>
1964
1965         * c-parser.c (c_parser_struct_declaration): Add a comment.
1966         (c_parser_declarator): Don't allow _Alignas here.
1967
1968 2013-10-17  Andrew MacLeod  <amacleod@redhat.com>
1969
1970         * c-parser.c: Include omp-low.h.
1971         * c-typeck.c: Likewise.
1972
1973 2013-10-17  Marek Polacek  <polacek@redhat.com>
1974
1975         PR c/58267
1976         * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1977         Document syntax of the array-declarator.
1978         (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1979         are not permitted.
1980         (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1981         (c_parser_struct_declaration): Likewise.
1982         (c_parser_declarator): Likewise.
1983         (c_parser_direct_declarator_inner): Likewise.
1984         (c_parser_parameter_declaration): Likewise.
1985         (c_parser_type_name): Likewise.
1986
1987 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
1988
1989         * c-lang.h (current_omp_declare_target_attribute): New extern
1990         decl.
1991         * c-parser.c: Include c-lang.h.
1992         (struct c_parser): Change tokens to c_token *.
1993         Add tokens_buf field.  Change tokens_avail type to unsigned int.
1994         (c_parser_consume_token): If parser->tokens isn't
1995         &parser->tokens_buf[0], increment parser->tokens.
1996         (c_parser_consume_pragma): Likewise.
1997         (enum pragma_context): Add pragma_struct and pragma_param.
1998         (c_parser_external_declaration): Adjust
1999         c_parser_declaration_or_fndef caller.
2000         (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2001         argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2002         Adjust recursive call.
2003         (c_parser_struct_or_union_specifier): Use pragma_struct instead
2004         of pragma_external.
2005         (c_parser_parameter_declaration): Use pragma_param instead of
2006         pragma_external.
2007         (c_parser_compound_statement_nostart, c_parser_label,
2008         c_parser_for_statement): Adjust
2009         c_parser_declaration_or_fndef callers.
2010         (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2011         it through to c_parser_conditional_expression.
2012         (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2013         pass it through to c_parser_binary_expression.  Adjust recursive
2014         call.
2015         (c_parser_binary_expression): Remove prec argument, add
2016         omp_atomic_lhs argument instead.  Always start from PREC_NONE, if
2017         omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2018         binop matches it, use build2 instead of parser_build_binary_op.
2019         (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2020         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2021         PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2022         Handle pragma_struct and pragma_param the same as pragma_external.
2023         (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2024         (c_parser_omp_variable_list): Parse array sections for
2025         OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2026         (c_parser_omp_clause_collapse): Fully fold collapse expression.
2027         (c_parser_omp_clause_reduction): Handle user defined reductions.
2028         (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2029         c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2030         c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2031         c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2032         c_parser_omp_clause_depend, c_parser_omp_clause_map,
2033         c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2034         c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2035         c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2036         (c_parser_omp_all_clauses): Add finish_p argument.  Don't call
2037         c_finish_omp_clauses if it is false.  Handle new OpenMP 4.0 clauses.
2038         (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2039         present to c_finish_omp_atomic.  Handle OpenMP 4.0 atomic forms.
2040         (c_parser_omp_for_loop): Add CODE argument, pass it through
2041         to c_finish_omp_for.  Change last argument to cclauses,
2042         and adjust uses to grab parallel clauses from the array of all
2043         the split clauses.  Adjust c_parser_binary_expression,
2044         c_parser_declaration_or_fndef and c_finish_omp_for callers.
2045         (omp_split_clauses): New function.
2046         (c_parser_omp_simd): New function.
2047         (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2048         Allow the function to be called also when parsing combined constructs,
2049         and call c_parser_omp_simd when parsing for simd.
2050         (c_parser_omp_sections_scope): If section-sequence doesn't start with
2051         #pragma omp section, require exactly one structured-block instead of
2052         sequence of statements.
2053         (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2054         Allow the function to be called also when parsing combined constructs.
2055         (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2056         Allow the function to be called also when parsing combined
2057         constructs.
2058         (c_parser_omp_taskgroup, c_parser_omp_cancel,
2059         c_parser_omp_cancellation_point, c_parser_omp_distribute,
2060         c_parser_omp_teams, c_parser_omp_target_data,
2061         c_parser_omp_target_update, c_parser_omp_target,
2062         c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2063         c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2064         c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2065         (c_parser_omp_construct): Add p_name and mask vars.  Handle
2066         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2067         PRAGMA_OMP_TEAMS.  Adjust c_parser_omp_for, c_parser_omp_parallel
2068         and c_parser_omp_sections callers.
2069         (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2070         (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2071         OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2072         (OMP_PARALLEL_CLAUSE_MASK): Likewise.  Add OMP_CLAUSE_PROC_BIND.
2073         (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.  Add
2074         OMP_CLAUSE_DEPEND.
2075         (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2076         OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2077         OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2078         OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2079         OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2080         * c-typeck.c: Include tree-inline.h.
2081         (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2082         handle_omp_array_sections_1, handle_omp_array_sections,
2083         c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2084         (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2085         user defined reductions.
2086         (c_tree_equal): New function.
2087         * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2088         c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2089         c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2090         c_check_omp_declare_reduction_r): New prototypes.
2091         * c-decl.c (current_omp_declare_target_attribute): New variable.
2092         (c_decl_attributes): New function.
2093         (start_decl, start_function): Use it instead of decl_attributes.
2094         (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2095         c_omp_reduction_decl, c_omp_reduction_lookup,
2096         c_check_omp_declare_reduction_r): New functions.
2097
2098 2013-09-25  Tom Tromey  <tromey@redhat.com>
2099
2100         * Make-lang.in (c/gccspec.o): Remove.
2101         (CFLAGS-c/gccspec.o): New variable.
2102         (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2103         (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2104         (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2105
2106 2013-09-25  Tom Tromey  <tromey@redhat.com>
2107
2108         * Make-lang.in (c/gccspec.o): Don't use subshell.
2109
2110 2013-09-18  Marek Polacek  <polacek@redhat.com>
2111
2112         PR sanitize/58443
2113         * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2114         Remove unnecessary check.
2115
2116 2013-09-18  Marek Polacek  <polacek@redhat.com>
2117
2118         PR sanitizer/58411
2119         * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2120         no_sanitize_undefined attribute.
2121
2122 2013-09-13  Kai Tietz  <ktietz@redhat.com>
2123
2124         PR target/57848
2125         * c-decl.c (c_builtin_function_ext_scope): Remove
2126         wrong assumption that it is never called on prexisting
2127         symbol.
2128
2129 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
2130
2131         * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2132
2133 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2134
2135         * c-objc-common.c (c_tree_printer): Tidy.
2136
2137 2013-08-30  Marek Polacek  <polacek@redhat.com>
2138
2139         * c-typeck.c (build_binary_op): Add division by zero and shift
2140         instrumentation.
2141
2142 2013-08-26  Joern Rennecke  <joern.rennecke@embecosm.com>
2143             Joseph Myers  <joseph@codesourcery.com>
2144
2145         PR c/35649
2146         * c-typeck.c (c_common_type): Prefer double_type_node over
2147         other REAL_TYPE types with the same precision.
2148         (convert_arguments): Likewise.
2149
2150 2013-08-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2151
2152         * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2153         (c_initialize_diagnostics): Call a destructor for the early printer.
2154
2155 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2156
2157         * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2158         printer initialization.
2159
2160 2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2161
2162         PR c/57490
2163         * c-array-notation.c (fix_conditional_array_notations_1): Added a
2164         check for truth values.
2165         (expand_array_notation_exprs): Added truth values case.  Removed an
2166         unwanted else.  Added for-loop to walk through subtrees in default
2167         case.
2168
2169 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2170
2171         * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2172
2173 2013-07-23  Joseph Myers  <joseph@codesourcery.com>
2174
2175         * c-parser.c (struct c_generic_association): Fix typo.
2176
2177 2013-07-23  Tom Tromey  <tromey@redhat.com>
2178             Joseph Myers  <joseph@codesourcery.com>
2179
2180         * c-parser.c (struct c_generic_association): New.
2181         (c_generic_association_d): New typedef.
2182         (c_parser_generic_selection): New function.
2183         (c_parser_postfix_expression): Handle RID_GENERIC.
2184
2185 2013-07-13  Jason Merrill  <jason@redhat.com>
2186
2187         PR c++/57793
2188         * c-decl.c (finish_struct): Check for too-large class.
2189
2190 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
2191
2192         PR c/57821
2193         * c-typeck.c (set_init_index): When folding, check for index overflow.
2194
2195 2013-06-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2196
2197         * c-parser.c (c_parser_array_notation): Removed rejection of array
2198         notations in an array of function pointers.
2199
2200 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2201
2202         * c-array-notation.c (make_triplet_val_inv): New function.
2203         (create_cmp_incr): Likewise.
2204         (create_array_refs): Likewise.
2205         (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2206         Also modularized common parts between functions and called the function.
2207         (build_array_notation_expr): Likewise.
2208         (fix_conditional_array_notations_1): Likewise.
2209         (fix_array_notation_expr): Likewise.
2210         (fix_array_notation_call_expr): Likewise.
2211
2212 2013-06-18  Marek Polacek  <polacek@redhat.com>
2213
2214         PR c/57630
2215         * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2216
2217 2013-06-12  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2218
2219         * c-array-notation.c (build_array_notation_expr): Reject array notation
2220         mismatch between LHS and RHS even inside a call_expr.  Also, removed
2221         a couple while statements that were dead code.
2222
2223 2013-06-10  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2224
2225         * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2226         excessive precision expressions in function parameters.  Also removed
2227         couple unwanted while statements.
2228
2229 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2230
2231         * c-array-notation.c (expand_array_notation_exprs): Added
2232         ARRAY_NOTATION_REF case.
2233         
2234 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2235
2236         * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2237         function to c-family/array-notation-common.c.
2238         (is_cilkplus_reduce_builtin): Likewise.
2239         (find_rank): Likewise.
2240         (extract_array_notation_exprs): Likewise.
2241         (replace_array_notations): Likewise.
2242         (find_inv_trees): Likewise.
2243         (replace_inv_trees): Likewise.
2244         (contains_array_notation_expr): Likewise.
2245         (find_correct_array_notation_type): Likewise.
2246         (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2247         (struct inv_list): Moved this to c-family/array-notation-common.c.
2248         * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2249         
2250 2013-06-05  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2251
2252         * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2253         reduction functions outside the for-loop.  Added a check if the fundecl
2254         is non-NULL.  Finally, removed an unwanted if-statement, and made the
2255         body unconditional.
2256
2257 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2258
2259         * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2260         condition of the if-statement matches the rank of else-block and then-
2261         block when array notations are used.
2262         * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2263         expression after the entire function body is parsed.
2264         (c_parser_expr_no_commas): Delayed creating array notation expressions
2265         to the end of function parsing.
2266         * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2267         whole if-statement instead of just the condition.
2268         (expand_array_notation_exprs): Added MODIFY_EXPR case.  
2269
2270 2013-06-03  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2271
2272         PR c/57474
2273         * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2274         array to NULL_TREE if they are unused.  Also added a check for the
2275         field to be NULL before its fields are used in future.
2276         
2277 2013-05-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2278
2279         PR bootstrap/57450
2280         * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2281         (build_array_notation_expr): Likewise.
2282
2283 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
2284
2285         * c-typeck.c (build_array_ref): Added a check to see if array's
2286         index is greater than one.  If true, then emit an error.
2287         (build_function_call_vec): Exclude error reporting and checking
2288         for builtin array-notation functions.
2289         (convert_arguments): Likewise.
2290         (c_finish_return): Added a check for array notations as a return
2291         expression.  If true, then emit an error.
2292         (c_finish_loop): Added a check for array notations in a loop
2293         condition.  If true then emit an error.
2294         (lvalue_p): Added a ARRAY_NOTATION_REF case.
2295         (build_binary_op): Added a check for array notation expr inside
2296         op1 and op0.  If present, we call another function to find correct
2297         type.
2298         * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2299         * c-parser.c (c_parser_compound_statement): Check if array
2300         notation code is used in tree, if so, then transform them into
2301         appropriate C code.
2302         (c_parser_expr_no_commas): Check if array notation is used in LHS
2303         or RHS, if so, then build array notation expression instead of
2304         regular modify.
2305         (c_parser_postfix_expression_after_primary): Added a check for
2306         colon(s) after square braces, if so then handle it like an array
2307         notation.  Also, break up array notations in unary op if found.
2308         (c_parser_direct_declarator_inner): Added a check for array
2309         notation.
2310         (c_parser_compound_statement): Added a check for array notation in
2311         a stmt.  If one is present, then expand array notation expr.
2312         (c_parser_if_statement): Likewise.
2313         (c_parser_switch_statement): Added a check for array notations in
2314         a switch statement's condition.  If true, then output an error.
2315         (c_parser_while_statement): Similarly, but for a while.
2316         (c_parser_do_statement): Similarly, but for a do-while.
2317         (c_parser_for_statement): Similarly, but for a for-loop.
2318         (c_parser_unary_expression): Check if array notation is used in a
2319         pre-increment or pre-decrement expression.  If true, then expand
2320         them.
2321         (c_parser_array_notation): New function.
2322         * c-array-notation.c: New file.
2323         * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2324         
2325 2013-05-23  Mike Stump  <mikestump@comcast.net>
2326
2327         * c-typeck.c (convert_for_assignment): Handle references to memory
2328         spaces better.
2329
2330 2013-05-16  Jason Merrill  <jason@redhat.com>
2331
2332         * Make-lang.in (cc1$(exeext)): Use link mutex.
2333
2334 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
2335
2336         * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2337         to simply use OPT_Wpointer_arith.
2338         (build_unary_op): Likewise.
2339
2340 2013-04-03  Jakub Jelinek  <jakub@redhat.com>
2341
2342         PR c/19449
2343         * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2344         argument.  If set, or it temporarily for parsing of the first
2345         argument into force_folding_builtin_constant_p.
2346         (c_parser_postfix_expression): Adjust callers.
2347
2348 2013-03-21  Richard Biener  <rguenther@suse.de>
2349
2350         * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2351         instead of DECL_DEBUG_EXPR_IS_FROM.  Guard properly.
2352
2353 2013-02-12  Marek Polacek  <polacek@redhat.com>
2354
2355         PR c/44938
2356         * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2357         origtypes to NULL.
2358
2359 2013-01-24  Jakub Jelinek  <jakub@redhat.com>
2360
2361         PR c/56078
2362         * c-typeck.c (set_nonincremental_init_from_string): If
2363         constructor_max_index is NULL, treat it as if tree_int_cst_lt
2364         returned false.
2365         (process_init_element): Likewise.
2366
2367 2012-12-20  Jakub Jelinek  <jakub@redhat.com>
2368
2369         PR c++/55619
2370         * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2371         argument, don't call default_function_array_conversion
2372         nor c_fully_fold here.
2373         (c_parser_asm_statement): Adjust callers.
2374         * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2375         and outputs here, and call default_function_array_conversion
2376         on inputs that don't need to be addressable.
2377
2378 2012-12-18  Jakub Jelinek  <jakub@redhat.com>
2379
2380         PR c/39464
2381         * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2382         warning require that both c_common_unsigned_type as well as
2383         c_common_signed_type is the same for both mvl and mvr types.
2384
2385 2012-11-16  Diego Novillo  <dnovillo@google.com>
2386
2387         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2388
2389         * c-common.c: Use new vec API in vec.h.
2390         * c-common.h: Likewise.
2391         * c-gimplify.c: Likewise.
2392         * c-pragma.c: Likewise.
2393         * c-pretty-print.c: Likewise.
2394         * c-pretty-print.h: Likewise.
2395         * c-semantics.c: Likewise.
2396         * c-decl.c: Likewise.
2397         * c-parser.c: Likewise.
2398         * c-tree.h: Likewise.
2399         * c-typeck.c: Likewise.
2400
2401 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
2402
2403         PR c++/54930
2404         * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2405
2406 2012-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2407
2408         PR c/53066
2409         * c-decl.c (warn_if_shadowing): Do not warn if a variable
2410         shadows a function, unless the variable is a function or a
2411         pointer-to-function.
2412
2413 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
2414
2415         PR c/54381
2416         * c-parser.c (struct c_tree_loc_pair): Removed.
2417         (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2418         add location_t * and tree * arguments, fill in array of 3
2419         sizeof_arg trees and corresponding locs.
2420         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2421         c_parser_expr_list callers.
2422         (c_parser_postfix_expression_after_primary): Likewise.  Pass
2423         array of 3 sizeof_arg trees and locs (corresponding to first
2424         3 arguments) to sizeof_pointer_memaccess_warning.
2425
2426 2012-10-09  Lawrence Crowl  <crowl@google.com>
2427
2428         * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2429         * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2430         hash table.
2431
2432 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
2433
2434         PR c++/54194
2435         * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2436         call.
2437
2438 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
2439
2440         PR c++/54427
2441         * c-typeck.c: Include c-common.h.
2442         (enum stv_conv): Moved to c-common.h.
2443         (scalar_to_vector): Moved to c-common.c.
2444         (build_binary_op): Adapt to scalar_to_vector's new prototype.
2445         * Make-lang.in: c-typeck.c depends on c-common.h.
2446
2447 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
2448
2449         * c-decl.c (c_write_global_declarations): Fix handling of
2450         -fdump-ada-spec*.
2451
2452 2012-09-30  Sharad Singhai  <singhai@google.com>
2453
2454         * c-decl.c (c_write_global_declarations): Use a different method
2455         to determine if the dump has ben initialized.
2456
2457 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
2458
2459         PR c/54552
2460         * c-typeck.c (c_cast_expr): When casting to a type requiring
2461         C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2462         c_fully_fold first.
2463
2464 2012-09-14  Joseph Myers  <joseph@codesourcery.com>
2465
2466         PR c/54103
2467         * c-typeck.c (build_unary_op): Pass original argument of
2468         TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2469         any C_MAYBE_CONST_EXPR, if it has integer operands.
2470         (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2471         TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2472         to c_objc_common_truthvalue_conversion, then remove any
2473         C_MAYBE_CONST_EXPR, if they have integer operands.  Use
2474         c_objc_common_truthvalue_conversion not
2475         c_common_truthvalue_conversion.
2476         (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2477         call note_integer_operands for arguments with integer operands
2478         that are not integer constants.
2479
2480 2012-09-13  Jakub Jelinek  <jakub@redhat.com>
2481
2482         PR c/54559
2483         * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2484         COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2485
2486 2012-08-31  Jakub Jelinek  <jakub@redhat.com>
2487
2488         PR c/54428
2489         * c-convert.c (convert): Don't call fold_convert_loc if
2490         TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2491         is a COMPLEX_EXPR.  Remove TYPE_MAIN_VARIANT check from
2492         COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2493
2494 2012-08-24  Jakub Jelinek  <jakub@redhat.com>
2495
2496         PR c/54355
2497         * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2498         for nested and empty_ok arguments in the call to
2499         c_parser_declaration_or_fndef.
2500
2501 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
2502
2503         * c-tree.h (c_last_sizeof_arg): Declare.
2504         * c-parser.c (struct c_tree_loc_pair): New type.
2505         (c_parser_expr_list): Add sizeof_arg argument.  Fill it in if
2506         non-NULL.
2507         (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2508         (c_parser_postfix_expression_after_primary): Likewise.  Call
2509         sizeof_pointer_memaccess_warning if needed.
2510         (sizeof_ptr_memacc_comptypes): New function.
2511         * c-typeck.c (c_last_sizeof_arg): New global variable.
2512         (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2513
2514 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
2515
2516         * c-lang.h (lang_decl): Add variable_size GTY option.
2517
2518 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
2519
2520         * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2521         * Make-lang.in: Fix dependencies.
2522
2523 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
2524
2525         * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2526         and add language Makefile hooks.
2527         * config-lang.in: New file.
2528         * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2529         add the required "normal" config-lang.in rules.
2530         * c-lang.h: Moved from gcc/ to here.
2531         * c-tree.h: Likewise.
2532         * c-objc-common.c: Likewise.
2533         * c-objc-common.h: Likewise.
2534         * c-typeck.c: Likewise.
2535         * c-convert.c: Likewise.
2536         * c-lang.c: Likewise.
2537         * c-aux-info.c: Likewise.
2538         * c-errors.c: Likewise.
2539         * gccspec.c: Likewise.
2540         * c-decl.c: Likewise.  Include gt-c-c-decl.h, not gt-c-decl.h.
2541         * c-parser.c: Likewise.  Include gt-c-c-parser.h, not gt-c-parser.h.
2542 \f
2543 Copyright (C) 2012-2015 Free Software Foundation, Inc.
2544
2545 Copying and distribution of this file, with or without modification,
2546 are permitted in any medium without royalty provided the copyright
2547 notice and this notice are preserved.