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